| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ios/web/public/test/web_test.h" |
| 6 |
| 7 #include "base/memory/ptr_util.h" |
| 8 #import "ios/web/public/active_state_manager.h" |
| 9 #import "ios/web/public/test/test_web_client.h" |
| 10 |
| 11 namespace web { |
| 12 |
| 13 WebTest::WebTest() : web_client_(base::WrapUnique(new TestWebClient)) {} |
| 14 |
| 15 WebTest::~WebTest() {} |
| 16 |
| 17 void WebTest::SetUp() { |
| 18 PlatformTest::SetUp(); |
| 19 BrowserState::GetActiveStateManager(&browser_state_)->SetActive(true); |
| 20 } |
| 21 |
| 22 void WebTest::TearDown() { |
| 23 BrowserState::GetActiveStateManager(&browser_state_)->SetActive(false); |
| 24 PlatformTest::TearDown(); |
| 25 } |
| 26 |
| 27 TestWebClient* WebTest::GetWebClient() { |
| 28 return static_cast<TestWebClient*>(web_client_.Get()); |
| 29 } |
| 30 |
| 31 BrowserState* WebTest::GetBrowserState() { |
| 32 return &browser_state_; |
| 33 } |
| 34 |
| 35 } // namespace web |
| OLD | NEW |