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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/source-url-comment.html

Issue 1483053003: [DevTools] Removed deprecated sourceURL comment from tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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="../../../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> 5 <script>
6 function keepAliveInInlineScript() { } 6 function keepAliveInInlineScript() { }
7 7
8 //# sourceURL=inlineScriptURL.js 8 //# sourceURL=inlineScriptURL.js
9 </script> 9 </script>
10 <script> 10 <script>
11 function doEval() 11 function doEval()
12 { 12 {
13 eval("function keepAlive() {}\n//# sourceURL=evalURL.js"); 13 eval("function keepAlive() {}\n//# sourceURL=evalURL.js");
14 } 14 }
15 15
16 function doDeprecatedEval()
17 {
18 eval("function keepAlive() {}\n//@ sourceURL=deprecatedEvalURL.js");
19 }
20
21 function doEvalWithNonRelativeURL() 16 function doEvalWithNonRelativeURL()
22 { 17 {
23 eval("function relativeURLScript() {}\n//# sourceURL=/js/nonRelativeURL.js") ; 18 eval("function relativeURLScript() {}\n//# sourceURL=/js/nonRelativeURL.js") ;
24 } 19 }
25 20
26 function doDynamicScript() 21 function doDynamicScript()
27 { 22 {
28 var scriptElement = document.createElement("script"); 23 var scriptElement = document.createElement("script");
29 scriptElement.textContent = "function keepAliveInDynamicScript() {}\n//# sou rceURL=dynamicScriptURL.js"; 24 scriptElement.textContent = "function keepAliveInDynamicScript() {}\n//# sou rceURL=dynamicScriptURL.js";
30 document.body.appendChild(scriptElement); 25 document.body.appendChild(scriptElement);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 InspectorTest.evaluateInPage("setTimeout(doEval, 0)"); 112 InspectorTest.evaluateInPage("setTimeout(doEval, 0)");
118 113
119 function didShowScriptSource(sourceFrame) 114 function didShowScriptSource(sourceFrame)
120 { 115 {
121 InspectorTest.addResult(sourceFrame.textEditor.text()); 116 InspectorTest.addResult(sourceFrame.textEditor.text());
122 forEachScriptMatchingURL("evalURL.js", checkScriptSourceURL); 117 forEachScriptMatchingURL("evalURL.js", checkScriptSourceURL);
123 next(); 118 next();
124 } 119 }
125 }, 120 },
126 121
127 function testDeprecatedSourceURLComment(next)
128 {
129 InspectorTest.showScriptSource("deprecatedEvalURL.js", didShowScript Source);
130 InspectorTest.evaluateInPage("setTimeout(doDeprecatedEval, 0)");
131
132 function didShowScriptSource(sourceFrame)
133 {
134 InspectorTest.addResult(sourceFrame.textEditor.text());
135 forEachScriptMatchingURL("deprecatedEvalURL.js", checkScriptSour ceURL);
136 next();
137 }
138 },
139
140 function testSourceURLAndMappingURLComment(next) 122 function testSourceURLAndMappingURLComment(next)
141 { 123 {
142 InspectorTest.showScriptSource("sourceURL.js", didShowScriptSource); 124 InspectorTest.showScriptSource("sourceURL.js", didShowScriptSource);
143 InspectorTest.evaluateInPage("setTimeout(doURLAndMappingURL, 0)"); 125 InspectorTest.evaluateInPage("setTimeout(doURLAndMappingURL, 0)");
144 126
145 function didShowScriptSource(sourceFrame) 127 function didShowScriptSource(sourceFrame)
146 { 128 {
147 function checkScriptSourceURLAndMappingURL(script) 129 function checkScriptSourceURLAndMappingURL(script)
148 { 130 {
149 InspectorTest.addResult("hasSourceURL: " + script.hasSourceU RL); 131 InspectorTest.addResult("hasSourceURL: " + script.hasSourceU RL);
(...skipping 29 matching lines...) Expand all
179 InspectorTest.addResult(sourceFrame.textEditor.text()); 161 InspectorTest.addResult(sourceFrame.textEditor.text());
180 forEachScriptMatchingURL("nonRelativeURL.js", checkScriptSourceU RL); 162 forEachScriptMatchingURL("nonRelativeURL.js", checkScriptSourceU RL);
181 next(); 163 next();
182 } 164 }
183 } 165 }
184 ]); 166 ]);
185 167
186 function checkScriptSourceURL(script) 168 function checkScriptSourceURL(script)
187 { 169 {
188 InspectorTest.addResult("hasSourceURL: " + script.hasSourceURL); 170 InspectorTest.addResult("hasSourceURL: " + script.hasSourceURL);
189 } 171 }
190 }; 172 };
191 173
192 </script> 174 </script>
193 175
194 </head> 176 </head>
195 177
196 <body onload="runTest()"> 178 <body onload="runTest()">
197 <p>Tests that evals with sourceURL comment are shown in scripts panel.</p> 179 <p>Tests that evals with sourceURL comment are shown in scripts panel.</p>
198 </body> 180 </body>
199 </html> 181 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698