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

Side by Side Diff: chrome/browser/net/predictor_unittest.cc

Issue 6248026: Rename Real* to Double* in values.* and dependent files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames Created 9 years, 10 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
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 #include <time.h> 5 #include <time.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 10
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 double* use_rate) { 332 double* use_rate) {
333 ListValue* motivation_list = FindSerializationMotivation(motivation, 333 ListValue* motivation_list = FindSerializationMotivation(motivation,
334 referral_list); 334 referral_list);
335 if (!motivation_list) 335 if (!motivation_list)
336 return false; 336 return false;
337 ListValue* subresource_list; 337 ListValue* subresource_list;
338 EXPECT_TRUE(motivation_list->GetList(1, &subresource_list)); 338 EXPECT_TRUE(motivation_list->GetList(1, &subresource_list));
339 for (size_t i = 0; i < subresource_list->GetSize();) { 339 for (size_t i = 0; i < subresource_list->GetSize();) {
340 std::string url_spec; 340 std::string url_spec;
341 EXPECT_TRUE(subresource_list->GetString(i++, &url_spec)); 341 EXPECT_TRUE(subresource_list->GetString(i++, &url_spec));
342 EXPECT_TRUE(subresource_list->GetReal(i++, use_rate)); 342 EXPECT_TRUE(subresource_list->GetDouble(i++, use_rate));
343 if (subresource == GURL(url_spec)) { 343 if (subresource == GURL(url_spec)) {
344 return true; 344 return true;
345 } 345 }
346 } 346 }
347 return false; 347 return false;
348 } 348 }
349 349
350 //------------------------------------------------------------------------------ 350 //------------------------------------------------------------------------------
351 351
352 // Make sure nil referral lists really have no entries, and no latency listed. 352 // Make sure nil referral lists really have no entries, and no latency listed.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 EXPECT_NE(Predictor::CanonicalizeUrl(http), 579 EXPECT_NE(Predictor::CanonicalizeUrl(http),
580 Predictor::CanonicalizeUrl(https)); 580 Predictor::CanonicalizeUrl(https));
581 581
582 // Https works fine. 582 // Https works fine.
583 GURL long_https("https://host:999/path?query=value"); 583 GURL long_https("https://host:999/path?query=value");
584 EXPECT_EQ(Predictor::CanonicalizeUrl(long_https), 584 EXPECT_EQ(Predictor::CanonicalizeUrl(long_https),
585 long_https.GetWithEmptyPath()); 585 long_https.GetWithEmptyPath());
586 } 586 }
587 587
588 } // namespace chrome_browser_net 588 } // namespace chrome_browser_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698