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

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

Issue 1149303005: Remove --enable-ipv6 and --disable-ipv6 command line flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra newline Created 5 years, 6 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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 InProcessBrowserTest::SetUp(); 288 InProcessBrowserTest::SetUp();
289 } 289 }
290 290
291 void TearDown() override { 291 void TearDown() override {
292 InProcessBrowserTest::TearDown(); 292 InProcessBrowserTest::TearDown();
293 293
294 SafeBrowsingService::RegisterFactory(NULL); 294 SafeBrowsingService::RegisterFactory(NULL);
295 } 295 }
296 296
297 void SetUpCommandLine(base::CommandLine* command_line) override { 297 void SetUpCommandLine(base::CommandLine* command_line) override {
298 // This test uses loopback. No need to use IPv6 especially it makes
299 // local requests slow on Windows trybot when ipv6 local address [::1]
300 // is not setup.
301 command_line->AppendSwitch(switches::kDisableIPv6);
302
303 // TODO(lzheng): The test server does not understand download related 298 // TODO(lzheng): The test server does not understand download related
304 // requests. We need to fix the server. 299 // requests. We need to fix the server.
305 command_line->AppendSwitch(switches::kSbDisableDownloadProtection); 300 command_line->AppendSwitch(switches::kSbDisableDownloadProtection);
306 301
307 // TODO(gcasto): Generate new testing data that includes the 302 // TODO(gcasto): Generate new testing data that includes the
308 // client-side phishing whitelist. 303 // client-side phishing whitelist.
309 command_line->AppendSwitch( 304 command_line->AppendSwitch(
310 switches::kDisableClientSidePhishingDetection); 305 switches::kDisableClientSidePhishingDetection);
311 306
312 // TODO(kalman): Generate new testing data that includes the extension 307 // TODO(kalman): Generate new testing data that includes the extension
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 safe_browsing_helper->FetchDBToVerify(test_server(), step)); 577 safe_browsing_helper->FetchDBToVerify(test_server(), step));
583 EXPECT_GT(safe_browsing_helper->response_data().size(), 0U); 578 EXPECT_GT(safe_browsing_helper->response_data().size(), 0U);
584 last_step = step; 579 last_step = step;
585 } 580 }
586 581
587 // Verifies with server if test is done and waits till server responses. 582 // Verifies with server if test is done and waits till server responses.
588 EXPECT_EQ(net::URLRequestStatus::SUCCESS, 583 EXPECT_EQ(net::URLRequestStatus::SUCCESS,
589 safe_browsing_helper->VerifyTestComplete(test_server(), last_step)); 584 safe_browsing_helper->VerifyTestComplete(test_server(), last_step));
590 EXPECT_EQ("yes", safe_browsing_helper->response_data()); 585 EXPECT_EQ("yes", safe_browsing_helper->response_data());
591 } 586 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698