| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="./resources/source-map.php"></script> | 3 <script src="./resources/source-map.php"></script> |
| 4 <script src="./resources/x-source-map.php"></script> | 4 <script src="./resources/x-source-map.php"></script> |
| 5 <script src="/inspector/inspector-test.js"></script> | 5 <script src="/inspector/inspector-test.js"></script> |
| 6 <script src="/inspector/debugger-test.js"></script> | 6 <script src="/inspector/debugger-test.js"></script> |
| 7 <script src="/inspector/console-test.js"></script> | 7 <script src="/inspector/console-test.js"></script> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 var test = function() | 10 var test = function() |
| 11 { | 11 { |
| 12 InspectorTest.setQuiet(true); | 12 InspectorTest.setQuiet(true); |
| 13 InspectorTest.startDebuggerTest(step1); | 13 InspectorTest.startDebuggerTest(step1); |
| 14 | 14 |
| 15 function step1() | 15 function step1() |
| 16 { | 16 { |
| 17 InspectorTest.addResult("Reloading..."); | 17 InspectorTest.addResult("Reloading..."); |
| 18 | 18 |
| 19 var mainTarget = SDK.targetManager.mainTarget(); | 19 var debuggerModel = InspectorTest.debuggerModel; |
| 20 var debuggerModel = SDK.DebuggerModel.fromTarget(mainTarget); | |
| 21 debuggerModel.addEventListener(SDK.DebuggerModel.Events.ParsedScriptSour
ce, onScriptAdded); | 20 debuggerModel.addEventListener(SDK.DebuggerModel.Events.ParsedScriptSour
ce, onScriptAdded); |
| 22 function onScriptAdded(event) | 21 function onScriptAdded(event) |
| 23 { | 22 { |
| 24 var script = event.data; | 23 var script = event.data; |
| 25 if (!event.data.contentURL().endsWith(".php")) | 24 if (!event.data.contentURL().endsWith(".php")) |
| 26 return; | 25 return; |
| 27 InspectorTest.addResult("Added script:"); | 26 InspectorTest.addResult("Added script:"); |
| 28 InspectorTest.addResult(" url: " + script.sourceURL); | 27 InspectorTest.addResult(" url: " + script.sourceURL); |
| 29 InspectorTest.addResult(" sourceMapUrl: " + script.sourceMapURL); | 28 InspectorTest.addResult(" sourceMapUrl: " + script.sourceMapURL); |
| 30 } | 29 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 41 | 40 |
| 42 </script> | 41 </script> |
| 43 </head> | 42 </head> |
| 44 | 43 |
| 45 <body onload="runTest()"> | 44 <body onload="runTest()"> |
| 46 <p> | 45 <p> |
| 47 Tests that SourceMap and X-SourceMap http headers are propagated to scripts in t
he front-end. | 46 Tests that SourceMap and X-SourceMap http headers are propagated to scripts in t
he front-end. |
| 48 </p> | 47 </p> |
| 49 </body> | 48 </body> |
| 50 </html> | 49 </html> |
| OLD | NEW |