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

Side by Side Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 6965018: Install CRX updates one at a time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Polish Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extensions/extension_service_unittest.h" 5 #include "chrome/browser/extensions/extension_service_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 FilePath path = temp_dir_.path(); 658 FilePath path = temp_dir_.path();
659 path = path.Append(in_path.BaseName()); 659 path = path.Append(in_path.BaseName());
660 ASSERT_TRUE(file_util::CopyFile(in_path, path)); 660 ASSERT_TRUE(file_util::CopyFile(in_path, path));
661 661
662 int previous_enabled_extension_count = 662 int previous_enabled_extension_count =
663 service_->extensions()->size(); 663 service_->extensions()->size();
664 int previous_installed_extension_count = 664 int previous_installed_extension_count =
665 previous_enabled_extension_count + 665 previous_enabled_extension_count +
666 service_->disabled_extensions()->size(); 666 service_->disabled_extensions()->size();
667 667
668 service_->UpdateExtension(id, path, GURL()); 668 service_->UpdateExtension(id, path, GURL(), NULL);
669 loop_.RunAllPending(); 669 loop_.RunAllPending();
670 670
671 std::vector<std::string> errors = GetErrors(); 671 std::vector<std::string> errors = GetErrors();
672 int error_count = errors.size(); 672 int error_count = errors.size();
673 int enabled_extension_count = 673 int enabled_extension_count =
674 service_->extensions()->size(); 674 service_->extensions()->size();
675 int installed_extension_count = 675 int installed_extension_count =
676 enabled_extension_count + service_->disabled_extensions()->size(); 676 enabled_extension_count + service_->disabled_extensions()->size();
677 677
678 int expected_error_count = (expected_state == FAILED) ? 1 : 0; 678 int expected_error_count = (expected_state == FAILED) ? 1 : 0;
(...skipping 3121 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 ASSERT_FALSE(AddPendingSyncInstall()); 3800 ASSERT_FALSE(AddPendingSyncInstall());
3801 3801
3802 // Wait for the external source to install. 3802 // Wait for the external source to install.
3803 WaitForCrxInstall(crx_path_, true); 3803 WaitForCrxInstall(crx_path_, true);
3804 ASSERT_TRUE(IsCrxInstalled()); 3804 ASSERT_TRUE(IsCrxInstalled());
3805 3805
3806 // Now that the extension is installed, sync request should fail 3806 // Now that the extension is installed, sync request should fail
3807 // because the extension is already installed. 3807 // because the extension is already installed.
3808 ASSERT_FALSE(AddPendingSyncInstall()); 3808 ASSERT_FALSE(AddPendingSyncInstall());
3809 } 3809 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698