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

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

Issue 14973007: Auto-install/uninstall shared module dependencies for extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update checkimports logic per feedback Created 7 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
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/extensions/extension_prefs_unittest.h" 5 #include "chrome/browser/extensions/extension_prefs_unittest.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/prefs/mock_pref_change_callback.h" 10 #include "base/prefs/mock_pref_change_callback.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 manifest.SetString(extension_manifest_keys::kVersion, 461 manifest.SetString(extension_manifest_keys::kVersion,
462 "1." + base::IntToString(num)); 462 "1." + base::IntToString(num));
463 base::FilePath path = 463 base::FilePath path =
464 prefs_.extensions_dir().AppendASCII(base::IntToString(num)); 464 prefs_.extensions_dir().AppendASCII(base::IntToString(num));
465 std::string errors; 465 std::string errors;
466 scoped_refptr<Extension> extension = Extension::Create( 466 scoped_refptr<Extension> extension = Extension::Create(
467 path, Manifest::INTERNAL, manifest, Extension::NO_FLAGS, id, &errors); 467 path, Manifest::INTERNAL, manifest, Extension::NO_FLAGS, id, &errors);
468 ASSERT_TRUE(extension.get()) << errors; 468 ASSERT_TRUE(extension.get()) << errors;
469 ASSERT_EQ(id, extension->id()); 469 ASSERT_EQ(id, extension->id());
470 prefs()->SetDelayedInstallInfo(extension.get(), Extension::ENABLED, 470 prefs()->SetDelayedInstallInfo(extension.get(), Extension::ENABLED,
471 ExtensionPrefs::DELAY_REASON_WAIT_FOR_IDLE,
471 syncer::StringOrdinal()); 472 syncer::StringOrdinal());
472 } 473 }
473 474
474 // Verifies that we get back expected idle install information previously 475 // Verifies that we get back expected idle install information previously
475 // set by SetIdleInfo. 476 // set by SetIdleInfo.
476 void VerifyIdleInfo(std::string id, int num) { 477 void VerifyIdleInfo(std::string id, int num) {
477 scoped_ptr<ExtensionInfo> info(prefs()->GetDelayedInstallInfo(id)); 478 scoped_ptr<ExtensionInfo> info(prefs()->GetDelayedInstallInfo(id));
478 ASSERT_TRUE(info); 479 ASSERT_TRUE(info);
479 std::string version; 480 std::string version;
480 ASSERT_TRUE(info->extension_manifest->GetString("version", &version)); 481 ASSERT_TRUE(info->extension_manifest->GetString("version", &version));
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 1119
1119 private: 1120 private:
1120 scoped_refptr<const Extension> extension_a_; 1121 scoped_refptr<const Extension> extension_a_;
1121 scoped_refptr<const Extension> extension_b_; 1122 scoped_refptr<const Extension> extension_b_;
1122 scoped_refptr<const Extension> extension_c_; 1123 scoped_refptr<const Extension> extension_c_;
1123 }; 1124 };
1124 TEST_F(ExtensionPrefsBlacklistedExtensions, 1125 TEST_F(ExtensionPrefsBlacklistedExtensions,
1125 ExtensionPrefsBlacklistedExtensions) {} 1126 ExtensionPrefsBlacklistedExtensions) {}
1126 1127
1127 } // namespace extensions 1128 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698