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

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

Issue 356843002: [Android] Disable connect type check for unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjust the order of debugging fields Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc ('k') | no next file » | 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 public: 111 public:
112 explicit FakeSafeBrowsingService(const std::string& url_prefix) 112 explicit FakeSafeBrowsingService(const std::string& url_prefix)
113 : url_prefix_(url_prefix) {} 113 : url_prefix_(url_prefix) {}
114 114
115 virtual SafeBrowsingProtocolConfig GetProtocolConfig() const OVERRIDE { 115 virtual SafeBrowsingProtocolConfig GetProtocolConfig() const OVERRIDE {
116 SafeBrowsingProtocolConfig config; 116 SafeBrowsingProtocolConfig config;
117 config.url_prefix = url_prefix_; 117 config.url_prefix = url_prefix_;
118 // Makes sure the auto update is not triggered. The tests will force the 118 // Makes sure the auto update is not triggered. The tests will force the
119 // update when needed. 119 // update when needed.
120 config.disable_auto_update = true; 120 config.disable_auto_update = true;
121 #if defined(OS_ANDROID)
122 config.disable_connection_check = true;
123 #endif
121 config.client_name = "browser_tests"; 124 config.client_name = "browser_tests";
122 return config; 125 return config;
123 } 126 }
124 127
125 private: 128 private:
126 virtual ~FakeSafeBrowsingService() {} 129 virtual ~FakeSafeBrowsingService() {}
127 130
128 std::string url_prefix_; 131 std::string url_prefix_;
129 132
130 DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingService); 133 DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingService);
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 safe_browsing_helper->FetchDBToVerify(test_server(), step)); 572 safe_browsing_helper->FetchDBToVerify(test_server(), step));
570 EXPECT_GT(safe_browsing_helper->response_data().size(), 0U); 573 EXPECT_GT(safe_browsing_helper->response_data().size(), 0U);
571 last_step = step; 574 last_step = step;
572 } 575 }
573 576
574 // Verifies with server if test is done and waits till server responses. 577 // Verifies with server if test is done and waits till server responses.
575 EXPECT_EQ(net::URLRequestStatus::SUCCESS, 578 EXPECT_EQ(net::URLRequestStatus::SUCCESS,
576 safe_browsing_helper->VerifyTestComplete(test_server(), last_step)); 579 safe_browsing_helper->VerifyTestComplete(test_server(), last_step));
577 EXPECT_EQ("yes", safe_browsing_helper->response_data()); 580 EXPECT_EQ("yes", safe_browsing_helper->response_data());
578 } 581 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698