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

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

Issue 2300403003: DevTools: patch browser's Chrome version into Chrome user agents for emulation (Closed)
Patch Set: renames Created 4 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 | third_party/WebKit/LayoutTests/inspector/user-agent-setting-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 <meta charset="utf8">
4 <script src="../http/tests/inspector/inspector-test.js"></script>
5 <script src="../http/tests/inspector/network-test.js"></script>
6 <script>
7
8 function test()
9 {
10 var cases = [
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",
13 "GoogleChrome/%s Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36",
14 ];
15
16 for (var i = 0; i < cases.length; i++) {
17 var result = WebInspector.MultitargetNetworkManager.patchUserAgentWithCh romeVersion(cases[i]);
18 InspectorTest.addResult(result);
19 }
20
21 InspectorTest.addResult("\nManually setting custom user agent");
22 WebInspector.multitargetNetworkManager.setCustomUserAgentOverride("foobar wi th %s inside");
23
24 InspectorTest.evaluateInPage("navigator.userAgent", step2);
25
26 function step2(result)
27 {
28 InspectorTest.addResult(result.value)
29 InspectorTest.completeTest();
30 }
31 }
32
33 </script>
34 </head>
35 <body onload="runTest()">
36 </body>
37 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/user-agent-setting-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698