OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/chrome/browser/web/chrome_web_test.h" |
| 6 |
| 7 #include "components/password_manager/core/browser/mock_password_store.h" |
| 8 #include "components/password_manager/core/browser/password_manager_test_utils.h
" |
| 9 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" |
| 10 #include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h" |
| 11 #import "ios/chrome/browser/ui/fullscreen_controller.h" |
| 12 #import "ios/web/public/web_state/web_state.h" |
| 13 |
| 14 ChromeWebTest::~ChromeWebTest() {} |
| 15 |
| 16 ChromeWebTest::ChromeWebTest() : web::WebTestWithWebState() { |
| 17 TestChromeBrowserState::Builder browser_state_builder; |
| 18 chrome_browser_state_ = browser_state_builder.Build(); |
| 19 } |
| 20 |
| 21 void ChromeWebTest::SetUp() { |
| 22 web::WebTestWithWebState::SetUp(); |
| 23 IOSChromePasswordStoreFactory::GetInstance()->SetTestingFactory( |
| 24 chrome_browser_state_.get(), |
| 25 &password_manager::BuildPasswordStore< |
| 26 web::BrowserState, password_manager::MockPasswordStore>); |
| 27 [FullScreenController setEnabledForTests:NO]; |
| 28 } |
| 29 |
| 30 void ChromeWebTest::TearDown() { |
| 31 WaitForBackgroundTasks(); |
| 32 [FullScreenController setEnabledForTests:YES]; |
| 33 web::WebTestWithWebState::TearDown(); |
| 34 } |
| 35 |
| 36 web::BrowserState* ChromeWebTest::GetBrowserState() { |
| 37 return chrome_browser_state_.get(); |
| 38 } |
OLD | NEW |