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

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

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/extensions/extension_service.h" 14 #include "chrome/browser/extensions/extension_service.h"
15 #include "chrome/browser/extensions/test_extension_system.h" 15 #include "chrome/browser/extensions/test_extension_system.h"
16 #include "chrome/browser/extensions/zipfile_installer.h" 16 #include "chrome/browser/extensions/zipfile_installer.h"
17 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
18 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
19 #include "content/public/test/test_browser_thread_bundle.h" 19 #include "content/public/test/test_browser_thread_bundle.h"
20 #include "content/public/test/test_utils.h" 20 #include "content/public/test/test_utils.h"
21 #include "extensions/browser/extension_registry.h" 21 #include "extensions/browser/extension_registry.h"
22 #include "extensions/browser/extension_registry_observer.h" 22 #include "extensions/browser/extension_registry_observer.h"
23 #include "extensions/common/constants.h" 23 #include "extensions/common/constants.h"
24 #include "extensions/common/extension.h" 24 #include "extensions/common/extension.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
28 #include "chrome/browser/chromeos/login/users/user_manager.h" 28 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h"
29 #include "chrome/browser/chromeos/settings/cros_settings.h" 29 #include "chrome/browser/chromeos/settings/cros_settings.h"
30 #include "chrome/browser/chromeos/settings/device_settings_service.h" 30 #include "chrome/browser/chromeos/settings/device_settings_service.h"
31 #endif 31 #endif
32 32
33 namespace extensions { 33 namespace extensions {
34 34
35 namespace { 35 namespace {
36 36
37 struct MockExtensionRegistryObserver : public ExtensionRegistryObserver { 37 struct MockExtensionRegistryObserver : public ExtensionRegistryObserver {
38 void WaitForInstall() { 38 void WaitForInstall() {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 RunInstaller("good.zip"); 128 RunInstaller("good.zip");
129 } 129 }
130 130
131 TEST_F(ZipFileInstallerTest, ZipWithPublicKey) { 131 TEST_F(ZipFileInstallerTest, ZipWithPublicKey) {
132 RunInstaller("public_key.zip"); 132 RunInstaller("public_key.zip");
133 const char kIdForPublicKey[] = "ikppjpenhoddphklkpdfdfdabbakkpal"; 133 const char kIdForPublicKey[] = "ikppjpenhoddphklkpdfdfdabbakkpal";
134 EXPECT_EQ(observer_.last_extension_installed, kIdForPublicKey); 134 EXPECT_EQ(observer_.last_extension_installed, kIdForPublicKey);
135 } 135 }
136 136
137 } // namespace extensions 137 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698