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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/user-agent-setting.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <meta charset="utf8"> 3 <meta charset="utf8">
4 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src="../http/tests/inspector/inspector-test.js"></script>
5 <script src="../http/tests/inspector/network-test.js"></script> 5 <script src="../http/tests/inspector/network-test.js"></script>
6 <script> 6 <script>
7 7
8 function test() 8 function test()
9 { 9 {
10 var cases = [ 10 var cases = [
11 "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Ge cko) Chrome/%s Safari/537.36", 11 "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Ge cko) Chrome/%s Safari/537.36",
12 "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46 .0", 12 "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46 .0",
13 "GoogleChrome/%s Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36", 13 "GoogleChrome/%s Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36",
14 ]; 14 ];
15 15
16 for (var i = 0; i < cases.length; i++) { 16 for (var i = 0; i < cases.length; i++) {
17 var result = WebInspector.MultitargetNetworkManager.patchUserAgentWithCh romeVersion(cases[i]); 17 var result = SDK.MultitargetNetworkManager.patchUserAgentWithChromeVersi on(cases[i]);
18 InspectorTest.addResult(result); 18 InspectorTest.addResult(result);
19 } 19 }
20 20
21 InspectorTest.addResult("\nManually setting custom user agent"); 21 InspectorTest.addResult("\nManually setting custom user agent");
22 WebInspector.multitargetNetworkManager.setCustomUserAgentOverride("foobar wi th %s inside"); 22 SDK.multitargetNetworkManager.setCustomUserAgentOverride("foobar with %s ins ide");
23 23
24 InspectorTest.evaluateInPage("navigator.userAgent", step2); 24 InspectorTest.evaluateInPage("navigator.userAgent", step2);
25 25
26 function step2(result) 26 function step2(result)
27 { 27 {
28 InspectorTest.addResult(result.value) 28 InspectorTest.addResult(result.value)
29 InspectorTest.completeTest(); 29 InspectorTest.completeTest();
30 } 30 }
31 } 31 }
32 32
33 </script> 33 </script>
34 </head> 34 </head>
35 <body onload="runTest()"> 35 <body onload="runTest()">
36 </body> 36 </body>
37 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698