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

Side by Side Diff: LayoutTests/inspector/extensions/extensions-reload.html

Issue 761143003: DevTools: remove ScriptPreprocessor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../../http/tests/inspector/extensions-test.js"></script> 5 <script src="../../http/tests/inspector/extensions-test.js"></script>
6 <script src="../../http/tests/inspector/console-test.js"></script> 6 <script src="../../http/tests/inspector/console-test.js"></script>
7 <script type="text/javascript"> 7 <script type="text/javascript">
8 8
9 window.bar = "foo = " + window.foo; 9 window.bar = "foo = " + window.foo;
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 }); 82 });
83 } 83 }
84 } 84 }
85 85
86 evaluateOnFrontend("InspectorTest.runWhenPageLoads(reply)", onPageWithInject edCodeLoaded); 86 evaluateOnFrontend("InspectorTest.runWhenPageLoads(reply)", onPageWithInject edCodeLoaded);
87 webInspector.inspectedWindow.reload({ 87 webInspector.inspectedWindow.reload({
88 injectedScript: "console.log(42)" 88 injectedScript: "console.log(42)"
89 }); 89 });
90 } 90 }
91 91
92 function extension_testReloadPreprocessesCode(nextTest)
93 {
94 var valueWithPreprocessedCode;
95 function onPageWithPreprocessedCodeLoaded()
96 {
97 webInspector.inspectedWindow.eval("window.__preprocessed", function(valu e) {
98 valueWithPreprocessedCode = value;
99 evaluateOnFrontend("InspectorTest.runWhenPageLoads(reply)", onPageWi thoutPreprocessedCodeLoaded);
100 webInspector.inspectedWindow.reload({ });
101 });
102 }
103 function onPageWithoutPreprocessedCodeLoaded()
104 {
105 webInspector.inspectedWindow.eval("window.__preprocessed", function(valu e) {
106 output("With preprocessor:\n" + valueWithPreprocessedCode.map(functi on(url) { return url.split('/').pop(); }).join("\n"));
107 output("Without preprocessor: " + value);
108 nextTest();
109 });
110 }
111
112 evaluateOnFrontend("InspectorTest.runWhenPageLoads(reply)", onPageWithPrepro cessedCodeLoaded);
113 function preprocessor(src, url, fName)
114 {
115 var surl = url + (fName ? '_' + fName : '') + '.js';
116 return src + '\nwindow.__preprocessed.push(\"' + surl + '\");\n'+ '//@ s ourceURL=' + surl;
117 }
118 webInspector.inspectedWindow.reload({
119 injectedScript: "window.__preprocessed = [];",
120 preprocessingScript: "(" + preprocessor +")"
121 });
122 }
123
124 </script> 92 </script>
125 </head> 93 </head>
126 <body onload="runTest()"> 94 <body onload="runTest()">
127 <p>Tests that webInspector.inspectedWindow.reload() successfully injects and pre processes user's code upon reload</p> 95 <p>Tests that webInspector.inspectedWindow.reload() successfully injects and pre processes user's code upon reload</p>
128 </body> 96 </body>
129 </html> 97 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/inspector/extensions/extensions-reload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698