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

Unified Diff: ios/web/public/test/web_test.mm

Issue 2060483003: [ios] Extracted web_test.h classes into separate files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/test/web_test.h ('k') | ios/web/public/test/web_test_with_web_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/web_test.mm
diff --git a/ios/web/public/test/web_test.mm b/ios/web/public/test/web_test.mm
new file mode 100644
index 0000000000000000000000000000000000000000..7c49547e5f50638eb663d13d76af52e2007147e2
--- /dev/null
+++ b/ios/web/public/test/web_test.mm
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ios/web/public/test/web_test.h"
+
+#include "base/memory/ptr_util.h"
+#import "ios/web/public/active_state_manager.h"
+#import "ios/web/public/test/test_web_client.h"
+
+namespace web {
+
+WebTest::WebTest() : web_client_(base::WrapUnique(new TestWebClient)) {}
+
+WebTest::~WebTest() {}
+
+void WebTest::SetUp() {
+ PlatformTest::SetUp();
+ BrowserState::GetActiveStateManager(&browser_state_)->SetActive(true);
+}
+
+void WebTest::TearDown() {
+ BrowserState::GetActiveStateManager(&browser_state_)->SetActive(false);
+ PlatformTest::TearDown();
+}
+
+TestWebClient* WebTest::GetWebClient() {
+ return static_cast<TestWebClient*>(web_client_.Get());
+}
+
+BrowserState* WebTest::GetBrowserState() {
+ return &browser_state_;
+}
+
+} // namespace web
« no previous file with comments | « ios/web/public/test/web_test.h ('k') | ios/web/public/test/web_test_with_web_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698