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

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

Issue 1391423002: net: Remove FilePath version of URLRequestMockHTTPJob::GetMockUrl(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke review Created 5 years, 2 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 prefs->SetBoolean(prefs::kAllowDeletingBrowserHistory, false); 110 prefs->SetBoolean(prefs::kAllowDeletingBrowserHistory, false);
111 111
112 DownloadAnItem(); 112 DownloadAnItem();
113 RemoveAndWait(BrowsingDataRemover::REMOVE_DOWNLOADS); 113 RemoveAndWait(BrowsingDataRemover::REMOVE_DOWNLOADS);
114 VerifyDownloadCount(1u); 114 VerifyDownloadCount(1u);
115 } 115 }
116 #endif 116 #endif
117 117
118 // Verify can modify database after deleting it. 118 // Verify can modify database after deleting it.
119 IN_PROC_BROWSER_TEST_F(BrowsingDataRemoverBrowserTest, Database) { 119 IN_PROC_BROWSER_TEST_F(BrowsingDataRemoverBrowserTest, Database) {
120 GURL url(net::URLRequestMockHTTPJob::GetMockUrl( 120 GURL url(net::URLRequestMockHTTPJob::GetMockUrl("simple_database.html"));
121 base::FilePath().AppendASCII("simple_database.html")));
122 ui_test_utils::NavigateToURL(browser(), url); 121 ui_test_utils::NavigateToURL(browser(), url);
123 122
124 RunScriptAndCheckResult("createTable()", "done"); 123 RunScriptAndCheckResult("createTable()", "done");
125 RunScriptAndCheckResult("insertRecord('text')", "done"); 124 RunScriptAndCheckResult("insertRecord('text')", "done");
126 RunScriptAndCheckResult("getRecords()", "text"); 125 RunScriptAndCheckResult("getRecords()", "text");
127 126
128 RemoveAndWait(BrowsingDataRemover::REMOVE_SITE_DATA); 127 RemoveAndWait(BrowsingDataRemover::REMOVE_SITE_DATA);
129 128
130 ui_test_utils::NavigateToURL(browser(), url); 129 ui_test_utils::NavigateToURL(browser(), url);
131 RunScriptAndCheckResult("createTable()", "done"); 130 RunScriptAndCheckResult("createTable()", "done");
132 RunScriptAndCheckResult("insertRecord('text2')", "done"); 131 RunScriptAndCheckResult("insertRecord('text2')", "done");
133 RunScriptAndCheckResult("getRecords()", "text2"); 132 RunScriptAndCheckResult("getRecords()", "text2");
134 } 133 }
135 134
136 // Profile::ClearNetworkingHistorySince should be exercised here too see whether 135 // Profile::ClearNetworkingHistorySince should be exercised here too see whether
137 // the call gets delegated through ProfileIO[Impl]Data properly, which is hard 136 // 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. 137 // to write unit-tests for. Currently this is done by both of the above tests.
139 // Add standalone test if this changes. 138 // Add standalone test if this changes.
OLDNEW
« no previous file with comments | « chrome/browser/browser_encoding_browsertest.cc ('k') | chrome/browser/captive_portal/captive_portal_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698