OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/translate/common/translate_util.h" | 5 #include "components/translate/core/common/translate_util.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "components/translate/common/translate_switches.h" | 8 #include "components/translate/core/common/translate_switches.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 typedef testing::Test TranslateUtilTest; | 12 typedef testing::Test TranslateUtilTest; |
13 | 13 |
14 // Tests that synonym language code is converted to one used in supporting list. | 14 // Tests that synonym language code is converted to one used in supporting list. |
15 TEST_F(TranslateUtilTest, ToTranslateLanguageSynonym) { | 15 TEST_F(TranslateUtilTest, ToTranslateLanguageSynonym) { |
16 std::string language; | 16 std::string language; |
17 | 17 |
18 language = std::string("nb"); | 18 language = std::string("nb"); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 GURL origin = translate::GetTranslateSecurityOrigin(); | 87 GURL origin = translate::GetTranslateSecurityOrigin(); |
88 EXPECT_EQ(std::string(translate::kSecurityOrigin), origin.spec()); | 88 EXPECT_EQ(std::string(translate::kSecurityOrigin), origin.spec()); |
89 | 89 |
90 const std::string running_origin("http://www.tamurayukari.com/"); | 90 const std::string running_origin("http://www.tamurayukari.com/"); |
91 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 91 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
92 command_line->AppendSwitchASCII(translate::switches::kTranslateSecurityOrigin, | 92 command_line->AppendSwitchASCII(translate::switches::kTranslateSecurityOrigin, |
93 running_origin); | 93 running_origin); |
94 GURL modified_origin = translate::GetTranslateSecurityOrigin(); | 94 GURL modified_origin = translate::GetTranslateSecurityOrigin(); |
95 EXPECT_EQ(running_origin, modified_origin.spec()); | 95 EXPECT_EQ(running_origin, modified_origin.spec()); |
96 } | 96 } |
OLD | NEW |