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

Unified Diff: ios/web/public/test/test_browser_state.cc

Issue 2614443004: [ios] Moved all web mocks to ios/web/public/test/fakes. (Closed)
Patch Set: Moved test_redirect_observer back Created 3 years, 11 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/test_browser_state.h ('k') | ios/web/public/test/test_native_content.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/test_browser_state.cc
diff --git a/ios/web/public/test/test_browser_state.cc b/ios/web/public/test/test_browser_state.cc
deleted file mode 100644
index 054208cab8515d68932bd73a7895ebdf933d071f..0000000000000000000000000000000000000000
--- a/ios/web/public/test/test_browser_state.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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.
-
-#include "ios/web/public/test/test_browser_state.h"
-
-#include "base/files/file_path.h"
-#include "ios/web/public/web_thread.h"
-#include "ios/web/test/test_url_constants.h"
-#include "ios/web/webui/url_data_manager_ios_backend.h"
-#include "net/url_request/url_request_context.h"
-#include "net/url_request/url_request_context_getter.h"
-#include "net/url_request/url_request_job_factory_impl.h"
-#include "net/url_request/url_request_test_util.h"
-
-namespace web {
-
-namespace {
-
-class TestContextURLRequestContextGetter : public net::URLRequestContextGetter {
- public:
- TestContextURLRequestContextGetter(web::BrowserState* browser_state) {
- job_factory_.SetProtocolHandler(
- kTestWebUIScheme,
- web::URLDataManagerIOSBackend::CreateProtocolHandler(browser_state));
- context_.set_job_factory(&job_factory_);
- }
-
- net::URLRequestContext* GetURLRequestContext() override { return &context_; }
-
- scoped_refptr<base::SingleThreadTaskRunner>
- GetNetworkTaskRunner() const override {
- return web::WebThread::GetTaskRunnerForThread(web::WebThread::IO);
- }
-
- private:
- ~TestContextURLRequestContextGetter() override {}
-
- net::TestURLRequestContext context_;
- net::URLRequestJobFactoryImpl job_factory_;
-};
-
-} // namespace
-
-TestBrowserState::TestBrowserState() : is_off_the_record_(false) {}
-
-TestBrowserState::~TestBrowserState() {
-}
-
-bool TestBrowserState::IsOffTheRecord() const {
- return is_off_the_record_;
-}
-
-base::FilePath TestBrowserState::GetStatePath() const {
- return base::FilePath();
-}
-
-net::URLRequestContextGetter* TestBrowserState::GetRequestContext() {
- if (!request_context_)
- request_context_ = new TestContextURLRequestContextGetter(this);
- return request_context_.get();
-}
-
-void TestBrowserState::SetOffTheRecord(bool flag) {
- is_off_the_record_ = flag;
-}
-
-} // namespace web
« no previous file with comments | « ios/web/public/test/test_browser_state.h ('k') | ios/web/public/test/test_native_content.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698