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