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

Unified Diff: ios/chrome/browser/web/chrome_web_test.mm

Issue 2580333003: Upstream Chrome on iOS source code [10/11]. (Closed)
Patch Set: Created 4 years 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/chrome/browser/web/chrome_web_test.h ('k') | ios/chrome/browser/web/early_page_script_perftest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/chrome_web_test.mm
diff --git a/ios/chrome/browser/web/chrome_web_test.mm b/ios/chrome/browser/web/chrome_web_test.mm
new file mode 100644
index 0000000000000000000000000000000000000000..1408a494b0091912e7551ae94b2dddfa195b005b
--- /dev/null
+++ b/ios/chrome/browser/web/chrome_web_test.mm
@@ -0,0 +1,38 @@
+// Copyright 2014 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.
+
+#import "ios/chrome/browser/web/chrome_web_test.h"
+
+#include "components/password_manager/core/browser/mock_password_store.h"
+#include "components/password_manager/core/browser/password_manager_test_utils.h"
+#include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
+#include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h"
+#import "ios/chrome/browser/ui/fullscreen_controller.h"
+#import "ios/web/public/web_state/web_state.h"
+
+ChromeWebTest::~ChromeWebTest() {}
+
+ChromeWebTest::ChromeWebTest() : web::WebTestWithWebState() {
+ TestChromeBrowserState::Builder browser_state_builder;
+ chrome_browser_state_ = browser_state_builder.Build();
+}
+
+void ChromeWebTest::SetUp() {
+ web::WebTestWithWebState::SetUp();
+ IOSChromePasswordStoreFactory::GetInstance()->SetTestingFactory(
+ chrome_browser_state_.get(),
+ &password_manager::BuildPasswordStore<
+ web::BrowserState, password_manager::MockPasswordStore>);
+ [FullScreenController setEnabledForTests:NO];
+}
+
+void ChromeWebTest::TearDown() {
+ WaitForBackgroundTasks();
+ [FullScreenController setEnabledForTests:YES];
+ web::WebTestWithWebState::TearDown();
+}
+
+web::BrowserState* ChromeWebTest::GetBrowserState() {
+ return chrome_browser_state_.get();
+}
« no previous file with comments | « ios/chrome/browser/web/chrome_web_test.h ('k') | ios/chrome/browser/web/early_page_script_perftest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698