Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/long-script-content.html

Issue 2847943002: Cleanup LayoutTests that define a function gc(). (Closed)
Patch Set: Fixing Layout Tests Failures Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/long_script.cgi"; 13 scriptElement.src = "resources/long_script.cgi";
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 InspectorTest.hardReloadPage(step1); 24 InspectorTest.hardReloadPage(step1);
31 25
32 function step1() 26 function step1()
33 { 27 {
34 InspectorTest.addConsoleSniffer(step2); 28 InspectorTest.addConsoleSniffer(step2);
35 InspectorTest.evaluateInPage("loadScript()"); 29 InspectorTest.evaluateInPage("loadScript()");
36 } 30 }
37 31
(...skipping 29 matching lines...) Expand all
67 InspectorTest.completeTest(); 61 InspectorTest.completeTest();
68 } 62 }
69 } 63 }
70 </script> 64 </script>
71 </head> 65 </head>
72 <body onload="runTest()"> 66 <body onload="runTest()">
73 <p> Tests long script content is correctly shown in source panel after page reload.</p> 67 <p> Tests long script content is correctly shown in source panel after page reload.</p>
74 </body> 68 </body>
75 </html> 69 </html>
76 70
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698