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. |