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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/compiler-script-mapping.html

Issue 2781923002: [WIP] DevTools: user SourceMapManager in Debugger (Closed)
Patch Set: works great Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/sources/debugger/worker-debugging-script-mapping.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="inspector-test.js"></script> 3 <script src="inspector-test.js"></script>
4 <script src="debugger-test.js"></script> 4 <script src="debugger-test.js"></script>
5 5
6 <script> 6 <script>
7 7
8 function addScript(url) 8 function addScript(url)
9 { 9 {
10 var script = document.createElement("script"); 10 var script = document.createElement("script");
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 InspectorTest.addResult("<source content> === " + content); 130 InspectorTest.addResult("<source content> === " + content);
131 next(); 131 next();
132 } 132 }
133 } 133 }
134 }, 134 },
135 135
136 function testSourceMapCouldNotBeLoaded(next) 136 function testSourceMapCouldNotBeLoaded(next)
137 { 137 {
138 InspectorTest.addResult("Adding compiled.js"); 138 InspectorTest.addResult("Adding compiled.js");
139 InspectorTest.evaluateInPage("\n//# sourceMappingURL=http://127.0.0. 1:8000/inspector/resources/source-map.json_\n"); 139 InspectorTest.evaluateInPage("\n//# sourceMappingURL=http://127.0.0. 1:8000/inspector/resources/source-map.json_\n");
140 InspectorTest.addSniffer(Bindings.CompilerScriptMapping.prototype, " _sourceMapLoaded", onSourceMapLoaded); 140 InspectorTest.debuggerModel.sourceMapManager().addEventListener(
141 SDK.SourceMapManager.Events.SourceMapFailedToAttach, onSourc eMapLoaded, this);
141 142
142 function onSourceMapLoaded(script, uiSourceCodePath, sourceMap) 143 function onSourceMapLoaded(event)
143 { 144 {
145 var script = event.data.client;
144 if (script.sourceMapURL !== "http://127.0.0.1:8000/inspector/res ources/source-map.json_") 146 if (script.sourceMapURL !== "http://127.0.0.1:8000/inspector/res ources/source-map.json_")
145 return; 147 return;
146 InspectorTest.addResult("SourceMap Failed to load."); 148 InspectorTest.addResult("SourceMap Failed to load.");
147 var location = uiLocation(script, 0, 0); 149 var location = uiLocation(script, 0, 0);
148 InspectorTest.addResult(location.uiSourceCode.url().replace(/VM\ d+/g, "VM")); 150 InspectorTest.addResult(location.uiSourceCode.url().replace(/VM\ d+/g, "VM"));
149 next(); 151 next();
150 } 152 }
151 } 153 }
152 ]); 154 ]);
153 }; 155 };
154 156
155 </script> 157 </script>
156 158
157 </head> 159 </head>
158 160
159 <body onload="runTest()"> 161 <body onload="runTest()">
160 <p>Tests SourceMap and CompilerScriptMapping.</p> 162 <p>Tests SourceMap and CompilerScriptMapping.</p>
161 </body> 163 </body>
162 </html> 164 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/sources/debugger/worker-debugging-script-mapping.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698