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

Side by Side Diff: LayoutTests/inspector/load-file-resource-for-frontend.html

Issue 23102017: DevTools: fix source maps loading from file scheme urls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test Created 7 years, 3 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script>
5 function test()
6 {
7 function testLoadForURL(url, next)
8 {
9 var documentURL = WebInspector.resourceTreeModel.mainFrame.url;
10 var lastIndexOfSlash = documentURL.lastIndexOf("/");
11 var urlPrefix = documentURL.substr(0, lastIndexOfSlash + 1);
12 var fullURL = urlPrefix + url;
13 InspectorTest.addResult("Loading resource from " + url);
14 NetworkAgent.loadResourceForFrontend(WebInspector.resourceTreeModel.main Frame.id, fullURL, undefined, callback);
15
16 function callback(error, statusCode, headers, content)
17 {
18 if (error)
19 InspectorTest.addResult("Failed: " + error);
20 else {
21 InspectorTest.addResult("Content: " + content);
22 }
23 InspectorTest.runAfterPendingDispatches(next);
24 }
25 }
26
27 InspectorTest.runTestSuite([
28 function testResourceFromFileScheme(next)
29 {
30 testLoadForURL("resources/file-resource-to-load-for-frontend.txt", n ext);
31 },
32 ]);
33 }
34 </script>
35 </head>
36 <body onload="runTest()">
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698