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

Side by Side Diff: LayoutTests/inspector/sources/debugger/frameworks-blackbox-patterns.html

Issue 548323002: DevTools: Blackbox content scripts - frontend. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: added a test Created 6 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
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/frameworks-blackbox-patterns-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script>
5
6 function test()
7 {
8 var testCases = [
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 "data:text/html,foo", "",
14 "about:blank", "",
15 "chrome-extension://extensionName/main.js", "^chrome-extension://extensi onName\\b.*/main\\.js$",
16 "extensions::unload_events", "^extensions::unload_events$",
17 ];
18
19 for (var i = 0; i < testCases.length; i += 2) {
20 var url = testCases[i];
21 InspectorTest.addResult("Testing " + url);
22 var regexValue = WebInspector.BlackboxSupport._urlToRegExpString(url);
23 InspectorTest.assertEquals(testCases[i + 1], regexValue);
24 if (!regexValue)
25 continue;
26 var regex = new RegExp(regexValue);
27 InspectorTest.assertTrue(regex.test(url), "FAIL: Generated RegExp does n ot match the URL");
28 }
29
30 InspectorTest.addResult("\nPASS");
31 InspectorTest.completeTest();
32 }
33
34 </script>
35 </head>
36
37 <body onload="runTest()">
38 <p>
39 Tests framework blackbox patterns for various URLs.
40 </p>
41 </body>
42 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/frameworks-blackbox-patterns-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698