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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 URLRequestStatus::Status response_status_; 519 URLRequestStatus::Status response_status_;
520 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceTestHelper); 520 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceTestHelper);
521 }; 521 };
522 522
523 IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, SafeBrowsingSystemTest) { 523 IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, SafeBrowsingSystemTest) {
524 LOG(INFO) << "Start test"; 524 LOG(INFO) << "Start test";
525 const char* server_host = SafeBrowsingTestServer::Host(); 525 const char* server_host = SafeBrowsingTestServer::Host();
526 int server_port = SafeBrowsingTestServer::Port(); 526 int server_port = SafeBrowsingTestServer::Port();
527 ASSERT_TRUE(InitSafeBrowsingService()); 527 ASSERT_TRUE(InitSafeBrowsingService());
528 528
529 scoped_refptr<SafeBrowsingServiceTestHelper> safe_browsing_helper = 529 scoped_refptr<SafeBrowsingServiceTestHelper> safe_browsing_helper(
530 new SafeBrowsingServiceTestHelper(this); 530 new SafeBrowsingServiceTestHelper(this));
531 int last_step = 0; 531 int last_step = 0;
532 FilePath datafile_path = FilePath(kDataFile); 532 FilePath datafile_path = FilePath(kDataFile);
533 SafeBrowsingTestServer test_server(datafile_path); 533 SafeBrowsingTestServer test_server(datafile_path);
534 ASSERT_TRUE(test_server.Start()); 534 ASSERT_TRUE(test_server.Start());
535 535
536 // Make sure the server is running. 536 // Make sure the server is running.
537 safe_browsing_helper->WaitTillServerReady(server_host, server_port); 537 safe_browsing_helper->WaitTillServerReady(server_host, server_port);
538 538
539 // Waits and makes sure safebrowsing update is not happening. 539 // Waits and makes sure safebrowsing update is not happening.
540 // The wait will stop once OnWaitForStatusUpdateDone in 540 // The wait will stop once OnWaitForStatusUpdateDone in
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 629
630 // Verifies with server if test is done and waits till server responses. 630 // Verifies with server if test is done and waits till server responses.
631 // EXPECT_EQ(URLRequestStatus::SUCCESS, 631 // EXPECT_EQ(URLRequestStatus::SUCCESS,
632 // safe_browsing_helper->VerifyTestComplete(server_host, 632 // safe_browsing_helper->VerifyTestComplete(server_host,
633 // server_port, 633 // server_port,
634 // last_step)); 634 // last_step));
635 // EXPECT_EQ("yes", safe_browsing_helper->response_data()); 635 // EXPECT_EQ("yes", safe_browsing_helper->response_data());
636 test_server.Stop(); 636 test_server.Stop();
637 } 637 }
638 638
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698