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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc

Issue 2630773002: Avoid blocking while mapping an X11 window (Closed)
Patch Set: Address feedback Created 3 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc
index 5bb18d38c7c9089f01e7d7b43d41b0f7c8912652..6baa1e945acc0fdc4910e921f6d1e19a392be9db 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc
@@ -26,6 +26,7 @@
#include "content/public/common/content_features.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "ui/views/test/widget_test.h"
using testing::Eq;
using testing::Field;
@@ -332,7 +333,12 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, AutoSigninNoFocus) {
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(focused_window));
content::RunAllPendingInMessageLoop();
- EXPECT_FALSE(browser()->window()->IsActive());
+ gfx::NativeWindow window = browser()->window()->GetNativeWindow();
+ views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
+ ASSERT_NE(nullptr, widget);
+
+ views::test::WidgetActivationWaiter inactive_waiter(widget, false);
+ inactive_waiter.Wait();
ManagePasswordsBubbleView::set_auto_signin_toast_timeout(0);
SetupAutoSignin(std::move(local_credentials));
content::RunAllPendingInMessageLoop();
@@ -342,6 +348,7 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, AutoSigninNoFocus) {
focused_window->window()->Close();
browser()->window()->Activate();
content::RunAllPendingInMessageLoop();
- EXPECT_TRUE(browser()->window()->IsActive());
+ views::test::WidgetActivationWaiter active_waiter(widget, true);
+ active_waiter.Wait();
EXPECT_FALSE(IsBubbleShowing());
}

Powered by Google App Engine
This is Rietveld 408576698