OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/chromeos/login/chrome_restart_request.h" | 8 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
9 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 9 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
10 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_test.h" | 10 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_test.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 EXPECT_NE(browser(), params.browser); | 59 EXPECT_NE(browser(), params.browser); |
60 EXPECT_EQ(incognito_browser, params.browser); | 60 EXPECT_EQ(incognito_browser, params.browser); |
61 EXPECT_EQ(2, incognito_browser->tab_strip_model()->count()); | 61 EXPECT_EQ(2, incognito_browser->tab_strip_model()->count()); |
62 EXPECT_EQ(GURL("chrome://chrome/settings"), | 62 EXPECT_EQ(GURL("chrome://chrome/settings"), |
63 incognito_browser->tab_strip_model()->GetActiveWebContents()-> | 63 incognito_browser->tab_strip_model()->GetActiveWebContents()-> |
64 GetURL()); | 64 GetURL()); |
65 } | 65 } |
66 | 66 |
67 // Test that in multi user environments a newly created browser gets created | 67 // Test that in multi user environments a newly created browser gets created |
68 // on the same desktop as the browser is shown on. | 68 // on the same desktop as the browser is shown on. |
| 69 // |
| 70 // Flakily hits assert: http://crbug.com/469717 |
| 71 #if !defined(NDEBUG) |
| 72 #define MAYBE_Browser_Gets_Created_On_Visiting_Desktop \ |
| 73 DISABLED_Browser_Gets_Created_On_Visiting_Desktop |
| 74 #else |
| 75 #define MAYBE_Browser_Gets_Created_On_Visiting_Desktop \ |
| 76 Browser_Gets_Created_On_Visiting_Desktop |
| 77 #endif |
69 IN_PROC_BROWSER_TEST_F(BrowserGuestSessionNavigatorTest, | 78 IN_PROC_BROWSER_TEST_F(BrowserGuestSessionNavigatorTest, |
70 Browser_Gets_Created_On_Visiting_Desktop) { | 79 MAYBE_Browser_Gets_Created_On_Visiting_Desktop) { |
71 // Test 1: Test that a browser created from a visiting browser will be on the | 80 // Test 1: Test that a browser created from a visiting browser will be on the |
72 // same visiting desktop. | 81 // same visiting desktop. |
73 { | 82 { |
74 const std::string desktop_user_id = "desktop_user_id@fake.com"; | 83 const std::string desktop_user_id = "desktop_user_id@fake.com"; |
75 TestMultiUserWindowManager* manager = | 84 TestMultiUserWindowManager* manager = |
76 new TestMultiUserWindowManager(browser(), desktop_user_id); | 85 new TestMultiUserWindowManager(browser(), desktop_user_id); |
77 | 86 |
78 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); | 87 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); |
79 | 88 |
80 // Navigate to the settings page. | 89 // Navigate to the settings page. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 121 |
113 EXPECT_EQ(3u, chrome::GetTotalBrowserCount()); | 122 EXPECT_EQ(3u, chrome::GetTotalBrowserCount()); |
114 | 123 |
115 // The ShowWindowForUser should not have been called since the window is | 124 // The ShowWindowForUser should not have been called since the window is |
116 // already on the correct desktop. | 125 // already on the correct desktop. |
117 ASSERT_FALSE(manager->created_window()); | 126 ASSERT_FALSE(manager->created_window()); |
118 } | 127 } |
119 } | 128 } |
120 | 129 |
121 } // namespace | 130 } // namespace |
OLD | NEW |