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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_test.cc

Issue 1073633002: Remove PrerenderLocalPredictor, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-local-predictor-1
Patch Set: rebase Created 5 years, 8 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 // This test uses the safebrowsing test server published at 5 // This test uses the safebrowsing test server published at
6 // http://code.google.com/p/google-safe-browsing/ to test the safebrowsing 6 // http://code.google.com/p/google-safe-browsing/ to test the safebrowsing
7 // protocol implemetation. Details of the safebrowsing testing flow is 7 // protocol implemetation. Details of the safebrowsing testing flow is
8 // documented at 8 // documented at
9 // http://code.google.com/p/google-safe-browsing/wiki/ProtocolTesting 9 // http://code.google.com/p/google-safe-browsing/wiki/ProtocolTesting
10 // 10 //
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 command_line->AppendSwitch(switches::kSbDisableDownloadProtection); 291 command_line->AppendSwitch(switches::kSbDisableDownloadProtection);
292 292
293 // TODO(gcasto): Generate new testing data that includes the 293 // TODO(gcasto): Generate new testing data that includes the
294 // client-side phishing whitelist. 294 // client-side phishing whitelist.
295 command_line->AppendSwitch( 295 command_line->AppendSwitch(
296 switches::kDisableClientSidePhishingDetection); 296 switches::kDisableClientSidePhishingDetection);
297 297
298 // TODO(kalman): Generate new testing data that includes the extension 298 // TODO(kalman): Generate new testing data that includes the extension
299 // blacklist. 299 // blacklist.
300 command_line->AppendSwitch(switches::kSbDisableExtensionBlacklist); 300 command_line->AppendSwitch(switches::kSbDisableExtensionBlacklist);
301
302 // TODO(tburkard): Generate new testing data that includes the side-effect
303 // free whitelist.
304 command_line->AppendSwitch(switches::kSbDisableSideEffectFreeWhitelist);
305 } 301 }
306 302
307 void SetTestStep(int step) { 303 void SetTestStep(int step) {
308 std::string test_step = base::StringPrintf("test_step=%d", step); 304 std::string test_step = base::StringPrintf("test_step=%d", step);
309 safe_browsing_service_->protocol_manager_->set_additional_query(test_step); 305 safe_browsing_service_->protocol_manager_->set_additional_query(test_step);
310 } 306 }
311 307
312 private: 308 private:
313 scoped_ptr<TestSafeBrowsingServiceFactory> sb_factory_; 309 scoped_ptr<TestSafeBrowsingServiceFactory> sb_factory_;
314 310
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 safe_browsing_helper->FetchDBToVerify(test_server(), step)); 569 safe_browsing_helper->FetchDBToVerify(test_server(), step));
574 EXPECT_GT(safe_browsing_helper->response_data().size(), 0U); 570 EXPECT_GT(safe_browsing_helper->response_data().size(), 0U);
575 last_step = step; 571 last_step = step;
576 } 572 }
577 573
578 // Verifies with server if test is done and waits till server responses. 574 // Verifies with server if test is done and waits till server responses.
579 EXPECT_EQ(net::URLRequestStatus::SUCCESS, 575 EXPECT_EQ(net::URLRequestStatus::SUCCESS,
580 safe_browsing_helper->VerifyTestComplete(test_server(), last_step)); 576 safe_browsing_helper->VerifyTestComplete(test_server(), last_step));
581 EXPECT_EQ("yes", safe_browsing_helper->response_data()); 577 EXPECT_EQ("yes", safe_browsing_helper->response_data());
582 } 578 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc ('k') | chrome/browser/safe_browsing/safe_browsing_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698