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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2855263004: Throw in window.open() when an invalid URL is being passed (Closed)
Patch Set: updates Created 3 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: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index 9b7144b4bc6c4ac9d3b62bffe8fd804a104e602d..aefd3e5738c6ed6c97699ee8085c93744367e844 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -9445,15 +9445,16 @@ TEST_F(WebFrameSwapTest, WindowOpenOnRemoteFrame) {
ToWebLocalFrameImpl(MainFrame())->GetFrame()->DomWindow();
KURL destination = ToKURL("data:text/html:destination");
+ NonThrowableExceptionState exception_state;
main_window->open(destination.GetString(), "frame1", "", main_window,
- main_window);
+ main_window, exception_state);
ASSERT_FALSE(remote_client.LastRequest().IsNull());
EXPECT_EQ(remote_client.LastRequest().Url(), WebURL(destination));
// Pointing a named frame to an empty URL should just return a reference to
// the frame's window without navigating it.
- DOMWindow* result =
- main_window->open("", "frame1", "", main_window, main_window);
+ DOMWindow* result = main_window->open("", "frame1", "", main_window,
+ main_window, exception_state);
EXPECT_EQ(remote_client.LastRequest().Url(), WebURL(destination));
EXPECT_EQ(result, WebFrame::ToCoreFrame(*remote_frame)->DomWindow());

Powered by Google App Engine
This is Rietveld 408576698