Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | <html xmlns="http://www.w3.org/1999/xhtml" manifest="bypass.cacheManifest"> |
michael@0 | 2 | <head> |
michael@0 | 3 | |
michael@0 | 4 | <script type="text/javascript" src="namespace1/script.js"></script> |
michael@0 | 5 | <script type="text/javascript" src="namespace1/sub/script1.js"></script> |
michael@0 | 6 | <script type="text/javascript" src="namespace1/sub2/script2.js"></script> |
michael@0 | 7 | <script type="text/javascript" src="namespace2/script3.js"></script> |
michael@0 | 8 | |
michael@0 | 9 | <script class="testbody" type="text/javascript"> |
michael@0 | 10 | |
michael@0 | 11 | function testScriptPresence(scriptPath, func, shouldPass) |
michael@0 | 12 | { |
michael@0 | 13 | var msg = "Script " + scriptPath + (shouldPass ? " loaded" : " not loaded"); |
michael@0 | 14 | try { |
michael@0 | 15 | eval(func); |
michael@0 | 16 | opener.OfflineTest.ok(shouldPass, msg); |
michael@0 | 17 | } |
michael@0 | 18 | catch(ex) { |
michael@0 | 19 | opener.OfflineTest.ok(!shouldPass, msg); |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | function startTest() |
michael@0 | 25 | { |
michael@0 | 26 | testScriptPresence("namespace1/script.js", "scriptNo0Function();", false); |
michael@0 | 27 | testScriptPresence("namespace1/sub/script1.js", "scriptNo1Function();", true); |
michael@0 | 28 | testScriptPresence("namespace1/sub2/script2.js", "scriptNo2Function();", true); |
michael@0 | 29 | testScriptPresence("namespace2/script3.js", "scriptNo3Function();", true); |
michael@0 | 30 | |
michael@0 | 31 | opener.OfflineTest.teardownAndFinish(); |
michael@0 | 32 | window.close(window); |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | </script> |
michael@0 | 36 | |
michael@0 | 37 | </head> |
michael@0 | 38 | |
michael@0 | 39 | <body onload="startTest();"> |
michael@0 | 40 | </body> |
michael@0 | 41 | </html> |