diff options
author | lfg <lfg@chromium.org> | 2015-02-10 16:59:35 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-11 01:00:29 +0000 |
commit | d40b47010ab680dd4a1a1071dbad5e2c5efaf481 (patch) | |
tree | ad8080c378afc1ceda86efc92cccaf7a4d6eacdd | |
parent | c846fe0ecf2cb3d833e8c8c1d0bac30453f726a9 (diff) | |
download | chromium_src-d40b47010ab680dd4a1a1071dbad5e2c5efaf481.zip chromium_src-d40b47010ab680dd4a1a1071dbad5e2c5efaf481.tar.gz chromium_src-d40b47010ab680dd4a1a1071dbad5e2c5efaf481.tar.bz2 |
Listen to LOAD_STOP notification instead of NAV_ENTRY_COMMITED when navigating iframes in browser tests.
BUG=436250
Review URL: https://codereview.chromium.org/876183003
Cr-Commit-Position: refs/heads/master@{#315695}
-rw-r--r-- | content/public/test/browser_test_utils.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc index 5de8137..173b7cb 100644 --- a/content/public/test/browser_test_utils.cc +++ b/content/public/test/browser_test_utils.cc @@ -262,18 +262,13 @@ scoped_ptr<net::test_server::HttpResponse> CrossSiteRedirectResponseHandler( bool NavigateIframeToURL(WebContents* web_contents, std::string iframe_id, const GURL& url) { - // TODO(creis): This should wait for LOAD_STOP, but cross-site subframe - // navigations generate extra DidStartLoading and DidStopLoading messages. - // Until we replace swappedout:// with frame proxies, we need to listen for - // something else. For now, we trigger NEW_SUBFRAME navigations and listen - // for commit. See https://crbug.com/436250. std::string script = base::StringPrintf( "setTimeout(\"" "var iframes = document.getElementById('%s');iframes.src='%s';" "\",0)", iframe_id.c_str(), url.spec().c_str()); WindowedNotificationObserver load_observer( - NOTIFICATION_NAV_ENTRY_COMMITTED, + NOTIFICATION_LOAD_STOP, Source<NavigationController>(&web_contents->GetController())); bool result = ExecuteScript(web_contents, script); load_observer.Wait(); |