| 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/webui/options/options_ui_browsertest.h" | 5 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 278 |
| 279 SignOutWaiter sign_out_waiter(signin); | 279 SignOutWaiter sign_out_waiter(signin); |
| 280 | 280 |
| 281 ASSERT_TRUE(content::ExecuteScript( | 281 ASSERT_TRUE(content::ExecuteScript( |
| 282 browser()->tab_strip_model()->GetActiveWebContents(), | 282 browser()->tab_strip_model()->GetActiveWebContents(), |
| 283 "$('stop-syncing-ok').click();")); | 283 "$('stop-syncing-ok').click();")); |
| 284 | 284 |
| 285 sign_out_waiter.Wait(); | 285 sign_out_waiter.Wait(); |
| 286 | 286 |
| 287 EXPECT_TRUE(browser()->profile()->GetProfileName() != user); | 287 EXPECT_TRUE(browser()->profile()->GetProfileName() != user); |
| 288 EXPECT_TRUE(signin->GetAuthenticatedUsername().empty()); | 288 EXPECT_FALSE(signin->IsAuthenticated()); |
| 289 } | 289 } |
| 290 | 290 |
| 291 // Regression test for http://crbug.com/301436, excluded on Chrome OS because | 291 // Regression test for http://crbug.com/301436, excluded on Chrome OS because |
| 292 // profile management in the settings UI exists on desktop platforms only. | 292 // profile management in the settings UI exists on desktop platforms only. |
| 293 IN_PROC_BROWSER_TEST_F(OptionsUIBrowserTest, NavigateBackFromOverlayDialog) { | 293 IN_PROC_BROWSER_TEST_F(OptionsUIBrowserTest, NavigateBackFromOverlayDialog) { |
| 294 NavigateToSettingsFrame(); | 294 NavigateToSettingsFrame(); |
| 295 | 295 |
| 296 // Click a button that opens an overlay dialog. | 296 // Click a button that opens an overlay dialog. |
| 297 content::WebContents* contents = | 297 content::WebContents* contents = |
| 298 browser()->tab_strip_model()->GetActiveWebContents(); | 298 browser()->tab_strip_model()->GetActiveWebContents(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 run_loop.Run(); | 330 run_loop.Run(); |
| 331 | 331 |
| 332 // Verify that the settings page has updated and lists two profiles. | 332 // Verify that the settings page has updated and lists two profiles. |
| 333 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( | 333 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( |
| 334 contents, javascript, &profiles)); | 334 contents, javascript, &profiles)); |
| 335 EXPECT_EQ(2, profiles); | 335 EXPECT_EQ(2, profiles); |
| 336 } | 336 } |
| 337 #endif | 337 #endif |
| 338 | 338 |
| 339 } // namespace options | 339 } // namespace options |
| OLD | NEW |