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

Unified Diff: chrome/browser/ui/views/sync/one_click_signin_dialog_view_unittest.cc

Issue 2402553005: Do not run a nested loop in content::DeferredQuitRunLoop. (Closed)
Patch Set: fix OneClickSigninDialogViewTest Created 4 years, 2 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
« no previous file with comments | « chrome/browser/sync/test/integration/bookmarks_helper.cc ('k') | content/public/test/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/sync/one_click_signin_dialog_view_unittest.cc
diff --git a/chrome/browser/ui/views/sync/one_click_signin_dialog_view_unittest.cc b/chrome/browser/ui/views/sync/one_click_signin_dialog_view_unittest.cc
index 28a5c37a2edabc5d467e56a7c5a8b4397ef318db..0d5284f8bf0eae05b77a96c2c122d8eb37914b5d 100644
--- a/chrome/browser/ui/views/sync/one_click_signin_dialog_view_unittest.cc
+++ b/chrome/browser/ui/views/sync/one_click_signin_dialog_view_unittest.cc
@@ -11,10 +11,10 @@
#include "base/bind_helpers.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "base/run_loop.h"
#include "chrome/browser/ui/sync/one_click_signin_links_delegate.h"
#include "chrome/browser/ui/views/chrome_constrained_window_views_client.h"
#include "components/constrained_window/constrained_window_views.h"
-#include "content/public/test/test_utils.h"
#include "ui/events/event_utils.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/test/views_test_base.h"
@@ -122,7 +122,7 @@ class OneClickSigninDialogViewTest : public views::ViewsTestBase,
TEST_F(OneClickSigninDialogViewTest, ShowDialog) {
ShowOneClickSigninDialog();
- content::RunAllPendingInMessageLoop();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(OneClickSigninDialogView::IsShowing());
}
@@ -190,7 +190,7 @@ TEST_F(OneClickSigninDialogViewTest, LearnMoreLink) {
// View should still be showing and the OnLearnMoreLinkClicked method
// of the delegate should have been called with |is_dialog| == true.
- content::RunAllPendingInMessageLoop();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(OneClickSigninDialogView::IsShowing());
EXPECT_EQ(1, learn_more_click_count_);
}
« no previous file with comments | « chrome/browser/sync/test/integration/bookmarks_helper.cc ('k') | content/public/test/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698