3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
9 "http://www.example.com/foo/jquery-1.7-min.js", "/jquery\\-1\\.7\\-min\\.js$",
10 "https://www.example.com/jquery.js?version=1.7", "/jquery\\.js\\b",
11 "http://www.google.com/jsapi", "/jsapi$",
12 "https://www.google.com/jsapi/", "/jsapi/$",
13 "http://www.google.com", "www\\.google\\.com$",
14 "http://www.google.com/", "www\\.google\\.com\\b",
15 "data:text/html,foo", "",
18 "chrome-extension://extensionName/main.js", "^chrome-extension://extensionName\\b.*/main\\.js$",
19 "extensions::unload_events", "^extensions::unload_events$",
22 for (var i
= 0; i
< testCases
.length
; i
+= 2) {
23 var url
= testCases
[i
];
24 InspectorTest
.addResult("Testing \"" + url
+ "\"");
25 var regexValue
= WebInspector
.BlackboxSupport
._urlToRegExpString(url
);
26 InspectorTest
.assertEquals(testCases
[i
+ 1], regexValue
);
29 var regex
= new RegExp(regexValue
);
30 InspectorTest
.assertTrue(regex
.test(url
), "FAIL: Generated RegExp does not match the URL");
33 InspectorTest
.addResult("\nPASS");
34 InspectorTest
.completeTest();
40 <body onload=
"runTest()">
42 Tests framework blackbox patterns for various URLs.