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

Side by Side Diff: content/common/page_state_serialization_unittest.cc

Issue 86913002: Make base::Base64Encode() return void (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more chromeos-specific fix. Created 7 years 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 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 <math.h> 5 #include <math.h>
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // BackwardsCompat_vXX tests. 366 // BackwardsCompat_vXX tests.
367 return; 367 return;
368 368
369 ExplodedPageState state; 369 ExplodedPageState state;
370 PopulatePageStateForBackwardsCompatTest(&state); 370 PopulatePageStateForBackwardsCompatTest(&state);
371 371
372 std::string encoded; 372 std::string encoded;
373 EXPECT_TRUE(EncodePageState(state, &encoded)); 373 EXPECT_TRUE(EncodePageState(state, &encoded));
374 374
375 std::string base64; 375 std::string base64;
376 EXPECT_TRUE(base::Base64Encode(encoded, &base64)); 376 base::Base64Encode(encoded, &base64);
377 377
378 base::FilePath path; 378 base::FilePath path;
379 PathService::Get(base::DIR_TEMP, &path); 379 PathService::Get(base::DIR_TEMP, &path);
380 path = path.AppendASCII("expected.dat"); 380 path = path.AppendASCII("expected.dat");
381 381
382 FILE* fp = base::OpenFile(path, "wb"); 382 FILE* fp = base::OpenFile(path, "wb");
383 ASSERT_TRUE(fp); 383 ASSERT_TRUE(fp);
384 384
385 const size_t kRowSize = 76; 385 const size_t kRowSize = 76;
386 for (size_t offset = 0; offset < base64.size(); offset += kRowSize) { 386 for (size_t offset = 0; offset < base64.size(); offset += kRowSize) {
(...skipping 29 matching lines...) Expand all
416 TEST_F(PageStateSerializationTest, BackwardsCompat_v15) { 416 TEST_F(PageStateSerializationTest, BackwardsCompat_v15) {
417 TestBackwardsCompat(15); 417 TestBackwardsCompat(15);
418 } 418 }
419 419
420 TEST_F(PageStateSerializationTest, BackwardsCompat_v16) { 420 TEST_F(PageStateSerializationTest, BackwardsCompat_v16) {
421 TestBackwardsCompat(16); 421 TestBackwardsCompat(16);
422 } 422 }
423 423
424 } // namespace 424 } // namespace
425 } // namespace content 425 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/renderer_overrides_handler.cc ('k') | content/shell/browser/webkit_test_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698