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

Unified Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 306893002: Use a data url in DidStopLoadingDetailsWithPending test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl_browsertest.cc
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index 64c209321285a4da50f0a869fc6102033eeec6b3..1f0586cd33dd4a7dcc04181c9f7ee76ed41225d2 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -97,6 +97,7 @@ class NavigateOnCommitObserver : public WebContentsObserver {
const LoadCommittedDetails& load_details) OVERRIDE {
if (!done_) {
done_ = true;
+ shell_->Stop();
shell_->LoadURL(url_);
}
}
@@ -212,6 +213,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MAYBE_DidStopLoadingDetailsWithPending) {
ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
+ GURL url("data:text/html,<div>test</div>");
// Listen for the first load to stop.
LoadStopNotificationObserver load_observer(
@@ -221,10 +223,10 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
// is started.
NavigateOnCommitObserver commit_observer(
shell(), embedded_test_server()->GetURL("/title2.html"));
- NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html"));
+ NavigateToURL(shell(), url);
load_observer.Wait();
- EXPECT_EQ("/title1.html", load_observer.url_.path());
+ EXPECT_EQ(url, load_observer.url_);
EXPECT_EQ(0, load_observer.session_index_);
EXPECT_EQ(&shell()->web_contents()->GetController(),
load_observer.controller_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698