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

Side by Side Diff: components/autofill/content/browser/autocheckout/whitelist_manager_unittest.cc

Issue 20182002: Make inttypes.h and similar macro usage C++11-friendly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: line Created 7 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/test/webdriver/http_response.cc ('k') | content/common/content_param_traits.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <cmath> 5 #include <cmath>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 EXPECT_EQ(2U, whitelist_manager_->url_prefixes().size()); 199 EXPECT_EQ(2U, whitelist_manager_->url_prefixes().size());
200 } 200 }
201 201
202 TEST_F(WhitelistManagerTest, DownloadWhitelistRetry) { 202 TEST_F(WhitelistManagerTest, DownloadWhitelistRetry) {
203 CommandLine::ForCurrentProcess()->AppendSwitch( 203 CommandLine::ForCurrentProcess()->AppendSwitch(
204 switches::kEnableExperimentalFormFilling); 204 switches::kEnableExperimentalFormFilling);
205 205
206 for (size_t i = 0; i < arraysize(kBackoffDelaysInMs); ++i) { 206 for (size_t i = 0; i < arraysize(kBackoffDelaysInMs); ++i) {
207 DownloadWhitelist(net::HTTP_INTERNAL_SERVER_ERROR, 207 DownloadWhitelist(net::HTTP_INTERNAL_SERVER_ERROR,
208 kDownloadWhitelistResponse); 208 kDownloadWhitelistResponse);
209 SCOPED_TRACE( 209 SCOPED_TRACE(base::StringPrintf("Testing retry %" PRIuS
210 base::StringPrintf("Testing retry %"PRIuS", expecting delay: %"PRId64, 210 ", expecting delay: %" PRId64,
211 i, kBackoffDelaysInMs[i])); 211 i,
212 kBackoffDelaysInMs[i]));
212 EXPECT_EQ( 213 EXPECT_EQ(
213 kBackoffDelaysInMs[i], 214 kBackoffDelaysInMs[i],
214 whitelist_manager_->download_interval().InMillisecondsRoundedUp()); 215 whitelist_manager_->download_interval().InMillisecondsRoundedUp());
215 } 216 }
216 } 217 }
217 218
218 TEST_F(WhitelistManagerTest, GetMatchedURLPrefix) { 219 TEST_F(WhitelistManagerTest, GetMatchedURLPrefix) {
219 CommandLine::ForCurrentProcess()->AppendSwitch( 220 CommandLine::ForCurrentProcess()->AppendSwitch(
220 switches::kEnableExperimentalFormFilling); 221 switches::kEnableExperimentalFormFilling);
221 DownloadWhitelist(net::HTTP_OK, kDownloadWhitelistResponse); 222 DownloadWhitelist(net::HTTP_OK, kDownloadWhitelistResponse);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 GURL("https://cart.merchant2.com/ShippingInfo?a=b&c=d"))); 300 GURL("https://cart.merchant2.com/ShippingInfo?a=b&c=d")));
300 // Bypass other urls. 301 // Bypass other urls.
301 EXPECT_EQ(std::string("https://bypass.me/"), 302 EXPECT_EQ(std::string("https://bypass.me/"),
302 whitelist_manager_->GetMatchedURLPrefix( 303 whitelist_manager_->GetMatchedURLPrefix(
303 GURL("https://bypass.me/"))); 304 GURL("https://bypass.me/")));
304 } 305 }
305 306
306 } // namespace autocheckout 307 } // namespace autocheckout
307 } // namespace autofill 308 } // namespace autofill
308 309
OLDNEW
« no previous file with comments | « chrome/test/webdriver/http_response.cc ('k') | content/common/content_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698