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

Side by Side Diff: chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc

Issue 22794012: Rename extension_manifest_keys namespace to extensions::manifest_keys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 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 "chrome/browser/ui/sync/profile_signin_confirmation_helper.h" 5 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 10 matching lines...) Expand all
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "chrome/browser/bookmarks/bookmark_model.h" 22 #include "chrome/browser/bookmarks/bookmark_model.h"
23 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 23 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
24 #include "chrome/browser/extensions/extension_service.h" 24 #include "chrome/browser/extensions/extension_service.h"
25 #include "chrome/browser/extensions/test_extension_system.h" 25 #include "chrome/browser/extensions/test_extension_system.h"
26 #include "chrome/browser/history/history_service.h" 26 #include "chrome/browser/history/history_service.h"
27 #include "chrome/browser/history/history_service_factory.h" 27 #include "chrome/browser/history/history_service_factory.h"
28 #include "chrome/browser/prefs/browser_prefs.h" 28 #include "chrome/browser/prefs/browser_prefs.h"
29 #include "chrome/common/extensions/extension.h" 29 #include "chrome/common/extensions/extension.h"
30 #include "chrome/common/extensions/extension_constants.h" 30 #include "chrome/common/extensions/extension_constants.h"
31 #include "chrome/common/extensions/extension_manifest_constants.h"
32 #include "chrome/common/extensions/permissions/permission_set.h" 31 #include "chrome/common/extensions/permissions/permission_set.h"
33 #include "chrome/test/base/testing_pref_service_syncable.h" 32 #include "chrome/test/base/testing_pref_service_syncable.h"
34 #include "chrome/test/base/testing_profile.h" 33 #include "chrome/test/base/testing_profile.h"
35 #include "chrome/test/base/ui_test_utils.h" 34 #include "chrome/test/base/ui_test_utils.h"
36 #include "components/user_prefs/pref_registry_syncable.h" 35 #include "components/user_prefs/pref_registry_syncable.h"
37 #include "content/public/test/test_browser_thread_bundle.h" 36 #include "content/public/test/test_browser_thread_bundle.h"
38 #include "content/public/test/test_utils.h" 37 #include "content/public/test/test_utils.h"
38 #include "extensions/common/manifest_constants.h"
39 #include "testing/gmock/include/gmock/gmock.h" 39 #include "testing/gmock/include/gmock/gmock.h"
40 #include "testing/gtest/include/gtest/gtest.h" 40 #include "testing/gtest/include/gtest/gtest.h"
41 41
42 #if defined(OS_CHROMEOS) 42 #if defined(OS_CHROMEOS)
43 #include "chrome/browser/chromeos/login/user_manager.h" 43 #include "chrome/browser/chromeos/login/user_manager.h"
44 #include "chrome/browser/chromeos/settings/cros_settings.h" 44 #include "chrome/browser/chromeos/settings/cros_settings.h"
45 #include "chrome/browser/chromeos/settings/device_settings_service.h" 45 #include "chrome/browser/chromeos/settings/device_settings_service.h"
46 #endif 46 #endif
47 47
48 namespace { 48 namespace {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 FILE_PATH_LITERAL("c:\\foo"); 90 FILE_PATH_LITERAL("c:\\foo");
91 #elif defined(OS_POSIX) 91 #elif defined(OS_POSIX)
92 const base::FilePath::CharType kExtensionFilePath[] = 92 const base::FilePath::CharType kExtensionFilePath[] =
93 FILE_PATH_LITERAL("/oo"); 93 FILE_PATH_LITERAL("/oo");
94 #endif 94 #endif
95 95
96 static scoped_refptr<extensions::Extension> CreateExtension( 96 static scoped_refptr<extensions::Extension> CreateExtension(
97 const std::string& name, 97 const std::string& name,
98 const std::string& id) { 98 const std::string& id) {
99 DictionaryValue manifest; 99 DictionaryValue manifest;
100 manifest.SetString(extension_manifest_keys::kVersion, "1.0.0.0"); 100 manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0");
101 manifest.SetString(extension_manifest_keys::kName, name); 101 manifest.SetString(extensions::manifest_keys::kName, name);
102 std::string error; 102 std::string error;
103 scoped_refptr<extensions::Extension> extension = 103 scoped_refptr<extensions::Extension> extension =
104 extensions::Extension::Create( 104 extensions::Extension::Create(
105 base::FilePath(kExtensionFilePath).AppendASCII(name), 105 base::FilePath(kExtensionFilePath).AppendASCII(name),
106 extensions::Manifest::INTERNAL, 106 extensions::Manifest::INTERNAL,
107 manifest, 107 manifest,
108 extensions::Extension::NO_FLAGS, 108 extensions::Extension::NO_FLAGS,
109 id, 109 id,
110 &error); 110 &error);
111 return extension; 111 return extension;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { 259 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) {
260 // Browser has been shut down since profile was created. 260 // Browser has been shut down since profile was created.
261 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); 261 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE);
262 EXPECT_TRUE( 262 EXPECT_TRUE(
263 GetCallbackResult( 263 GetCallbackResult(
264 base::Bind( 264 base::Bind(
265 &ui::CheckShouldPromptForNewProfile, 265 &ui::CheckShouldPromptForNewProfile,
266 profile_.get()))); 266 profile_.get())));
267 } 267 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/base_panel_browser_test.cc ('k') | chrome/browser/ui/webui/policy_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698