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

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

Issue 818103002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/core/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/core/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"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 language = std::string("en"); 55 language = std::string("en");
56 translate::ToChromeLanguageSynonym(&language); 56 translate::ToChromeLanguageSynonym(&language);
57 EXPECT_EQ("en", language); 57 EXPECT_EQ("en", language);
58 } 58 }
59 59
60 TEST_F(TranslateUtilTest, SecurityOrigin) { 60 TEST_F(TranslateUtilTest, SecurityOrigin) {
61 GURL origin = translate::GetTranslateSecurityOrigin(); 61 GURL origin = translate::GetTranslateSecurityOrigin();
62 EXPECT_EQ(std::string(translate::kSecurityOrigin), origin.spec()); 62 EXPECT_EQ(std::string(translate::kSecurityOrigin), origin.spec());
63 63
64 const std::string running_origin("http://www.tamurayukari.com/"); 64 const std::string running_origin("http://www.tamurayukari.com/");
65 CommandLine* command_line = CommandLine::ForCurrentProcess(); 65 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
66 command_line->AppendSwitchASCII(translate::switches::kTranslateSecurityOrigin, 66 command_line->AppendSwitchASCII(translate::switches::kTranslateSecurityOrigin,
67 running_origin); 67 running_origin);
68 GURL modified_origin = translate::GetTranslateSecurityOrigin(); 68 GURL modified_origin = translate::GetTranslateSecurityOrigin();
69 EXPECT_EQ(running_origin, modified_origin.spec()); 69 EXPECT_EQ(running_origin, modified_origin.spec());
70 } 70 }
OLDNEW
« no previous file with comments | « components/translate/core/common/translate_util.cc ('k') | components/user_manager/user_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698