summaryrefslogtreecommitdiffstats
path: root/ios/web/web_state
diff options
context:
space:
mode:
authoreugenebut <eugenebut@chromium.org>2016-03-09 10:24:04 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-09 18:25:58 +0000
commit2eac7854b6c6c3bbad5904282e6cd9c548058819 (patch)
tree3af05fb91b11e7355e7358e5e42341822af3874e /ios/web/web_state
parent3792b9350c9c6949bbe1749fe5aed3d1108bd80f (diff)
downloadchromium_src-2eac7854b6c6c3bbad5904282e6cd9c548058819.zip
chromium_src-2eac7854b6c6c3bbad5904282e6cd9c548058819.tar.gz
chromium_src-2eac7854b6c6c3bbad5904282e6cd9c548058819.tar.bz2
[ios] Cleaned up usage of CR_TEST_REQUIRES_WK_WEB_VIEW.
The only supported web view is WKWebView so the macro is unnecessary. BUG=579697 Review URL: https://codereview.chromium.org/1781543002 Cr-Commit-Position: refs/heads/master@{#380157}
Diffstat (limited to 'ios/web/web_state')
-rw-r--r--ios/web/web_state/js/crw_js_post_request_loader_unittest.mm1
-rw-r--r--ios/web/web_state/js/page_script_util_unittest.mm3
-rw-r--r--ios/web/web_state/ui/crw_web_controller_unittest.mm1
-rw-r--r--ios/web/web_state/ui/crw_wk_script_message_router_unittest.mm15
-rw-r--r--ios/web/web_state/ui/crw_wk_simple_web_view_controller_unittest.mm19
-rw-r--r--ios/web/web_state/ui/wk_back_forward_list_item_holder_unittest.mm6
-rw-r--r--ios/web/web_state/ui/wk_web_view_configuration_provider_unittest.mm20
-rw-r--r--ios/web/web_state/web_view_internal_creation_util_unittest.mm6
-rw-r--r--ios/web/web_state/wk_web_view_security_util_unittest.mm15
9 files changed, 1 insertions, 85 deletions
diff --git a/ios/web/web_state/js/crw_js_post_request_loader_unittest.mm b/ios/web/web_state/js/crw_js_post_request_loader_unittest.mm
index 0e4b545..1599201 100644
--- a/ios/web/web_state/js/crw_js_post_request_loader_unittest.mm
+++ b/ios/web/web_state/js/crw_js_post_request_loader_unittest.mm
@@ -10,7 +10,6 @@
#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#import "base/test/ios/wait_util.h"
-#include "ios/web/public/test/web_test_util.h"
#import "ios/web/public/web_view_creation_util.h"
#import "ios/web/test/web_test.h"
#import "ios/web/web_state/ui/crw_wk_script_message_router.h"
diff --git a/ios/web/web_state/js/page_script_util_unittest.mm b/ios/web/web_state/js/page_script_util_unittest.mm
index 5eee4f2..90ed3f2 100644
--- a/ios/web/web_state/js/page_script_util_unittest.mm
+++ b/ios/web/web_state/js/page_script_util_unittest.mm
@@ -13,7 +13,6 @@
#import "ios/web/public/test/js_test_util.h"
#include "ios/web/public/test/test_browser_state.h"
#import "ios/web/public/test/test_web_client.h"
-#include "ios/web/public/test/web_test_util.h"
#import "ios/web/public/web_view_creation_util.h"
#import "ios/web/test/web_test.h"
#include "testing/gtest_mac.h"
@@ -36,7 +35,6 @@ TEST_F(PageScriptUtilTest, UIWebViewEarlyPageScript) {
// Tests that WKWebView early page script is a valid script that injects global
// __gCrWeb object.
TEST_F(PageScriptUtilTest, WKWebViewEarlyPageScript) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
base::scoped_nsobject<WKWebView> web_view(
CreateWKWebView(CGRectZero, GetBrowserState()));
EvaluateJavaScript(web_view, GetEarlyPageScript(WK_WEB_VIEW_TYPE));
@@ -54,7 +52,6 @@ TEST_F(PageScriptUtilTest, UIEmbedderScript) {
// Tests that embedder's WKWebView script is included into early script.
TEST_F(PageScriptUtilTest, WKEmbedderScript) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
GetWebClient()->SetEarlyPageScript(@"__gCrEmbedder = {};", WK_WEB_VIEW_TYPE);
base::scoped_nsobject<WKWebView> web_view(
CreateWKWebView(CGRectZero, GetBrowserState()));
diff --git a/ios/web/web_state/ui/crw_web_controller_unittest.mm b/ios/web/web_state/ui/crw_web_controller_unittest.mm
index 92b8bed..6f7657a 100644
--- a/ios/web/web_state/ui/crw_web_controller_unittest.mm
+++ b/ios/web/web_state/ui/crw_web_controller_unittest.mm
@@ -23,7 +23,6 @@
#import "ios/web/navigation/navigation_manager_impl.h"
#include "ios/web/public/referrer.h"
#include "ios/web/public/test/test_web_view_content_view.h"
-#include "ios/web/public/test/web_test_util.h"
#import "ios/web/public/web_state/crw_web_controller_observer.h"
#import "ios/web/public/web_state/ui/crw_content_view.h"
#import "ios/web/public/web_state/ui/crw_web_view_content_view.h"
diff --git a/ios/web/web_state/ui/crw_wk_script_message_router_unittest.mm b/ios/web/web_state/ui/crw_wk_script_message_router_unittest.mm
index c6b73aa..2e91f43 100644
--- a/ios/web/web_state/ui/crw_wk_script_message_router_unittest.mm
+++ b/ios/web/web_state/ui/crw_wk_script_message_router_unittest.mm
@@ -9,7 +9,7 @@
#include "ios/web/public/test/scoped_testing_web_client.h"
#include "ios/web/public/test/test_browser_state.h"
#import "ios/web/public/test/test_web_client.h"
-#include "ios/web/public/test/web_test_util.h"
+#import "ios/web/public/web_view_creation_util.h"
#import "ios/web/test/web_test.h"
#include "third_party/ocmock/OCMock/OCMock.h"
#include "third_party/ocmock/gtest_support.h"
@@ -33,7 +33,6 @@ class CRWWKScriptMessageRouterTest : public web::WebTest {
protected:
void SetUp() override {
web::WebTest::SetUp();
- CR_TEST_REQUIRES_WK_WEB_VIEW();
// Mock WKUserContentController object.
controller_mock_.reset(
[[OCMockObject mockForClass:[WKUserContentController class]] retain]);
@@ -89,15 +88,11 @@ class CRWWKScriptMessageRouterTest : public web::WebTest {
// Tests CRWWKScriptMessageRouter designated initializer.
TEST_F(CRWWKScriptMessageRouterTest, Initialization) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
EXPECT_TRUE(router_);
}
// Tests registration/deregistation of message handlers.
TEST_F(CRWWKScriptMessageRouterTest, HandlerRegistration) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
[[controller_mock_ expect] addScriptMessageHandler:router_ name:name1_];
[[controller_mock_ expect] addScriptMessageHandler:router_ name:name2_];
@@ -117,8 +112,6 @@ TEST_F(CRWWKScriptMessageRouterTest, HandlerRegistration) {
// WKScriptMessageHandler is not removed if CRWWKScriptMessageRouter has valid
// message handlers.
TEST_F(CRWWKScriptMessageRouterTest, HandlerRegistrationLeak) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
[[controller_mock_ expect] addScriptMessageHandler:router_ name:name1_];
// -removeScriptMessageHandlerForName must not be called.
@@ -131,8 +124,6 @@ TEST_F(CRWWKScriptMessageRouterTest, HandlerRegistrationLeak) {
// Tests deregistation of all message handlers.
TEST_F(CRWWKScriptMessageRouterTest, RemoveAllHandlers) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
[[controller_mock_ expect] addScriptMessageHandler:router_ name:name1_];
[[controller_mock_ expect] addScriptMessageHandler:router_ name:name2_];
@@ -151,8 +142,6 @@ TEST_F(CRWWKScriptMessageRouterTest, RemoveAllHandlers) {
// WKScriptMessageHandler is not removed if CRWWKScriptMessageRouter has valid
// message handlers.
TEST_F(CRWWKScriptMessageRouterTest, RemoveAllHandlersLeak) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
[[controller_mock_ expect] addScriptMessageHandler:router_ name:name1_];
[[controller_mock_ expect] addScriptMessageHandler:router_ name:name2_];
[[controller_mock_ expect] addScriptMessageHandler:router_ name:name3_];
@@ -171,8 +160,6 @@ TEST_F(CRWWKScriptMessageRouterTest, RemoveAllHandlersLeak) {
// Tests proper routing of WKScriptMessage object depending on message name and
// web view.
TEST_F(CRWWKScriptMessageRouterTest, Routing) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
// It's expected that messages handlers will be called once and in order.
__block NSInteger last_called_handler = 0;
id message1 = GetScriptMessageMock(web_view1_, name1_);
diff --git a/ios/web/web_state/ui/crw_wk_simple_web_view_controller_unittest.mm b/ios/web/web_state/ui/crw_wk_simple_web_view_controller_unittest.mm
index ea6ca99..5153f5a 100644
--- a/ios/web/web_state/ui/crw_wk_simple_web_view_controller_unittest.mm
+++ b/ios/web/web_state/ui/crw_wk_simple_web_view_controller_unittest.mm
@@ -11,7 +11,6 @@
#import "base/test/ios/wait_util.h"
#include "ios/web/public/test/test_browser_state.h"
#import "ios/web/public/test/test_web_client.h"
-#include "ios/web/public/test/web_test_util.h"
#import "ios/web/public/web_view_creation_util.h"
#import "ios/web/test/web_test.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -25,7 +24,6 @@ namespace {
class CRWWKSimpleWebViewControllerTest : public web::WebTest {
protected:
void SetUp() override {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
web::WebTest::SetUp();
mock_web_view_.reset(
[[OCMockObject niceMockForClass:[WKWebView class]] retain]);
@@ -36,11 +34,6 @@ class CRWWKSimpleWebViewControllerTest : public web::WebTest {
[web_view_controller_ setDelegate:mock_delegate_];
}
- void TearDown() override {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
- web::WebTest::TearDown();
- }
-
// Tests that |shouldStartLoadWithRequest:| decision by the delegate is
// respected by the CRWSWKimpleWebViewController.
void TestShouldStartLoadRespected(BOOL expected_decision) {
@@ -76,14 +69,12 @@ class CRWWKSimpleWebViewControllerTest : public web::WebTest {
// Tests to make sure a CRWWKSimpleWebViewController correctly sets the backing
// WKWebView.
TEST_F(CRWWKSimpleWebViewControllerTest, View) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
EXPECT_EQ(mock_web_view_.get(), [web_view_controller_ view]);
}
// Tests to make sure a CRWWKSimpleWebViewController correctly sets the backing
// WKWebView's navigation delegate
TEST_F(CRWWKSimpleWebViewControllerTest, Delegate) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
base::scoped_nsobject<WKWebView> web_view(
web::CreateWKWebView(CGRectZero, GetBrowserState()));
ASSERT_TRUE(web_view);
@@ -96,7 +87,6 @@ TEST_F(CRWWKSimpleWebViewControllerTest, Delegate) {
// Tests that CRWWKSimpleWebViewController can correctly retrieve the title from
// the underlying WKWebView.
TEST_F(CRWWKSimpleWebViewControllerTest, Title) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
[[[mock_web_view_ stub] andReturn:@"The Rolling Stones"] title];
EXPECT_NSEQ(@"The Rolling Stones", [web_view_controller_ title]);
}
@@ -104,7 +94,6 @@ TEST_F(CRWWKSimpleWebViewControllerTest, Title) {
// Tests that CRWWKSimpleWebViewController correctly reloads from the underlying
// WKWebView.
TEST_F(CRWWKSimpleWebViewControllerTest, Reload) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
[static_cast<WKWebView*>([mock_web_view_ expect]) reload];
[web_view_controller_ reload];
EXPECT_OCMOCK_VERIFY(mock_web_view_);
@@ -113,7 +102,6 @@ TEST_F(CRWWKSimpleWebViewControllerTest, Reload) {
// Tests that CRWWKSimpleWebViewController correctly returns the web view's
// scroll view.
TEST_F(CRWWKSimpleWebViewControllerTest, ScrollView) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
base::scoped_nsobject<UIScrollView> scroll_view([[UIScrollView alloc] init]);
[[[mock_web_view_ stub] andReturn:scroll_view] scrollView];
EXPECT_EQ(scroll_view, [web_view_controller_ scrollView]);
@@ -122,7 +110,6 @@ TEST_F(CRWWKSimpleWebViewControllerTest, ScrollView) {
// Tests that CRWWKSimpleWebViewControllerTest correctly loads a request from
// the underlying WKWebView.
TEST_F(CRWWKSimpleWebViewControllerTest, LoadRequest) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
NSURLRequest* request =
[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]];
[static_cast<WKWebView*>([mock_web_view_ expect]) loadRequest:request];
@@ -133,7 +120,6 @@ TEST_F(CRWWKSimpleWebViewControllerTest, LoadRequest) {
// Tests that CRWWKSimpleWebViewControllerTest correctly loads a html request
// from the underlying WKWebView.
TEST_F(CRWWKSimpleWebViewControllerTest, LoadHTMLString) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
NSURL* base_url = [NSURL URLWithString:@"http://google.com"];
NSString* html_string = @"<html>Some html</html>";
[static_cast<WKWebView*>([mock_web_view_ expect]) loadHTMLString:html_string
@@ -148,7 +134,6 @@ TEST_F(CRWWKSimpleWebViewControllerTest, LoadHTMLString) {
// TODO(shreyasv): Revisit this test if mockHTTPServer is moved to
// ios_web_unittests.
TEST_F(CRWWKSimpleWebViewControllerTest, ShouldStartLoad) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
NSURLRequest* request = [NSURLRequest requestWithURL:
[NSURL URLWithString:@"http://google.com"]];
base::scoped_nsobject<WKNavigationAction> navigation_action(
@@ -167,20 +152,17 @@ TEST_F(CRWWKSimpleWebViewControllerTest, ShouldStartLoad) {
// Tests that |shouldStartLoadWithRequest:| YES decision by the delegate is
// respected by the CRWSWKimpleWebViewController
TEST_F(CRWWKSimpleWebViewControllerTest, ShouldStartLoadRespectedYes) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
TestShouldStartLoadRespected(YES);
}
// Tests that |shouldStartLoadWithRequest:| NO decision by the delegate is
// respected by the CRWSWKimpleWebViewController
TEST_F(CRWWKSimpleWebViewControllerTest, ShouldStartLoadRespectedNo) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
TestShouldStartLoadRespected(NO);
}
// Tests that |titleMayHaveChanged:| is correctly called on the delegate.
TEST_F(CRWWKSimpleWebViewControllerTest, TitleMayHaveChanged) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
base::scoped_nsobject<WKWebView> web_view(
web::CreateWKWebView(CGRectZero, GetBrowserState()));
base::scoped_nsobject<WKWebView> mock_web_view(
@@ -202,7 +184,6 @@ TEST_F(CRWWKSimpleWebViewControllerTest, TitleMayHaveChanged) {
// Tests correct JavaScript evaluation.
TEST_F(CRWWKSimpleWebViewControllerTest, JavaScriptEvaluation) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
NSString* const kTestResult = @"result";
NSError* const test_error = [NSError errorWithDomain:@"" code:0 userInfo:nil];
id run_completion_handler = ^(NSInvocation* invocation) {
diff --git a/ios/web/web_state/ui/wk_back_forward_list_item_holder_unittest.mm b/ios/web/web_state/ui/wk_back_forward_list_item_holder_unittest.mm
index 3d4c6e6..8be0bdc 100644
--- a/ios/web/web_state/ui/wk_back_forward_list_item_holder_unittest.mm
+++ b/ios/web/web_state/ui/wk_back_forward_list_item_holder_unittest.mm
@@ -8,7 +8,6 @@
#include "ios/web/navigation/navigation_item_impl.h"
#include "ios/web/public/navigation_item.h"
-#include "ios/web/public/test/web_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest_mac.h"
#include "testing/platform_test.h"
@@ -21,7 +20,6 @@ typedef PlatformTest WKBackForwardListItemHolderTest;
// Tests that FromNavigationItem returns the same holder for the same
// NavigationItem.
TEST_F(WKBackForwardListItemHolderTest, GetHolderFromNavigationItem) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
scoped_ptr<web::NavigationItem> item(NavigationItem::Create());
WKBackForwardListItemHolder* holder1 =
WKBackForwardListItemHolder::FromNavigationItem(item.get());
@@ -33,7 +31,6 @@ TEST_F(WKBackForwardListItemHolderTest, GetHolderFromNavigationItem) {
// Tests that FromNavigationItem returns different holders for different
// NavigationItem objects.
TEST_F(WKBackForwardListItemHolderTest, GetHolderFromDifferentNavigationItem) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
// Create two NavigationItem objects.
scoped_ptr<web::NavigationItem> item1(NavigationItem::Create());
scoped_ptr<web::NavigationItem> item2(NavigationItem::Create());
@@ -52,7 +49,6 @@ TEST_F(WKBackForwardListItemHolderTest, GetHolderFromDifferentNavigationItem) {
// because WKBackForwardListItem alloc/release is not designed to be called
// directly and will crash.
TEST_F(WKBackForwardListItemHolderTest, GetBackForwardListItemFromHolder) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
scoped_ptr<web::NavigationItem> item(NavigationItem::Create());
base::scoped_nsobject<NSObject> input([[NSObject alloc] init]);
WKBackForwardListItemHolder* holder =
@@ -65,7 +61,6 @@ TEST_F(WKBackForwardListItemHolderTest, GetBackForwardListItemFromHolder) {
// Tests that acessors for navigation type work as expected.
TEST_F(WKBackForwardListItemHolderTest, GetNavigationTypeFromHolder) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
scoped_ptr<web::NavigationItem> item(NavigationItem::Create());
WKBackForwardListItemHolder* holder =
WKBackForwardListItemHolder::FromNavigationItem(item.get());
@@ -112,7 +107,6 @@ TEST_F(WKBackForwardListItemHolderTest, GetNavigationTypeFromHolder) {
// instead of WKBackForwardListItem because WKBackForwardListItem alloc/
// release is not designed to be called directly and will crash.
TEST_F(WKBackForwardListItemHolderTest, GetNilBackForwardListItemFromHolder) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
scoped_ptr<web::NavigationItem> item(NavigationItem::Create());
WKBackForwardListItemHolder* holder =
WKBackForwardListItemHolder::FromNavigationItem(item.get());
diff --git a/ios/web/web_state/ui/wk_web_view_configuration_provider_unittest.mm b/ios/web/web_state/ui/wk_web_view_configuration_provider_unittest.mm
index f4ae2c5..5831b28 100644
--- a/ios/web/web_state/ui/wk_web_view_configuration_provider_unittest.mm
+++ b/ios/web/web_state/ui/wk_web_view_configuration_provider_unittest.mm
@@ -6,11 +6,9 @@
#import <WebKit/WebKit.h>
-#include "base/ios/ios_util.h"
#import "base/ios/weak_nsobject.h"
#include "ios/web/public/test/scoped_testing_web_client.h"
#include "ios/web/public/test/test_browser_state.h"
-#include "ios/web/public/test/web_test_util.h"
#include "ios/web/public/web_client.h"
#import "ios/web/web_state/js/page_script_util.h"
#import "ios/web/web_state/ui/crw_wk_script_message_router.h"
@@ -45,8 +43,6 @@ class WKWebViewConfigurationProviderTest : public PlatformTest {
// configuration and configurations returned by the same provider will always
// have the same process pool.
TEST_F(WKWebViewConfigurationProviderTest, ConfigurationOwnerhip) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
// Configuration is not nil.
WKWebViewConfigurationProvider& provider = GetProvider(&browser_state_);
ASSERT_TRUE(provider.GetWebViewConfiguration());
@@ -66,10 +62,6 @@ TEST_F(WKWebViewConfigurationProviderTest, ConfigurationOwnerhip) {
// Tests Non-OffTheRecord configuration.
TEST_F(WKWebViewConfigurationProviderTest, NoneOffTheRecordConfiguration) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
- if (!base::ios::IsRunningOnIOS9OrLater())
- return;
-
browser_state_.SetOffTheRecord(false);
WKWebViewConfigurationProvider& provider = GetProvider(&browser_state_);
EXPECT_TRUE(provider.GetWebViewConfiguration().websiteDataStore.persistent);
@@ -77,10 +69,6 @@ TEST_F(WKWebViewConfigurationProviderTest, NoneOffTheRecordConfiguration) {
// Tests OffTheRecord configuration.
TEST_F(WKWebViewConfigurationProviderTest, OffTheRecordConfiguration) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
- if (!base::ios::IsRunningOnIOS9OrLater())
- return;
-
browser_state_.SetOffTheRecord(true);
WKWebViewConfigurationProvider& provider = GetProvider(&browser_state_);
WKWebViewConfiguration* config = provider.GetWebViewConfiguration();
@@ -90,8 +78,6 @@ TEST_F(WKWebViewConfigurationProviderTest, OffTheRecordConfiguration) {
// Tests that internal configuration object can not be changed by clients.
TEST_F(WKWebViewConfigurationProviderTest, ConfigurationProtection) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
WKWebViewConfigurationProvider& provider = GetProvider(&browser_state_);
WKWebViewConfiguration* config = provider.GetWebViewConfiguration();
base::scoped_nsobject<WKProcessPool> pool([[config processPool] retain]);
@@ -121,8 +107,6 @@ TEST_F(WKWebViewConfigurationProviderTest, ConfigurationProtection) {
// Tests that script message router is bound to correct user content controller.
TEST_F(WKWebViewConfigurationProviderTest, ScriptMessageRouter) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
ASSERT_TRUE(GetProvider().GetWebViewConfiguration().userContentController);
EXPECT_EQ(GetProvider().GetWebViewConfiguration().userContentController,
GetProvider().GetScriptMessageRouter().userContentController);
@@ -131,8 +115,6 @@ TEST_F(WKWebViewConfigurationProviderTest, ScriptMessageRouter) {
// Tests that both configuration and script message router are deallocated after
// |Purge| call.
TEST_F(WKWebViewConfigurationProviderTest, Purge) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
base::WeakNSObject<id> config;
base::WeakNSObject<id> router;
@autoreleasepool { // Make sure that resulting copy is deallocated.
@@ -151,8 +133,6 @@ TEST_F(WKWebViewConfigurationProviderTest, Purge) {
// Tests that configuration's userContentController has only one script with the
// same content as web::GetEarlyPageScript(WK_WEB_VIEW_TYPE) returns.
TEST_F(WKWebViewConfigurationProviderTest, UserScript) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
WKWebViewConfiguration* config = GetProvider().GetWebViewConfiguration();
NSArray* scripts = config.userContentController.userScripts;
EXPECT_EQ(1U, scripts.count);
diff --git a/ios/web/web_state/web_view_internal_creation_util_unittest.mm b/ios/web/web_state/web_view_internal_creation_util_unittest.mm
index cd18bfc..6696286 100644
--- a/ios/web/web_state/web_view_internal_creation_util_unittest.mm
+++ b/ios/web/web_state/web_view_internal_creation_util_unittest.mm
@@ -14,7 +14,6 @@
#include "ios/web/public/test/test_browser_state.h"
#import "ios/web/public/test/test_web_client.h"
#include "ios/web/public/test/test_web_thread.h"
-#include "ios/web/public/test/web_test_util.h"
#import "ios/web/public/web_view_creation_util.h"
#import "ios/web/test/web_test.h"
#import "ios/web/web_state/ui/crw_simple_web_view_controller.h"
@@ -132,8 +131,6 @@ TEST_F(WebViewCreationUtilsTest, Creation) {
// Tests web::CreateWKWebView function that it correctly returns a WKWebView
// with the correct frame and WKProcessPool.
TEST_F(WebViewCreationUtilsTest, WKWebViewCreationWithBrowserState) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
base::scoped_nsobject<WKWebView> web_view(
CreateWKWebView(kTestFrame, GetBrowserState()));
@@ -152,8 +149,6 @@ TEST_F(WebViewCreationUtilsTest, WKWebViewCreationWithBrowserState) {
// Tests that web::CreateWKWebView always returns a web view with the same
// processPool.
TEST_F(WebViewCreationUtilsTest, WKWebViewsShareProcessPool) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
base::scoped_nsobject<WKWebView> web_view(
CreateWKWebView(kTestFrame, GetBrowserState()));
ASSERT_TRUE(web_view);
@@ -173,7 +168,6 @@ TEST_F(WebViewCreationUtilsTest, WKWebViewsShareProcessPool) {
// Tests that getting a WKWebView from the util methods correctly maintains
// the global active wkwebview count (which is debug-only).
TEST_F(WebViewCreationUtilsTest, GetActiveWKWebViewsCount) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
base::scoped_nsobject<WKWebView> web_view1(
CreateWKWebView(CGRectZero, GetBrowserState()));
EXPECT_EQ(1U, GetActiveWKWebViewsCount());
diff --git a/ios/web/web_state/wk_web_view_security_util_unittest.mm b/ios/web/web_state/wk_web_view_security_util_unittest.mm
index 97cb2e3..7f946cf 100644
--- a/ios/web/web_state/wk_web_view_security_util_unittest.mm
+++ b/ios/web/web_state/wk_web_view_security_util_unittest.mm
@@ -10,7 +10,6 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/scoped_ptr.h"
#include "crypto/rsa_private_key.h"
-#include "ios/web/public/test/web_test_util.h"
#include "net/cert/x509_cert_types.h"
#include "net/cert/x509_certificate.h"
#include "net/cert/x509_util.h"
@@ -155,8 +154,6 @@ TEST_F(WKWebViewSecurityUtilTest, CreationServerTrustFromEmptyChain) {
// NSURLErrorDomain domain, NSURLErrorSecureConnectionFailed error code and
// certificate chain.
TEST_F(WKWebViewSecurityUtilTest, CheckSecureConnectionFailedWithCertError) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
EXPECT_TRUE(IsWKWebViewSSLCertError([NSError
errorWithDomain:NSURLErrorDomain
code:NSURLErrorSecureConnectionFailed
@@ -167,8 +164,6 @@ TEST_F(WKWebViewSecurityUtilTest, CheckSecureConnectionFailedWithCertError) {
// NSURLErrorDomain domain, NSURLErrorSecureConnectionFailed error code and no
// certificate chain.
TEST_F(WKWebViewSecurityUtilTest, CheckSecureConnectionFailedWithoutCertError) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
EXPECT_FALSE(IsWKWebViewSSLCertError([NSError
errorWithDomain:NSURLErrorDomain
code:NSURLErrorSecureConnectionFailed
@@ -178,8 +173,6 @@ TEST_F(WKWebViewSecurityUtilTest, CheckSecureConnectionFailedWithoutCertError) {
// Tests that IsWKWebViewSSLCertError returns YES for NSError with
// NSURLErrorDomain domain and certificates error codes.
TEST_F(WKWebViewSecurityUtilTest, CheckCertificateSSLError) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
EXPECT_TRUE(IsWKWebViewSSLCertError([NSError
errorWithDomain:NSURLErrorDomain
code:NSURLErrorServerCertificateHasBadDate
@@ -201,8 +194,6 @@ TEST_F(WKWebViewSecurityUtilTest, CheckCertificateSSLError) {
// Tests that IsWKWebViewSSLCertError returns NO for NSError with
// NSURLErrorDomain domain and non cert SSL error codes.
TEST_F(WKWebViewSecurityUtilTest, CheckNonCertificateSSLError) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
EXPECT_FALSE(IsWKWebViewSSLCertError([NSError
errorWithDomain:NSURLErrorDomain
code:NSURLErrorClientCertificateRejected
@@ -216,8 +207,6 @@ TEST_F(WKWebViewSecurityUtilTest, CheckNonCertificateSSLError) {
// Tests that IsWKWebViewSSLCertError returns NO for NSError with
// NSURLErrorDomain domain and NSURLErrorDataLengthExceedsMaximum error code.
TEST_F(WKWebViewSecurityUtilTest, CheckDataLengthExceedsMaximumError) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
EXPECT_FALSE(IsWKWebViewSSLCertError([NSError
errorWithDomain:NSURLErrorDomain
code:NSURLErrorDataLengthExceedsMaximum
@@ -227,8 +216,6 @@ TEST_F(WKWebViewSecurityUtilTest, CheckDataLengthExceedsMaximumError) {
// Tests that IsWKWebViewSSLCertError returns NO for NSError with
// NSURLErrorDomain domain and NSURLErrorCannotLoadFromNetwork error code.
TEST_F(WKWebViewSecurityUtilTest, CheckCannotLoadFromNetworkError) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
EXPECT_FALSE(IsWKWebViewSSLCertError([NSError
errorWithDomain:NSURLErrorDomain
code:NSURLErrorCannotLoadFromNetwork
@@ -237,8 +224,6 @@ TEST_F(WKWebViewSecurityUtilTest, CheckCannotLoadFromNetworkError) {
// Tests GetSSLInfoFromWKWebViewSSLCertError with NSError and self-signed cert.
TEST_F(WKWebViewSecurityUtilTest, SSLInfoFromErrorWithCert) {
- CR_TEST_REQUIRES_WK_WEB_VIEW();
-
NSError* unknownCertError =
[NSError errorWithDomain:NSURLErrorDomain
code:NSURLErrorServerCertificateHasUnknownRoot