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

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

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "net/url_request/url_fetcher_delegate.h" 52 #include "net/url_request/url_fetcher_delegate.h"
53 #include "net/url_request/url_request_status.h" 53 #include "net/url_request/url_request_status.h"
54 #include "testing/gtest/include/gtest/gtest.h" 54 #include "testing/gtest/include/gtest/gtest.h"
55 55
56 using content::BrowserThread; 56 using content::BrowserThread;
57 57
58 #ifndef SAFE_BROWSING_DB_LOCAL 58 #ifndef SAFE_BROWSING_DB_LOCAL
59 #error This test requires the SAFE_BROWSING_DB_LOCAL implementation. 59 #error This test requires the SAFE_BROWSING_DB_LOCAL implementation.
60 #endif 60 #endif
61 61
62 namespace safe_browsing {
63
62 namespace { 64 namespace {
63 65
64 const base::FilePath::CharType kDataFile[] = 66 const base::FilePath::CharType kDataFile[] =
65 FILE_PATH_LITERAL("testing_input_nomac.dat"); 67 FILE_PATH_LITERAL("testing_input_nomac.dat");
66 const char kUrlVerifyPath[] = "safebrowsing/verify_urls"; 68 const char kUrlVerifyPath[] = "safebrowsing/verify_urls";
67 const char kDBVerifyPath[] = "safebrowsing/verify_database"; 69 const char kDBVerifyPath[] = "safebrowsing/verify_database";
68 const char kTestCompletePath[] = "test_complete"; 70 const char kTestCompletePath[] = "test_complete";
69 71
70 struct PhishingUrl { 72 struct PhishingUrl {
71 std::string url; 73 std::string url;
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 safe_browsing_helper->FetchDBToVerify(test_server(), step)); 573 safe_browsing_helper->FetchDBToVerify(test_server(), step));
572 EXPECT_GT(safe_browsing_helper->response_data().size(), 0U); 574 EXPECT_GT(safe_browsing_helper->response_data().size(), 0U);
573 last_step = step; 575 last_step = step;
574 } 576 }
575 577
576 // Verifies with server if test is done and waits till server responses. 578 // Verifies with server if test is done and waits till server responses.
577 EXPECT_EQ(net::URLRequestStatus::SUCCESS, 579 EXPECT_EQ(net::URLRequestStatus::SUCCESS,
578 safe_browsing_helper->VerifyTestComplete(test_server(), last_step)); 580 safe_browsing_helper->VerifyTestComplete(test_server(), last_step));
579 EXPECT_EQ("yes", safe_browsing_helper->response_data()); 581 EXPECT_EQ("yes", safe_browsing_helper->response_data());
580 } 582 }
583
584 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_store_unittest.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