Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: test/index.html

Issue 4895499043733504: Issue 510 - [Typed objects] Don`t hardcode script load order in unit tests (Closed)
Patch Set: Reverted to original get_scripts implementation Created Feb. 4, 2015, 3:33 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/common.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="stylesheet" href="qunit.css"/> 4 <link rel="stylesheet" href="qunit.css"/>
5 5
6 <script>
7 var js17supported = false;
8 </script>
9 <script type="text/javascript;version=1.7">
10 js17supported = true;
11 </script>
12
13 <script src="jquery-1.7.1.min.js"></script> 6 <script src="jquery-1.7.1.min.js"></script>
14 <script src="qunit.js"></script> 7 <script src="qunit.js"></script>
15 <script src="common.js"></script> 8 <script src="common.js"></script>
16 9
17 <script> 10 <script>
18 var libs = [ 11 var evalScript = function(source)
19 "typedObjects/utils.js", 12 {
20 "typedObjects/hash.js", 13 return eval(source);
21 "typedObjects/arrayTypes.js", 14 };
22 "typedObjects/dictionaryTypes.js", 15 var evalModule = function(source)
23 "typedObjects/primitiveTypes.js", 16 {
24 "typedObjects/references.js", 17 var result = {};
25 "typedObjects/objectTypes.js", 18 new Function("exports", source)(result);
26 "typedObjects/stringType.js", 19 return result;
27 "typedObjects.js" 20 };
28 ]; 21 var js17supported = false;
29 for (var i = 0; i < libs.length; i++) 22 </script>
30 addScript("/lib/" + libs[i]);
31 23
32 var tests = [ 24 <script type="text/javascript;version=1.7">
33 "typedObjects.js" 25 evalScript = function(source)
34 ]; 26 {
35 for (var i = 0; i < tests.length; i++) 27 return eval(source);
36 addScript("/tests/" + tests[i]); 28 };
29 evalModule = function(source)
30 {
31 var result = {};
32 new Function("exports", source)(result);
33 return result;
34 };
35 js17supported = true;
36 </script>
37
38 <script>
39 addScript("/lib.js");
40 addScript("/tests.js");
41
42 window.addEventListener("load", function()
43 {
44 for (var i = 0; i < tests.length; i++)
45 evalScript(tests[i]);
46 }, false);
37 </script> 47 </script>
38 </head> 48 </head>
39 <body> 49 <body>
40 <h1 id="qunit-header">Adblock Plus unit tests</h1> 50 <h1 id="qunit-header">Adblock Plus unit tests</h1>
41 <h2 id="qunit-banner"></h2> 51 <h2 id="qunit-banner"></h2>
42 <div id="qunit-testrunner-toolbar"></div> 52 <div id="qunit-testrunner-toolbar"></div>
43 <h2 id="qunit-userAgent"></h2> 53 <h2 id="qunit-userAgent"></h2>
44 <ol id="qunit-tests"></ol> 54 <ol id="qunit-tests"></ol>
45 </body> 55 </body>
46 </html> 56 </html>
OLDNEW
« no previous file with comments | « test/common.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld