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

Unified Diff: chrome/renderer/content_settings_observer_browsertest.cc

Issue 2870633002: Use ScopedTaskEnvironment instead of MessageLoop in RenderViewTest. (Closed)
Patch Set: fix-build-error Created 3 years, 7 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/renderer/content_settings_observer_browsertest.cc
diff --git a/chrome/renderer/content_settings_observer_browsertest.cc b/chrome/renderer/content_settings_observer_browsertest.cc
index daa026988567e768309eaee6ee8fc8a652aac6e1..21cd6288cdf786c6cf9db8b81bcdc65d928fd0ba 100644
--- a/chrome/renderer/content_settings_observer_browsertest.cc
+++ b/chrome/renderer/content_settings_observer_browsertest.cc
@@ -4,6 +4,7 @@
#include <stddef.h>
+#include "base/run_loop.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/content_settings_observer.h"
#include "chrome/test/base/chrome_render_view_test.h"
@@ -114,7 +115,7 @@ TEST_F(ChromeRenderViewTest, JSBlockSentAfterPageLoad) {
observer->SetContentSettingRules(&content_setting_rules);
// Make sure no pending messages are in the queue.
- ProcessPendingMessages();
+ base::RunLoop().RunUntilIdle();
render_thread_->sink().ClearMessages();
// 3. Reload page.
@@ -122,7 +123,7 @@ TEST_F(ChromeRenderViewTest, JSBlockSentAfterPageLoad) {
url_str.append(kHtml);
GURL url(url_str);
Reload(url);
- ProcessPendingMessages();
+ base::RunLoop().RunUntilIdle();
// 4. Verify that the notification that javascript was blocked is sent after
// the navigation notification is sent.

Powered by Google App Engine
This is Rietveld 408576698