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

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

Issue 1315193014: DevTools: allow blackboxing anonymous scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | Source/devtools/front_end/bindings/BlackboxSupport.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 function test() 6 function test()
7 { 7 {
8 var testCases = [ 8 var testCases = [
9 "http://www.example.com/foo/jquery-1.7-min.js", "/jquery\\-1\\.7\\-min\\ .js$", 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", 10 "https://www.example.com/jquery.js?version=1.7", "/jquery\\.js\\b",
11 "http://www.google.com/jsapi", "/jsapi$", 11 "http://www.google.com/jsapi", "/jsapi$",
12 "https://www.google.com/jsapi/", "/jsapi/$", 12 "https://www.google.com/jsapi/", "/jsapi/$",
13 "http://www.google.com", "www\\.google\\.com$", 13 "http://www.google.com", "www\\.google\\.com$",
14 "http://www.google.com/", "www\\.google\\.com\\b", 14 "http://www.google.com/", "www\\.google\\.com\\b",
15 "data:text/html,foo", "", 15 "data:text/html,foo", "",
16 "about:blank", "", 16 "about:blank", "",
17 "", "", 17 "", "^$",
18 "chrome-extension://extensionName/main.js", "^chrome-extension://extensi onName\\b.*/main\\.js$", 18 "chrome-extension://extensionName/main.js", "^chrome-extension://extensi onName\\b.*/main\\.js$",
19 "extensions::unload_events", "^extensions::unload_events$", 19 "extensions::unload_events", "^extensions::unload_events$",
20 ]; 20 ];
21 21
22 for (var i = 0; i < testCases.length; i += 2) { 22 for (var i = 0; i < testCases.length; i += 2) {
23 var url = testCases[i]; 23 var url = testCases[i];
24 InspectorTest.addResult("Testing \"" + url + "\""); 24 InspectorTest.addResult("Testing \"" + url + "\"");
25 var regexValue = WebInspector.BlackboxSupport._urlToRegExpString(url); 25 var regexValue = WebInspector.BlackboxSupport._urlToRegExpString(url);
26 InspectorTest.assertEquals(testCases[i + 1], regexValue); 26 InspectorTest.assertEquals(testCases[i + 1], regexValue);
27 if (!regexValue) 27 if (!regexValue)
28 continue; 28 continue;
29 var regex = new RegExp(regexValue); 29 var regex = new RegExp(regexValue);
30 InspectorTest.assertTrue(regex.test(url), "FAIL: Generated RegExp does n ot match the URL"); 30 InspectorTest.assertTrue(regex.test(url), "FAIL: Generated RegExp does n ot match the URL");
31 } 31 }
32 32
33 InspectorTest.addResult("\nPASS"); 33 InspectorTest.addResult("\nPASS");
34 InspectorTest.completeTest(); 34 InspectorTest.completeTest();
35 } 35 }
36 36
37 </script> 37 </script>
38 </head> 38 </head>
39 39
40 <body onload="runTest()"> 40 <body onload="runTest()">
41 <p> 41 <p>
42 Tests framework blackbox patterns for various URLs. 42 Tests framework blackbox patterns for various URLs.
43 </p> 43 </p>
44 </body> 44 </body>
45 </html> 45 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/bindings/BlackboxSupport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698