Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: trunk/src/chrome/browser/ui/views/new_avatar_menu_button_browsertest.cc

Issue 75483005: Revert 235801 "Fix crash when locking a profile. The crash is ha..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/profiles/profiles_state.h" 10 #include "chrome/browser/profiles/profiles_state.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 content::WindowedNotificationObserver window_close_observer( 103 content::WindowedNotificationObserver window_close_observer(
104 chrome::NOTIFICATION_BROWSER_CLOSED, 104 chrome::NOTIFICATION_BROWSER_CLOSED,
105 content::Source<Browser>(browser())); 105 content::Source<Browser>(browser()));
106 106
107 AvatarMenu* menu = 107 AvatarMenu* menu =
108 ProfileChooserView::profile_bubble_->avatar_menu_.get(); 108 ProfileChooserView::profile_bubble_->avatar_menu_.get();
109 const AvatarMenu::Item& menu_item_before = 109 const AvatarMenu::Item& menu_item_before =
110 menu->GetItemAt(menu->GetActiveProfileIndex()); 110 menu->GetItemAt(menu->GetActiveProfileIndex());
111 EXPECT_FALSE(menu_item_before.signin_required); 111 EXPECT_FALSE(menu_item_before.signin_required);
112 112
113 ui::MouseEvent mouse_ev(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0);
114 menu->SetLogoutURL("about:blank");
115
113 ProfileChooserView::profile_bubble_->LinkClicked( 116 ProfileChooserView::profile_bubble_->LinkClicked(
114 static_cast<views::Link*>( 117 static_cast<views::Link*>(
115 ProfileChooserView::profile_bubble_->signout_current_profile_link_), 118 ProfileChooserView::profile_bubble_->signout_current_profile_link_),
116 0); 119 0);
117 120
118 EXPECT_TRUE(menu->GetItemAt(menu->GetActiveProfileIndex()).signin_required); 121 EXPECT_TRUE(menu->GetItemAt(menu->GetActiveProfileIndex()).signin_required);
119 122
120 window_close_observer.Wait(); // Rely on test timeout for failure indication. 123 window_close_observer.Wait(); // Rely on test timeout for failure indication.
121 EXPECT_TRUE(browser_list->empty()); 124 EXPECT_TRUE(browser_list->empty());
122 125
123 // If the User Manager hasn't shown yet, wait for it to show up. 126 // If the User Manager hasn't shown yet, wait for it to show up.
124 if (!UserManagerView::IsShowing()) 127 if (!UserManagerView::IsShowing())
125 base::MessageLoop::current()->RunUntilIdle(); 128 base::MessageLoop::current()->RunUntilIdle();
126 129
127 // We need to hide the User Manager or else the process can't die. 130 // We need to hide the User Manager or else the process can't die.
128 chrome::HideUserManager(); 131 chrome::HideUserManager();
129 } 132 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698