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

Unified Diff: content/browser/browser_plugin/browser_plugin_host_browsertest.cc

Issue 272573005: <webview>: Move NewWindow API to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_rename
Patch Set: Cleanup and fix tests 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
Index: content/browser/browser_plugin/browser_plugin_host_browsertest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
index d693b8abe3bfe53c62b7b551ef8ab9299eccfb8e..e5307ccf6bec90c2820241f87eed3e6b357ed3c1 100644
--- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
+++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
@@ -690,35 +690,6 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, VerifyInputMethodActive) {
EXPECT_TRUE(rvh->input_method_active());
}
-// Verify that navigating to an invalid URL (e.g. 'http:') doesn't cause
-// a crash.
-IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, DoNotCrashOnInvalidNavigation) {
- const char kEmbedderURL[] = "/browser_plugin_embedder.html";
- StartBrowserPluginTest(kEmbedderURL, kHTMLForGuest, true, std::string());
- TestBrowserPluginGuestDelegate* delegate =
- new TestBrowserPluginGuestDelegate();
- test_guest()->SetDelegate(delegate);
-
- const char kValidSchemeWithEmptyURL[] = "http:";
- ExecuteSyncJSFunction(
- test_embedder()->web_contents()->GetMainFrame(),
- base::StringPrintf("SetSrc('%s');", kValidSchemeWithEmptyURL));
- EXPECT_TRUE(delegate->load_aborted());
- EXPECT_FALSE(delegate->load_aborted_url().is_valid());
- EXPECT_EQ(kValidSchemeWithEmptyURL,
- delegate->load_aborted_url().possibly_invalid_spec());
-
- delegate->ResetStates();
-
- // Attempt a navigation to chrome-guest://abc123, which is a valid URL. But it
- // should be blocked because the scheme isn't web-safe or a pseudo-scheme.
- ExecuteSyncJSFunction(
- test_embedder()->web_contents()->GetMainFrame(),
- base::StringPrintf("SetSrc('%s://abc123');", kGuestScheme));
- EXPECT_TRUE(delegate->load_aborted());
- EXPECT_TRUE(delegate->load_aborted_url().is_valid());
-}
-
// Tests involving the threaded compositor.
class BrowserPluginThreadedCompositorTest : public BrowserPluginHostTest {
public:

Powered by Google App Engine
This is Rietveld 408576698