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

Side by Side Diff: LayoutTests/inspector/debugger/dynamic-scripts.html

Issue 15832007: DevTools: Add support for //# sourceURL (sourceMappingURL) comments and deprecate //@ ones (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 years, 6 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 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../http/tests/inspector/inspector-test.js"></script> 4 <script src="../../http/tests/inspector/inspector-test.js"></script>
5 <script src="../../http/tests/inspector/debugger-test.js"></script> 5 <script src="../../http/tests/inspector/debugger-test.js"></script>
6 <script> 6 <script>
7 function appendDynamicScriptElement(src, content) 7 function appendDynamicScriptElement(src, content)
8 { 8 {
9 var scriptElement = document.createElement("script"); 9 var scriptElement = document.createElement("script");
10 if (src) 10 if (src)
11 scriptElement.src = src; 11 scriptElement.src = src;
12 else 12 else
13 scriptElement.textContent = content; 13 scriptElement.textContent = content;
14 document.head.appendChild(scriptElement); 14 document.head.appendChild(scriptElement);
15 } 15 }
16 16
17 function loadScripts() 17 function loadScripts()
18 { 18 {
19 var sourceURLComment = "\n //@ sourceURL="; 19 var sourceURLComment = "\n //# sourceURL=";
20 window.eval("function fooEval() {}"); 20 window.eval("function fooEval() {}");
21 window.eval("function fooEvalSourceURL() {}" + sourceURLComment + "evalSourc eURL.js"); 21 window.eval("function fooEvalSourceURL() {}" + sourceURLComment + "evalSourc eURL.js");
22 appendDynamicScriptElement("", "function fooScriptElementContent1() {}"); 22 appendDynamicScriptElement("", "function fooScriptElementContent1() {}");
23 appendDynamicScriptElement("", "function fooScriptElementContent2() {}"); 23 appendDynamicScriptElement("", "function fooScriptElementContent2() {}");
24 appendDynamicScriptElement("", "function fooScriptElementContentSourceURL() {}" + sourceURLComment + "scriptElementContentSourceURL.js"); 24 appendDynamicScriptElement("", "function fooScriptElementContentSourceURL() {}" + sourceURLComment + "scriptElementContentSourceURL.js");
25 appendDynamicScriptElement("resources/dynamic-script.js"); 25 appendDynamicScriptElement("resources/dynamic-script.js");
26 } 26 }
27 27
28 function scriptLoaded() 28 function scriptLoaded()
29 { 29 {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 InspectorTest.completeDebuggerTest(); 70 InspectorTest.completeDebuggerTest();
71 } 71 }
72 } 72 }
73 </script> 73 </script>
74 </head> 74 </head>
75 <body onload="runTest()"> 75 <body onload="runTest()">
76 <p>Tests that scripts for dynamically added script elements are shown in sources panel if loaded with inspector open.</p> 76 <p>Tests that scripts for dynamically added script elements are shown in sources panel if loaded with inspector open.</p>
77 <a href="https://bugs.webkit.org/show_bug.cgi?id=99324">Bug 99324</a> 77 <a href="https://bugs.webkit.org/show_bug.cgi?id=99324">Bug 99324</a>
78 </body> 78 </body>
79 </html> 79 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698