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

Side by Side Diff: chrome/browser/drive/drive_uploader_unittest.cc

Issue 1042803002: Drive: Move inner structures of DriveAPIService under drive namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 5 years, 8 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
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 #include "chrome/browser/drive/drive_uploader.h" 5 #include "chrome/browser/drive/drive_uploader.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 DriveApiErrorCode error = DRIVE_OTHER_ERROR; 428 DriveApiErrorCode error = DRIVE_OTHER_ERROR;
429 GURL upload_location; 429 GURL upload_location;
430 scoped_ptr<FileResource> entry; 430 scoped_ptr<FileResource> entry;
431 431
432 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size()); 432 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size());
433 DriveUploader uploader(&mock_service, 433 DriveUploader uploader(&mock_service,
434 base::MessageLoopProxy::current().get()); 434 base::MessageLoopProxy::current().get());
435 std::vector<test_util::ProgressInfo> upload_progress_values; 435 std::vector<test_util::ProgressInfo> upload_progress_values;
436 uploader.UploadExistingFile( 436 uploader.UploadExistingFile(
437 kTestInitiateUploadResourceId, 437 kTestInitiateUploadResourceId, local_path, kTestMimeType,
438 local_path, 438 UploadExistingFileOptions(),
439 kTestMimeType, 439 test_util::CreateCopyResultCallback(&error, &upload_location, &entry),
440 DriveUploader::UploadExistingFileOptions(),
441 test_util::CreateCopyResultCallback(
442 &error, &upload_location, &entry),
443 base::Bind(&test_util::AppendProgressCallbackResult, 440 base::Bind(&test_util::AppendProgressCallbackResult,
444 &upload_progress_values)); 441 &upload_progress_values));
445 base::RunLoop().RunUntilIdle(); 442 base::RunLoop().RunUntilIdle();
446 443
447 EXPECT_EQ(0, mock_service.resume_upload_call_count()); 444 EXPECT_EQ(0, mock_service.resume_upload_call_count());
448 EXPECT_EQ(1, mock_service.multipart_upload_call_count()); 445 EXPECT_EQ(1, mock_service.multipart_upload_call_count());
449 EXPECT_EQ(0, mock_service.received_bytes()); 446 EXPECT_EQ(0, mock_service.received_bytes());
450 EXPECT_EQ(HTTP_SUCCESS, error); 447 EXPECT_EQ(HTTP_SUCCESS, error);
451 EXPECT_TRUE(upload_location.is_empty()); 448 EXPECT_TRUE(upload_location.is_empty());
452 ASSERT_TRUE(entry); 449 ASSERT_TRUE(entry);
(...skipping 10 matching lines...) Expand all
463 460
464 DriveApiErrorCode error = DRIVE_OTHER_ERROR; 461 DriveApiErrorCode error = DRIVE_OTHER_ERROR;
465 GURL upload_location; 462 GURL upload_location;
466 scoped_ptr<FileResource> entry; 463 scoped_ptr<FileResource> entry;
467 464
468 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size()); 465 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size());
469 DriveUploader uploader(&mock_service, 466 DriveUploader uploader(&mock_service,
470 base::MessageLoopProxy::current().get()); 467 base::MessageLoopProxy::current().get());
471 std::vector<test_util::ProgressInfo> upload_progress_values; 468 std::vector<test_util::ProgressInfo> upload_progress_values;
472 uploader.UploadExistingFile( 469 uploader.UploadExistingFile(
473 kTestInitiateUploadResourceId, 470 kTestInitiateUploadResourceId, local_path, kTestMimeType,
474 local_path, 471 UploadExistingFileOptions(),
475 kTestMimeType, 472 test_util::CreateCopyResultCallback(&error, &upload_location, &entry),
476 DriveUploader::UploadExistingFileOptions(),
477 test_util::CreateCopyResultCallback(
478 &error, &upload_location, &entry),
479 base::Bind(&test_util::AppendProgressCallbackResult, 473 base::Bind(&test_util::AppendProgressCallbackResult,
480 &upload_progress_values)); 474 &upload_progress_values));
481 base::RunLoop().RunUntilIdle(); 475 base::RunLoop().RunUntilIdle();
482 476
483 // 512KB upload should be uploaded as multipart body. 477 // 512KB upload should be uploaded as multipart body.
484 EXPECT_EQ(0, mock_service.resume_upload_call_count()); 478 EXPECT_EQ(0, mock_service.resume_upload_call_count());
485 EXPECT_EQ(1, mock_service.multipart_upload_call_count()); 479 EXPECT_EQ(1, mock_service.multipart_upload_call_count());
486 EXPECT_EQ(512 * 1024, mock_service.received_bytes()); 480 EXPECT_EQ(512 * 1024, mock_service.received_bytes());
487 EXPECT_EQ(HTTP_SUCCESS, error); 481 EXPECT_EQ(HTTP_SUCCESS, error);
488 EXPECT_TRUE(upload_location.is_empty()); 482 EXPECT_TRUE(upload_location.is_empty());
(...skipping 13 matching lines...) Expand all
502 DriveApiErrorCode error = DRIVE_OTHER_ERROR; 496 DriveApiErrorCode error = DRIVE_OTHER_ERROR;
503 GURL upload_location; 497 GURL upload_location;
504 scoped_ptr<FileResource> entry; 498 scoped_ptr<FileResource> entry;
505 499
506 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size()); 500 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size());
507 DriveUploader uploader(&mock_service, 501 DriveUploader uploader(&mock_service,
508 base::MessageLoopProxy::current().get()); 502 base::MessageLoopProxy::current().get());
509 std::vector<test_util::ProgressInfo> upload_progress_values; 503 std::vector<test_util::ProgressInfo> upload_progress_values;
510 uploader.UploadExistingFile( 504 uploader.UploadExistingFile(
511 kTestInitiateUploadResourceId, local_path, kTestMimeType, 505 kTestInitiateUploadResourceId, local_path, kTestMimeType,
512 DriveUploader::UploadExistingFileOptions(), 506 UploadExistingFileOptions(),
513 test_util::CreateCopyResultCallback(&error, &upload_location, &entry), 507 test_util::CreateCopyResultCallback(&error, &upload_location, &entry),
514 base::Bind(&test_util::AppendProgressCallbackResult, 508 base::Bind(&test_util::AppendProgressCallbackResult,
515 &upload_progress_values)); 509 &upload_progress_values));
516 base::RunLoop().RunUntilIdle(); 510 base::RunLoop().RunUntilIdle();
517 511
518 // 2MB upload should not be split into multiple chunks. 512 // 2MB upload should not be split into multiple chunks.
519 EXPECT_EQ(1, mock_service.resume_upload_call_count()); 513 EXPECT_EQ(1, mock_service.resume_upload_call_count());
520 EXPECT_EQ(0, mock_service.multipart_upload_call_count()); 514 EXPECT_EQ(0, mock_service.multipart_upload_call_count());
521 EXPECT_EQ(2 * 1024 * 1024, mock_service.received_bytes()); 515 EXPECT_EQ(2 * 1024 * 1024, mock_service.received_bytes());
522 EXPECT_EQ(HTTP_SUCCESS, error); 516 EXPECT_EQ(HTTP_SUCCESS, error);
(...skipping 13 matching lines...) Expand all
536 530
537 DriveApiErrorCode error = HTTP_SUCCESS; 531 DriveApiErrorCode error = HTTP_SUCCESS;
538 GURL upload_location; 532 GURL upload_location;
539 scoped_ptr<FileResource> entry; 533 scoped_ptr<FileResource> entry;
540 534
541 MockDriveServiceNoConnectionAtInitiate mock_service; 535 MockDriveServiceNoConnectionAtInitiate mock_service;
542 DriveUploader uploader(&mock_service, 536 DriveUploader uploader(&mock_service,
543 base::MessageLoopProxy::current().get()); 537 base::MessageLoopProxy::current().get());
544 uploader.UploadExistingFile( 538 uploader.UploadExistingFile(
545 kTestInitiateUploadResourceId, local_path, kTestMimeType, 539 kTestInitiateUploadResourceId, local_path, kTestMimeType,
546 DriveUploader::UploadExistingFileOptions(), 540 UploadExistingFileOptions(),
547 test_util::CreateCopyResultCallback(&error, &upload_location, &entry), 541 test_util::CreateCopyResultCallback(&error, &upload_location, &entry),
548 google_apis::ProgressCallback()); 542 google_apis::ProgressCallback());
549 base::RunLoop().RunUntilIdle(); 543 base::RunLoop().RunUntilIdle();
550 544
551 EXPECT_EQ(DRIVE_NO_CONNECTION, error); 545 EXPECT_EQ(DRIVE_NO_CONNECTION, error);
552 EXPECT_TRUE(upload_location.is_empty()); 546 EXPECT_TRUE(upload_location.is_empty());
553 EXPECT_FALSE(entry); 547 EXPECT_FALSE(entry);
554 } 548 }
555 549
556 TEST_F(DriveUploaderTest, MultipartUploadFail) { 550 TEST_F(DriveUploaderTest, MultipartUploadFail) {
557 base::FilePath local_path; 551 base::FilePath local_path;
558 std::string data; 552 std::string data;
559 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize(temp_dir_.path(), 512 * 1024, 553 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize(temp_dir_.path(), 512 * 1024,
560 &local_path, &data)); 554 &local_path, &data));
561 555
562 DriveApiErrorCode error = HTTP_SUCCESS; 556 DriveApiErrorCode error = HTTP_SUCCESS;
563 GURL upload_location; 557 GURL upload_location;
564 scoped_ptr<FileResource> entry; 558 scoped_ptr<FileResource> entry;
565 559
566 MockDriveServiceNoConnectionAtInitiate mock_service; 560 MockDriveServiceNoConnectionAtInitiate mock_service;
567 DriveUploader uploader(&mock_service, 561 DriveUploader uploader(&mock_service,
568 base::MessageLoopProxy::current().get()); 562 base::MessageLoopProxy::current().get());
569 uploader.UploadExistingFile(kTestInitiateUploadResourceId, 563 uploader.UploadExistingFile(
570 local_path, 564 kTestInitiateUploadResourceId, local_path, kTestMimeType,
571 kTestMimeType, 565 UploadExistingFileOptions(),
572 DriveUploader::UploadExistingFileOptions(), 566 test_util::CreateCopyResultCallback(&error, &upload_location, &entry),
573 test_util::CreateCopyResultCallback( 567 google_apis::ProgressCallback());
574 &error, &upload_location, &entry),
575 google_apis::ProgressCallback());
576 base::RunLoop().RunUntilIdle(); 568 base::RunLoop().RunUntilIdle();
577 569
578 EXPECT_EQ(DRIVE_NO_CONNECTION, error); 570 EXPECT_EQ(DRIVE_NO_CONNECTION, error);
579 EXPECT_TRUE(upload_location.is_empty()); 571 EXPECT_TRUE(upload_location.is_empty());
580 EXPECT_FALSE(entry); 572 EXPECT_FALSE(entry);
581 } 573 }
582 574
583 TEST_F(DriveUploaderTest, InitiateUploadNoConflict) { 575 TEST_F(DriveUploaderTest, InitiateUploadNoConflict) {
584 base::FilePath local_path; 576 base::FilePath local_path;
585 std::string data; 577 std::string data;
586 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize( 578 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize(
587 temp_dir_.path(), 512 * 1024, &local_path, &data)); 579 temp_dir_.path(), 512 * 1024, &local_path, &data));
588 580
589 DriveApiErrorCode error = DRIVE_OTHER_ERROR; 581 DriveApiErrorCode error = DRIVE_OTHER_ERROR;
590 GURL upload_location; 582 GURL upload_location;
591 scoped_ptr<FileResource> entry; 583 scoped_ptr<FileResource> entry;
592 584
593 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size()); 585 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size());
594 DriveUploader uploader(&mock_service, 586 DriveUploader uploader(&mock_service,
595 base::MessageLoopProxy::current().get()); 587 base::MessageLoopProxy::current().get());
596 DriveUploader::UploadExistingFileOptions options; 588 UploadExistingFileOptions options;
597 options.etag = kTestETag; 589 options.etag = kTestETag;
598 uploader.UploadExistingFile(kTestInitiateUploadResourceId, 590 uploader.UploadExistingFile(kTestInitiateUploadResourceId,
599 local_path, 591 local_path,
600 kTestMimeType, 592 kTestMimeType,
601 options, 593 options,
602 test_util::CreateCopyResultCallback( 594 test_util::CreateCopyResultCallback(
603 &error, &upload_location, &entry), 595 &error, &upload_location, &entry),
604 google_apis::ProgressCallback()); 596 google_apis::ProgressCallback());
605 base::RunLoop().RunUntilIdle(); 597 base::RunLoop().RunUntilIdle();
606 598
607 EXPECT_EQ(HTTP_SUCCESS, error); 599 EXPECT_EQ(HTTP_SUCCESS, error);
608 EXPECT_TRUE(upload_location.is_empty()); 600 EXPECT_TRUE(upload_location.is_empty());
609 } 601 }
610 602
611 TEST_F(DriveUploaderTest, MultipartUploadConflict) { 603 TEST_F(DriveUploaderTest, MultipartUploadConflict) {
612 base::FilePath local_path; 604 base::FilePath local_path;
613 std::string data; 605 std::string data;
614 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize( 606 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize(
615 temp_dir_.path(), 512 * 1024, &local_path, &data)); 607 temp_dir_.path(), 512 * 1024, &local_path, &data));
616 const std::string kDestinationETag("destination_etag"); 608 const std::string kDestinationETag("destination_etag");
617 609
618 DriveApiErrorCode error = DRIVE_OTHER_ERROR; 610 DriveApiErrorCode error = DRIVE_OTHER_ERROR;
619 GURL upload_location; 611 GURL upload_location;
620 scoped_ptr<FileResource> entry; 612 scoped_ptr<FileResource> entry;
621 613
622 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size()); 614 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size());
623 DriveUploader uploader(&mock_service, 615 DriveUploader uploader(&mock_service,
624 base::MessageLoopProxy::current().get()); 616 base::MessageLoopProxy::current().get());
625 DriveUploader::UploadExistingFileOptions options; 617 UploadExistingFileOptions options;
626 options.etag = kDestinationETag; 618 options.etag = kDestinationETag;
627 uploader.UploadExistingFile(kTestInitiateUploadResourceId, 619 uploader.UploadExistingFile(kTestInitiateUploadResourceId,
628 local_path, 620 local_path,
629 kTestMimeType, 621 kTestMimeType,
630 options, 622 options,
631 test_util::CreateCopyResultCallback( 623 test_util::CreateCopyResultCallback(
632 &error, &upload_location, &entry), 624 &error, &upload_location, &entry),
633 google_apis::ProgressCallback()); 625 google_apis::ProgressCallback());
634 base::RunLoop().RunUntilIdle(); 626 base::RunLoop().RunUntilIdle();
635 627
636 EXPECT_EQ(HTTP_CONFLICT, error); 628 EXPECT_EQ(HTTP_CONFLICT, error);
637 EXPECT_TRUE(upload_location.is_empty()); 629 EXPECT_TRUE(upload_location.is_empty());
638 } 630 }
639 631
640 TEST_F(DriveUploaderTest, InitiateUploadConflict) { 632 TEST_F(DriveUploaderTest, InitiateUploadConflict) {
641 base::FilePath local_path; 633 base::FilePath local_path;
642 std::string data; 634 std::string data;
643 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize( 635 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize(
644 temp_dir_.path(), 2 * 1024 * 1024, &local_path, &data)); 636 temp_dir_.path(), 2 * 1024 * 1024, &local_path, &data));
645 const std::string kDestinationETag("destination_etag"); 637 const std::string kDestinationETag("destination_etag");
646 638
647 DriveApiErrorCode error = DRIVE_OTHER_ERROR; 639 DriveApiErrorCode error = DRIVE_OTHER_ERROR;
648 GURL upload_location; 640 GURL upload_location;
649 scoped_ptr<FileResource> entry; 641 scoped_ptr<FileResource> entry;
650 642
651 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size()); 643 MockDriveServiceWithUploadExpectation mock_service(local_path, data.size());
652 DriveUploader uploader(&mock_service, 644 DriveUploader uploader(&mock_service,
653 base::MessageLoopProxy::current().get()); 645 base::MessageLoopProxy::current().get());
654 DriveUploader::UploadExistingFileOptions options; 646 UploadExistingFileOptions options;
655 options.etag = kDestinationETag; 647 options.etag = kDestinationETag;
656 uploader.UploadExistingFile( 648 uploader.UploadExistingFile(
657 kTestInitiateUploadResourceId, local_path, kTestMimeType, options, 649 kTestInitiateUploadResourceId, local_path, kTestMimeType, options,
658 test_util::CreateCopyResultCallback(&error, &upload_location, &entry), 650 test_util::CreateCopyResultCallback(&error, &upload_location, &entry),
659 google_apis::ProgressCallback()); 651 google_apis::ProgressCallback());
660 base::RunLoop().RunUntilIdle(); 652 base::RunLoop().RunUntilIdle();
661 653
662 EXPECT_EQ(HTTP_CONFLICT, error); 654 EXPECT_EQ(HTTP_CONFLICT, error);
663 EXPECT_TRUE(upload_location.is_empty()); 655 EXPECT_TRUE(upload_location.is_empty());
664 } 656 }
665 657
666 TEST_F(DriveUploaderTest, ResumeUploadFail) { 658 TEST_F(DriveUploaderTest, ResumeUploadFail) {
667 base::FilePath local_path; 659 base::FilePath local_path;
668 std::string data; 660 std::string data;
669 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize( 661 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize(
670 temp_dir_.path(), 2 * 1024 * 1024, &local_path, &data)); 662 temp_dir_.path(), 2 * 1024 * 1024, &local_path, &data));
671 663
672 DriveApiErrorCode error = HTTP_SUCCESS; 664 DriveApiErrorCode error = HTTP_SUCCESS;
673 GURL upload_location; 665 GURL upload_location;
674 scoped_ptr<FileResource> entry; 666 scoped_ptr<FileResource> entry;
675 667
676 MockDriveServiceNoConnectionAtResume mock_service; 668 MockDriveServiceNoConnectionAtResume mock_service;
677 DriveUploader uploader(&mock_service, 669 DriveUploader uploader(&mock_service,
678 base::MessageLoopProxy::current().get()); 670 base::MessageLoopProxy::current().get());
679 uploader.UploadExistingFile(kTestInitiateUploadResourceId, 671 uploader.UploadExistingFile(
680 local_path, 672 kTestInitiateUploadResourceId, local_path, kTestMimeType,
681 kTestMimeType, 673 UploadExistingFileOptions(),
682 DriveUploader::UploadExistingFileOptions(), 674 test_util::CreateCopyResultCallback(&error, &upload_location, &entry),
683 test_util::CreateCopyResultCallback( 675 google_apis::ProgressCallback());
684 &error, &upload_location, &entry),
685 google_apis::ProgressCallback());
686 base::RunLoop().RunUntilIdle(); 676 base::RunLoop().RunUntilIdle();
687 677
688 EXPECT_EQ(DRIVE_NO_CONNECTION, error); 678 EXPECT_EQ(DRIVE_NO_CONNECTION, error);
689 EXPECT_EQ(GURL(kTestUploadExistingFileURL), upload_location); 679 EXPECT_EQ(GURL(kTestUploadExistingFileURL), upload_location);
690 } 680 }
691 681
692 TEST_F(DriveUploaderTest, GetUploadStatusFail) { 682 TEST_F(DriveUploaderTest, GetUploadStatusFail) {
693 base::FilePath local_path; 683 base::FilePath local_path;
694 std::string data; 684 std::string data;
695 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize( 685 ASSERT_TRUE(test_util::CreateFileOfSpecifiedSize(
(...skipping 21 matching lines...) Expand all
717 TEST_F(DriveUploaderTest, NonExistingSourceFile) { 707 TEST_F(DriveUploaderTest, NonExistingSourceFile) {
718 DriveApiErrorCode error = DRIVE_OTHER_ERROR; 708 DriveApiErrorCode error = DRIVE_OTHER_ERROR;
719 GURL upload_location; 709 GURL upload_location;
720 scoped_ptr<FileResource> entry; 710 scoped_ptr<FileResource> entry;
721 711
722 DriveUploader uploader(NULL, // NULL, the service won't be used. 712 DriveUploader uploader(NULL, // NULL, the service won't be used.
723 base::MessageLoopProxy::current().get()); 713 base::MessageLoopProxy::current().get());
724 uploader.UploadExistingFile( 714 uploader.UploadExistingFile(
725 kTestInitiateUploadResourceId, 715 kTestInitiateUploadResourceId,
726 temp_dir_.path().AppendASCII("_this_path_should_not_exist_"), 716 temp_dir_.path().AppendASCII("_this_path_should_not_exist_"),
727 kTestMimeType, 717 kTestMimeType, UploadExistingFileOptions(),
728 DriveUploader::UploadExistingFileOptions(), 718 test_util::CreateCopyResultCallback(&error, &upload_location, &entry),
729 test_util::CreateCopyResultCallback(
730 &error, &upload_location, &entry),
731 google_apis::ProgressCallback()); 719 google_apis::ProgressCallback());
732 base::RunLoop().RunUntilIdle(); 720 base::RunLoop().RunUntilIdle();
733 721
734 // Should return failure without doing any attempt to connect to the server. 722 // Should return failure without doing any attempt to connect to the server.
735 EXPECT_EQ(HTTP_NOT_FOUND, error); 723 EXPECT_EQ(HTTP_NOT_FOUND, error);
736 EXPECT_TRUE(upload_location.is_empty()); 724 EXPECT_TRUE(upload_location.is_empty());
737 } 725 }
738 726
739 TEST_F(DriveUploaderTest, ResumeUpload) { 727 TEST_F(DriveUploaderTest, ResumeUpload) {
740 base::FilePath local_path; 728 base::FilePath local_path;
(...skipping 28 matching lines...) Expand all
769 EXPECT_EQ(HTTP_SUCCESS, error); 757 EXPECT_EQ(HTTP_SUCCESS, error);
770 EXPECT_TRUE(upload_location.is_empty()); 758 EXPECT_TRUE(upload_location.is_empty());
771 ASSERT_TRUE(entry); 759 ASSERT_TRUE(entry);
772 EXPECT_EQ(kTestDummyMd5, entry->md5_checksum()); 760 EXPECT_EQ(kTestDummyMd5, entry->md5_checksum());
773 ASSERT_EQ(1U, upload_progress_values.size()); 761 ASSERT_EQ(1U, upload_progress_values.size());
774 EXPECT_EQ(test_util::ProgressInfo(1024 * 1024, 1024 * 1024), 762 EXPECT_EQ(test_util::ProgressInfo(1024 * 1024, 1024 * 1024),
775 upload_progress_values[0]); 763 upload_progress_values[0]);
776 } 764 }
777 765
778 } // namespace drive 766 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_uploader.h ('k') | chrome/browser/drive/fake_drive_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698