| 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
|
|
|