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

Unified Diff: ios/web/web_state/web_state_delegate_bridge_unittest.mm

Issue 2737943003: Moved window opening callback to WebStateDelegate. (Closed)
Patch Set: Rebased Created 3 years, 9 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 | « ios/web/web_state/web_state_delegate_bridge.mm ('k') | ios/web/web_state/web_state_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/web_state_delegate_bridge_unittest.mm
diff --git a/ios/web/web_state/web_state_delegate_bridge_unittest.mm b/ios/web/web_state/web_state_delegate_bridge_unittest.mm
index 45cd392c07224197f5dcadeae2800af430fce562..2ce4c8b0a577f8e8d4f04ee3634322e4ace37802 100644
--- a/ios/web/web_state/web_state_delegate_bridge_unittest.mm
+++ b/ios/web/web_state/web_state_delegate_bridge_unittest.mm
@@ -56,6 +56,19 @@ class WebStateDelegateBridgeTest : public PlatformTest {
web::TestWebState test_web_state_;
};
+// Tests |webState:createNewWebStateForURL:openerURL:initiatedByUser:|
+// forwarding.
+TEST_F(WebStateDelegateBridgeTest, CreateNewWebState) {
+ ASSERT_FALSE([delegate_ webState]);
+ ASSERT_FALSE([delegate_ webStateCreationRequested]);
+
+ EXPECT_FALSE(
+ bridge_->CreateNewWebState(&test_web_state_, GURL(), GURL(), true));
+
+ EXPECT_EQ(&test_web_state_, [delegate_ webState]);
+ ASSERT_TRUE([delegate_ webStateCreationRequested]);
+}
+
// Tests |webState:openURLWithParams:| forwarding.
TEST_F(WebStateDelegateBridgeTest, OpenURLFromWebState) {
ASSERT_FALSE([delegate_ webState]);
« no previous file with comments | « ios/web/web_state/web_state_delegate_bridge.mm ('k') | ios/web/web_state/web_state_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698