Index: chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc |
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc |
index 9bb0809b1846bca0d71f530b39683d29cc3964b3..734700f189e41e604f2e97272e8576070b0d735c 100644 |
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc |
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc |
@@ -512,20 +512,9 @@ class SafeBrowsingBlockingPageBrowserTest |
} |
bool WaitForReady() { |
- content::RenderViewHost* rvh = GetRenderViewHost(); |
- if (!rvh) |
- return false; |
- // Wait until all <script> tags have executed, including jstemplate. |
- // TODO(joaodasilva): it would be nice to avoid the busy loop, though in |
- // practice it spins at most once or twice. |
- std::string ready_state; |
- do { |
- scoped_ptr<base::Value> value = content::ExecuteScriptAndGetValue( |
- rvh->GetMainFrame(), "document.readyState"); |
- if (!value.get() || !value->GetAsString(&ready_state)) |
- return false; |
- } while (ready_state != "complete"); |
- return true; |
+ InterstitialPage* interstitial = InterstitialPage::GetInterstitialPage( |
+ browser()->tab_strip_model()->GetActiveWebContents()); |
mattm
2015/01/22 02:28:32
I think there should be a "if (!interstitial) retu
meacer
2015/01/22 03:17:50
Done.
|
+ return content::WaitForInterstitialReady(interstitial); |
} |
Visibility GetVisibility(const std::string& node_id) { |