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

Side by Side Diff: LayoutTests/http/tests/inspector-enabled/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
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/debugger-test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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="../inspector/inspector-test.js"></script> 4 <script src="../inspector/inspector-test.js"></script>
5 <script src="../inspector/debugger-test.js"></script> 5 <script src="../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 onload() 28 function onload()
29 { 29 {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 InspectorTest.completeDebuggerTest(); 73 InspectorTest.completeDebuggerTest();
74 } 74 }
75 } 75 }
76 </script> 76 </script>
77 </head> 77 </head>
78 <body onload="onload()"> 78 <body onload="onload()">
79 <p>Tests that scripts for dynamically added script elements are shown in sources panel if inspector is opened after the scripts were loaded.</p> 79 <p>Tests that scripts for dynamically added script elements are shown in sources panel if inspector is opened after the scripts were loaded.</p>
80 <a href="https://bugs.webkit.org/show_bug.cgi?id=99324">Bug 99324</a> 80 <a href="https://bugs.webkit.org/show_bug.cgi?id=99324">Bug 99324</a>
81 </body> 81 </body>
82 </html> 82 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/debugger-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698