| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/web/public/web_state/web_state_delegate_bridge.h" | 5 #import "ios/web/public/web_state/web_state_delegate_bridge.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "ios/web/public/web_state/context_menu_params.h" | 11 #import "ios/web/public/web_state/context_menu_params.h" |
| 12 #import "ios/web/web_state/web_state_delegate_stub.h" | 12 #import "ios/web/web_state/web_state_delegate_stub.h" |
| 13 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
| 14 #import "third_party/ocmock/gtest_support.h" | 14 #import "third_party/ocmock/gtest_support.h" |
| 15 | 15 |
| 16 namespace web { | 16 namespace web { |
| 17 | 17 |
| 18 // Test fixture to test WebStateDelegateBridge class. | 18 // Test fixture to test WebStateDelegateBridge class. |
| 19 class WebStateDelegateBridgeTest : public PlatformTest { | 19 class WebStateDelegateBridgeTest : public PlatformTest { |
| 20 protected: | 20 protected: |
| 21 void SetUp() override { | 21 void SetUp() override { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Tests |GetJavaScriptDialogPresenter| forwarding. | 71 // Tests |GetJavaScriptDialogPresenter| forwarding. |
| 72 TEST_F(WebStateDelegateBridgeTest, GetJavaScriptDialogPresenter) { | 72 TEST_F(WebStateDelegateBridgeTest, GetJavaScriptDialogPresenter) { |
| 73 EXPECT_FALSE([delegate_ javaScriptDialogPresenterRequested]); | 73 EXPECT_FALSE([delegate_ javaScriptDialogPresenterRequested]); |
| 74 bridge_->GetJavaScriptDialogPresenter(nullptr); | 74 bridge_->GetJavaScriptDialogPresenter(nullptr); |
| 75 EXPECT_TRUE([delegate_ javaScriptDialogPresenterRequested]); | 75 EXPECT_TRUE([delegate_ javaScriptDialogPresenterRequested]); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace web | 78 } // namespace web |
| OLD | NEW |