3 <script src=
"../http/tests/inspector/inspector-test.js"></script>
7 function testLoadForURL(url
, next
)
9 var documentURL
= InspectorTest
.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
);
15 WebInspector
.ResourceLoader
.load(fullURL
, null, callback
);
17 function callback(statusCode
, headers
, content
)
20 InspectorTest
.addResult("Failed: " + statusCode
);
22 InspectorTest
.addResult("Content: " + content
);
24 InspectorTest
.runAfterPendingDispatches(next
);
28 InspectorTest
.runTestSuite([
29 function testResourceFromFileScheme(next
)
31 testLoadForURL("resources/file-resource-to-load-for-frontend.txt", next
);
37 <body onload=
"runTest()">