| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ASSERT_TRUE(RLZTracker::GetAccessPointRlz(point, rlz)); | 39 ASSERT_TRUE(RLZTracker::GetAccessPointRlz(point, rlz)); |
| 40 } | 40 } |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 } // namespace | 43 } // namespace |
| 44 | 44 |
| 45 class LoginUtilsTest : public InProcessBrowserTest { | 45 class LoginUtilsTest : public InProcessBrowserTest { |
| 46 public: | 46 public: |
| 47 LoginUtilsTest() {} | 47 LoginUtilsTest() {} |
| 48 | 48 |
| 49 virtual void SetUpCommandLine(CommandLine* command_line) override { | 49 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
| 50 // Initialize the test server early, so that we can use its base url for | 50 // Initialize the test server early, so that we can use its base url for |
| 51 // the command line flags. | 51 // the command line flags. |
| 52 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 52 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 53 | 53 |
| 54 // Use the login manager screens and the gaia auth extension. | 54 // Use the login manager screens and the gaia auth extension. |
| 55 command_line->AppendSwitch(switches::kLoginManager); | 55 command_line->AppendSwitch(switches::kLoginManager); |
| 56 command_line->AppendSwitch(switches::kForceLoginManagerInTests); | 56 command_line->AppendSwitch(switches::kForceLoginManagerInTests); |
| 57 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 57 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
| 58 command_line->AppendSwitchASCII(::switches::kAuthExtensionPath, | 58 command_line->AppendSwitchASCII(::switches::kAuthExtensionPath, |
| 59 "gaia_auth"); | 59 "gaia_auth"); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 RLZTracker::ChromeHomePage(), | 150 RLZTracker::ChromeHomePage(), |
| 151 &rlz_string), | 151 &rlz_string), |
| 152 loop.QuitClosure()); | 152 loop.QuitClosure()); |
| 153 loop.Run(); | 153 loop.Run(); |
| 154 EXPECT_EQ(base::string16(), rlz_string); | 154 EXPECT_EQ(base::string16(), rlz_string); |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 #endif | 157 #endif |
| 158 | 158 |
| 159 } // namespace chromeos | 159 } // namespace chromeos |
| OLD | NEW |