3 <script src=
"../http/tests/inspector/inspector-test.js"></script>
8 function findLoadedModule()
10 var modules
= self
.runtime
._modules
;
11 for (var module
of modules
) {
16 InspectorTest
.addResult("Fail: not a single module loaded");
17 InspectorTest
.completeTest();
20 InspectorTest
.runTestSuite([
21 function substituteURL(next
)
23 var module
= findLoadedModule();
24 var moduleName
= module
._name
;
25 module
._name
= "fake_module";
27 testValue("no url here");
29 testValue("@url(file.js)");
30 testValue("before @url(long/path/to/the/file.png) after");
31 testValue("@url(first.png)@url(second.gif)");
32 testValue("a lot of @url(stuff) in a@url(single)line and more url() @@url (not/a/resource.gif)");
34 function testValue(value
)
36 InspectorTest
.addResult("\"" + value
+ "\" -> \"" + module
.substituteURL(value
) + "\"");
39 module
._name
= moduleName
;
48 <body onload=
"runTest()">
50 This test checks various Runtime functions.