OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/string_split.h" | 8 #include "base/strings/string_split.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 void CheckUserAgentStringOrdering(bool mobile_device) { | 14 void CheckUserAgentStringOrdering(bool mobile_device) { |
15 std::vector<std::string> pieces; | 15 std::vector<std::string> pieces; |
16 | 16 |
17 // Check if the pieces of the user agent string come in the correct order. | 17 // Check if the pieces of the user agent string come in the correct order. |
18 chrome::ChromeContentClient content_client; | 18 chrome::ChromeContentClient content_client; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 CheckUserAgentStringOrdering(false); | 75 CheckUserAgentStringOrdering(false); |
76 | 76 |
77 // Do it for mobile devices. | 77 // Do it for mobile devices. |
78 command_line->AppendSwitch(switches::kUseMobileUserAgent); | 78 command_line->AppendSwitch(switches::kUseMobileUserAgent); |
79 ASSERT_TRUE(command_line->HasSwitch(switches::kUseMobileUserAgent)); | 79 ASSERT_TRUE(command_line->HasSwitch(switches::kUseMobileUserAgent)); |
80 CheckUserAgentStringOrdering(true); | 80 CheckUserAgentStringOrdering(true); |
81 #endif | 81 #endif |
82 } | 82 } |
83 | 83 |
84 } // namespace chrome_common | 84 } // namespace chrome_common |
OLD | NEW |