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

Side by Side Diff: ios/web/web_state/web_view_internal_creation_util_unittest.mm

Issue 2935933003: [ObjC ARC] Converts ios/web:ios_web_web_state_unittests to ARC. (Closed)
Patch Set: Review fixes. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/web_state/web_view_internal_creation_util.h" 5 #import "ios/web/web_state/web_view_internal_creation_util.h"
6 6
7 #import <CoreGraphics/CoreGraphics.h> 7 #import <CoreGraphics/CoreGraphics.h>
8 #import <WebKit/WebKit.h> 8 #import <WebKit/WebKit.h>
9 9
10 #import "base/mac/scoped_nsobject.h"
11 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
12 #include "ios/web/public/test/fakes/test_browser_state.h" 11 #include "ios/web/public/test/fakes/test_browser_state.h"
13 #import "ios/web/public/test/fakes/test_web_client.h" 12 #import "ios/web/public/test/fakes/test_web_client.h"
14 #include "ios/web/public/test/scoped_testing_web_client.h" 13 #include "ios/web/public/test/scoped_testing_web_client.h"
15 #include "ios/web/public/test/web_test.h" 14 #include "ios/web/public/test/web_test.h"
16 #import "ios/web/public/web_view_creation_util.h" 15 #import "ios/web/public/web_view_creation_util.h"
17 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" 16 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
18 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
19 #import "testing/gtest_mac.h" 18 #import "testing/gtest_mac.h"
20 19
20 #if !defined(__has_feature) || !__has_feature(objc_arc)
21 #error "This file requires ARC support."
22 #endif
23
21 namespace { 24 namespace {
22 25
23 // An arbitrary sized frame for testing web view creation. 26 // An arbitrary sized frame for testing web view creation.
24 const CGRect kTestFrame = CGRectMake(5.0f, 10.0f, 15.0f, 20.0f); 27 const CGRect kTestFrame = CGRectMake(5.0f, 10.0f, 15.0f, 20.0f);
25 28
26 // A WebClient that stubs PreWebViewCreation call for testing purposes. 29 // A WebClient that stubs PreWebViewCreation call for testing purposes.
27 class CreationUtilsWebClient : public web::TestWebClient { 30 class CreationUtilsWebClient : public web::TestWebClient {
28 public: 31 public:
29 MOCK_CONST_METHOD0(PreWebViewCreation, void()); 32 MOCK_CONST_METHOD0(PreWebViewCreation, void());
30 }; 33 };
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ASSERT_TRUE(web_view2); 80 ASSERT_TRUE(web_view2);
78 81
79 // Make sure that web views share the same non-nil process pool. Otherwise 82 // Make sure that web views share the same non-nil process pool. Otherwise
80 // cookie will not be immediately shared between different web views. 83 // cookie will not be immediately shared between different web views.
81 EXPECT_TRUE([[web_view configuration] processPool]); 84 EXPECT_TRUE([[web_view configuration] processPool]);
82 EXPECT_EQ([[web_view configuration] processPool], 85 EXPECT_EQ([[web_view configuration] processPool],
83 [[web_view2 configuration] processPool]); 86 [[web_view2 configuration] processPool]);
84 } 87 }
85 88
86 } // namespace web 89 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_unittest.mm ('k') | ios/web/web_state/wk_web_view_security_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698