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> | 6 <script> |
7 | 7 |
8 var scriptElement; | 8 var scriptElement; |
9 function loadScript() | 9 function loadScript() |
10 { | 10 { |
11 scriptElement = document.createElement("script"); | 11 scriptElement = document.createElement("script"); |
12 scriptElement.src = "resources/cached-script.php"; | 12 scriptElement.src = "resources/cached-script.php"; |
13 document.head.appendChild(scriptElement); | 13 document.head.appendChild(scriptElement); |
14 } | 14 } |
15 | 15 |
16 function unloadScript() | 16 function unloadScript() |
17 { | 17 { |
18 scriptElement.parentElement.removeChild(scriptElement); | 18 scriptElement.parentElement.removeChild(scriptElement); |
19 } | 19 } |
20 | 20 |
21 function gc() | 21 function gc() |
22 { | 22 { |
23 if (window.internals) | |
24 window.internals.garbageCollectDocumentResources(document); | |
25 // In Oilpan, Resource objects are not destructed until GC. | 23 // In Oilpan, Resource objects are not destructed until GC. |
26 if (window.GCController) | 24 if (window.GCController) |
27 GCController.collectAll(); | 25 GCController.collectAll(); |
28 } | 26 } |
29 | 27 |
30 function test() | 28 function test() |
31 { | 29 { |
32 var timeZero = 0; | 30 var timeZero = 0; |
33 | 31 |
34 InspectorTest.recordNetwork(); | 32 InspectorTest.recordNetwork(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 InspectorTest.completeTest(); | 84 InspectorTest.completeTest(); |
87 } | 85 } |
88 } | 86 } |
89 </script> | 87 </script> |
90 </head> | 88 </head> |
91 <body onload="runTest()"> | 89 <body onload="runTest()"> |
92 <p> Tests requests loaded from disk cache have correct timing</p> | 90 <p> Tests requests loaded from disk cache have correct timing</p> |
93 </body> | 91 </body> |
94 </html> | 92 </html> |
95 | 93 |
OLD | NEW |