| 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/long_script.cgi"; | 12 scriptElement.src = "resources/long_script.cgi"; |
| 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 InspectorTest.hardReloadPage(step1); | 30 InspectorTest.hardReloadPage(step1); |
| 33 | 31 |
| 34 function step1() | 32 function step1() |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 InspectorTest.completeTest(); | 67 InspectorTest.completeTest(); |
| 70 } | 68 } |
| 71 } | 69 } |
| 72 </script> | 70 </script> |
| 73 </head> | 71 </head> |
| 74 <body onload="runTest()"> | 72 <body onload="runTest()"> |
| 75 <p> Tests long script content is correctly shown in source panel after page
reload.</p> | 73 <p> Tests long script content is correctly shown in source panel after page
reload.</p> |
| 76 </body> | 74 </body> |
| 77 </html> | 75 </html> |
| 78 | 76 |
| OLD | NEW |