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