| 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 <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/common/channel_info.h" |
| 14 #include "components/version_info/version_info.h" |
| 13 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
| 14 #include "extensions/common/constants.h" | 16 #include "extensions/common/constants.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| 17 #include "url/origin.h" | 19 #include "url/origin.h" |
| 18 #include "url/url_util.h" | 20 #include "url/url_util.h" |
| 19 | 21 |
| 20 namespace { | 22 namespace { |
| 21 | 23 |
| 22 void CheckUserAgentStringOrdering(bool mobile_device) { | 24 void CheckUserAgentStringOrdering(bool mobile_device) { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 extensions::kExtensionScheme, | 170 extensions::kExtensionScheme, |
| 169 url::Component(0, strlen(extensions::kExtensionScheme)))); | 171 url::Component(0, strlen(extensions::kExtensionScheme)))); |
| 170 | 172 |
| 171 GURL extension_url( | 173 GURL extension_url( |
| 172 "chrome-extension://abcdefghijklmnopqrstuvwxyzabcdef/foo.html"); | 174 "chrome-extension://abcdefghijklmnopqrstuvwxyzabcdef/foo.html"); |
| 173 url::Origin origin(extension_url); | 175 url::Origin origin(extension_url); |
| 174 EXPECT_EQ("chrome-extension://abcdefghijklmnopqrstuvwxyzabcdef", | 176 EXPECT_EQ("chrome-extension://abcdefghijklmnopqrstuvwxyzabcdef", |
| 175 origin.Serialize()); | 177 origin.Serialize()); |
| 176 } | 178 } |
| 177 | 179 |
| 180 TEST(ChromeContentClientTest, ChromeChannel) { |
| 181 version_info::Channel channel = chrome::GetChannel(); |
| 182 |
| 183 EXPECT_EQ(channel, version_info::Channel::UNKNOWN); |
| 184 } |
| 185 |
| 178 } // namespace chrome_common | 186 } // namespace chrome_common |
| OLD | NEW |