| 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/browser/ui/browser_navigator_browsertest.h" | 5 #include "chrome/browser/ui/browser_navigator_browsertest.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/browser/chromeos/login/chrome_restart_request.h" | 10 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 void TestMultiUserWindowManager::RemoveObserver(Observer* observer) { | 146 void TestMultiUserWindowManager::RemoveObserver(Observer* observer) { |
| 147 } | 147 } |
| 148 | 148 |
| 149 GURL GetGoogleURL() { | 149 GURL GetGoogleURL() { |
| 150 return GURL("http://www.google.com/"); | 150 return GURL("http://www.google.com/"); |
| 151 } | 151 } |
| 152 | 152 |
| 153 // Subclass that tests navigation while in the Guest session. | 153 // Subclass that tests navigation while in the Guest session. |
| 154 class BrowserGuestSessionNavigatorTest: public BrowserNavigatorTest { | 154 class BrowserGuestSessionNavigatorTest: public BrowserNavigatorTest { |
| 155 protected: | 155 protected: |
| 156 virtual void SetUpCommandLine(CommandLine* command_line) override { | 156 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
| 157 CommandLine command_line_copy = *command_line; | 157 base::CommandLine command_line_copy = *command_line; |
| 158 command_line_copy.AppendSwitchASCII( | 158 command_line_copy.AppendSwitchASCII( |
| 159 chromeos::switches::kLoginProfile, "user"); | 159 chromeos::switches::kLoginProfile, "user"); |
| 160 command_line_copy.AppendSwitch(chromeos::switches::kGuestSession); | 160 command_line_copy.AppendSwitch(chromeos::switches::kGuestSession); |
| 161 chromeos::GetOffTheRecordCommandLine(GetGoogleURL(), | 161 chromeos::GetOffTheRecordCommandLine(GetGoogleURL(), |
| 162 true, | 162 true, |
| 163 command_line_copy, | 163 command_line_copy, |
| 164 command_line); | 164 command_line); |
| 165 } | 165 } |
| 166 }; | 166 }; |
| 167 | 167 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 EXPECT_EQ(3u, chrome::GetTotalBrowserCount()); | 241 EXPECT_EQ(3u, chrome::GetTotalBrowserCount()); |
| 242 | 242 |
| 243 // The ShowWindowForUser should not have been called since the window is | 243 // The ShowWindowForUser should not have been called since the window is |
| 244 // already on the correct desktop. | 244 // already on the correct desktop. |
| 245 ASSERT_FALSE(manager->created_window()); | 245 ASSERT_FALSE(manager->created_window()); |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace | 249 } // namespace |
| OLD | NEW |