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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(CommandLine* command_line) override { |
157 CommandLine command_line_copy = *command_line; | 157 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 chromeos::GetOffTheRecordCommandLine(GetGoogleURL(), | 161 chromeos::GetOffTheRecordCommandLine(GetGoogleURL(), |
161 true, | 162 true, |
162 command_line_copy, | 163 command_line_copy, |
163 command_line); | 164 command_line); |
164 } | 165 } |
165 }; | 166 }; |
166 | 167 |
167 // This test verifies that the settings page is opened in the incognito window | 168 // This test verifies that the settings page is opened in the incognito window |
168 // in Guest Session (as well as all other windows in Guest session). | 169 // in Guest Session (as well as all other windows in Guest session). |
169 IN_PROC_BROWSER_TEST_F(BrowserGuestSessionNavigatorTest, | 170 IN_PROC_BROWSER_TEST_F(BrowserGuestSessionNavigatorTest, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 240 |
240 EXPECT_EQ(3u, chrome::GetTotalBrowserCount()); | 241 EXPECT_EQ(3u, chrome::GetTotalBrowserCount()); |
241 | 242 |
242 // The ShowWindowForUser should not have been called since the window is | 243 // The ShowWindowForUser should not have been called since the window is |
243 // already on the correct desktop. | 244 // already on the correct desktop. |
244 ASSERT_FALSE(manager->created_window()); | 245 ASSERT_FALSE(manager->created_window()); |
245 } | 246 } |
246 } | 247 } |
247 | 248 |
248 } // namespace | 249 } // namespace |
OLD | NEW |