Index: content/browser/browser_side_navigation_browsertest.cc |
diff --git a/content/browser/browser_side_navigation_browsertest.cc b/content/browser/browser_side_navigation_browsertest.cc |
index 96a2cb91a02bbe181ee4373ce24aa069673ebdd7..3b7881ff1a9760d286c56c8690b99def55627649 100644 |
--- a/content/browser/browser_side_navigation_browsertest.cc |
+++ b/content/browser/browser_side_navigation_browsertest.cc |
@@ -11,6 +11,7 @@ |
#include "content/common/site_isolation_policy.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/common/content_switches.h" |
+#include "content/public/common/url_constants.h" |
#include "content/public/test/browser_test_utils.h" |
#include "content/public/test/content_browser_test.h" |
#include "content/public/test/content_browser_test_utils.h" |
@@ -228,4 +229,15 @@ IN_PROC_BROWSER_TEST_F(BrowserSideNavigationBrowserTest, POSTNavigation) { |
->GetHasPostData()); |
} |
+// Ensure that browser side navigation handles view-source URLs correctly. |
+IN_PROC_BROWSER_TEST_F(BrowserSideNavigationBrowserTest, ViewSourceNavigation) { |
+ TestNavigationObserver observer(shell()->web_contents()); |
+ GURL url(embedded_test_server()->GetURL("/title1.html")); |
+ GURL view_source_url(content::kViewSourceScheme + std::string(":") + |
+ url.spec()); |
+ NavigateToURL(shell(), view_source_url); |
+ EXPECT_EQ(url, observer.last_navigation_url()); |
+ EXPECT_TRUE(observer.last_navigation_succeeded()); |
+} |
Charlie Reis
2016/05/24 22:54:16
Thanks for proactively testing the PlzNavigate cas
meacer
2016/05/31 23:57:54
Done.
|
+ |
} // namespace content |