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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover_browsertest.cc

Issue 845973005: [New Tab Page] Change the mechanism to intercept online NTP errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove file Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/browsing_data/browsing_data_helper.h" 8 #include "chrome/browser/browsing_data/browsing_data_helper.h"
9 #include "chrome/browser/browsing_data/browsing_data_remover.h" 9 #include "chrome/browser/browsing_data/browsing_data_remover.h"
10 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" 10 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h"
(...skipping 11 matching lines...) Expand all
22 #include "content/public/common/content_paths.h" 22 #include "content/public/common/content_paths.h"
23 #include "content/public/test/browser_test_utils.h" 23 #include "content/public/test/browser_test_utils.h"
24 #include "content/public/test/download_test_observer.h" 24 #include "content/public/test/download_test_observer.h"
25 #include "net/test/url_request/url_request_mock_http_job.h" 25 #include "net/test/url_request/url_request_mock_http_job.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 27
28 using content::BrowserThread; 28 using content::BrowserThread;
29 29
30 namespace { 30 namespace {
31 void SetUrlRequestMock(const base::FilePath& path) { 31 void SetUrlRequestMock(const base::FilePath& path) {
32 net::URLRequestMockHTTPJob::AddUrlHandler(path, 32 net::URLRequestMockHTTPJob::AddUrlHandlers(path,
33 BrowserThread::GetBlockingPool()); 33 BrowserThread::GetBlockingPool());
mmenke 2015/01/15 22:35:30 Optional: While you're here, could break the depe
Mathieu 2015/01/22 19:21:58 Actually both this test and the PolicyBrowserTest
34 } 34 }
35 } 35 }
36 36
37 class BrowsingDataRemoverBrowserTest : public InProcessBrowserTest { 37 class BrowsingDataRemoverBrowserTest : public InProcessBrowserTest {
38 public: 38 public:
39 BrowsingDataRemoverBrowserTest() {} 39 BrowsingDataRemoverBrowserTest() {}
40 40
41 void SetUpOnMainThread() override { 41 void SetUpOnMainThread() override {
42 base::FilePath path; 42 base::FilePath path;
43 PathService::Get(content::DIR_TEST_DATA, &path); 43 PathService::Get(content::DIR_TEST_DATA, &path);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 ui_test_utils::NavigateToURL(browser(), url); 130 ui_test_utils::NavigateToURL(browser(), url);
131 RunScriptAndCheckResult("createTable()", "done"); 131 RunScriptAndCheckResult("createTable()", "done");
132 RunScriptAndCheckResult("insertRecord('text2')", "done"); 132 RunScriptAndCheckResult("insertRecord('text2')", "done");
133 RunScriptAndCheckResult("getRecords()", "text2"); 133 RunScriptAndCheckResult("getRecords()", "text2");
134 } 134 }
135 135
136 // Profile::ClearNetworkingHistorySince should be exercised here too see whether 136 // Profile::ClearNetworkingHistorySince should be exercised here too see whether
137 // the call gets delegated through ProfileIO[Impl]Data properly, which is hard 137 // the call gets delegated through ProfileIO[Impl]Data properly, which is hard
138 // to write unit-tests for. Currently this is done by both of the above tests. 138 // to write unit-tests for. Currently this is done by both of the above tests.
139 // Add standalone test if this changes. 139 // Add standalone test if this changes.
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | chrome/browser/chrome_content_browser_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698