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

Side by Side Diff: components/translate/core/common/translate_util_unittest.cc

Issue 93603006: Move Translate-related files to components/translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 11 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
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « components/translate/core/common/translate_util.cc ('k') | components/translate/language_detection/language_detection_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698