OLD | NEW |
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 Loading... |
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> |
OLD | NEW |