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 28a1ab37940c517c1c9d9dbc01674bec55a3cd78..6896c7a7f242cb9815051d5f9321b336c3edfa16 100644 |
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc |
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc |
@@ -633,6 +633,20 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, |
ResourceDispatcherHost::Get()->SetDelegate(nullptr); |
} |
+// Test for eTLD+1 of the top page. |
+IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, RapporUrlOfTopPage) { |
+ host_resolver()->AddRule("*", "127.0.0.1"); |
+ ASSERT_TRUE(embedded_test_server()->Start()); |
+ |
+ TestNavigationObserver tab_observer(shell()->web_contents(), 1); |
+ GURL url(embedded_test_server()->GetURL("foo.com", "/title2.html")); |
+ shell()->LoadURL(url); |
+ tab_observer.Wait(); |
+ EXPECT_EQ(std::string("foo.com"), |
+ static_cast<WebContentsImpl*>(shell()->web_contents()) |
+ ->GetRapporCommittedUrl()); |
+} |
+ |
struct FirstVisuallyNonEmptyPaintObserver : public WebContentsObserver { |
FirstVisuallyNonEmptyPaintObserver(Shell* shell) |
: WebContentsObserver(shell->web_contents()), |