OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
4 <script src="../network-test.js"></script> | 4 <script src="../network-test.js"></script> |
5 <script src="../debugger-test.js"></script> | 5 <script src="../debugger-test.js"></script> |
| 6 <script src="../../../../resources/gc.js"></script> |
6 <script> | 7 <script> |
7 | 8 |
8 var scriptElement; | 9 var scriptElement; |
9 function loadScript() | 10 function loadScript() |
10 { | 11 { |
11 scriptElement = document.createElement("script"); | 12 scriptElement = document.createElement("script"); |
12 scriptElement.src = "resources/cached-script.php"; | 13 scriptElement.src = "resources/cached-script.php"; |
13 document.head.appendChild(scriptElement); | 14 document.head.appendChild(scriptElement); |
14 } | 15 } |
15 | 16 |
16 function unloadScript() | 17 function unloadScript() |
17 { | 18 { |
18 scriptElement.parentElement.removeChild(scriptElement); | 19 scriptElement.parentElement.removeChild(scriptElement); |
19 } | 20 } |
20 | 21 |
21 function gc() | |
22 { | |
23 // In Oilpan, Resource objects are not destructed until GC. | |
24 if (window.GCController) | |
25 GCController.collectAll(); | |
26 } | |
27 | |
28 function test() | 22 function test() |
29 { | 23 { |
30 var timeZero = 0; | 24 var timeZero = 0; |
31 | 25 |
32 InspectorTest.recordNetwork(); | 26 InspectorTest.recordNetwork(); |
33 InspectorTest.NetworkAgent.setCacheDisabled(true, step1); | 27 InspectorTest.NetworkAgent.setCacheDisabled(true, step1); |
34 | 28 |
35 function step1() | 29 function step1() |
36 { | 30 { |
37 InspectorTest.addConsoleSniffer(step2); | 31 InspectorTest.addConsoleSniffer(step2); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 InspectorTest.completeTest(); | 78 InspectorTest.completeTest(); |
85 } | 79 } |
86 } | 80 } |
87 </script> | 81 </script> |
88 </head> | 82 </head> |
89 <body onload="runTest()"> | 83 <body onload="runTest()"> |
90 <p> Tests requests loaded from disk cache have correct timing</p> | 84 <p> Tests requests loaded from disk cache have correct timing</p> |
91 </body> | 85 </body> |
92 </html> | 86 </html> |
93 | 87 |
OLD | NEW |