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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/extensions/blacklist.h" 8 #include "chrome/browser/extensions/blacklist.h"
9 #include "chrome/browser/extensions/extension_prefs.h" 9 #include "chrome/browser/extensions/extension_prefs.h"
10 #include "chrome/browser/extensions/standard_management_policy_provider.h" 10 #include "chrome/browser/extensions/standard_management_policy_provider.h"
(...skipping 23 matching lines...) Expand all
34 base::DictionaryValue values; 34 base::DictionaryValue values;
35 values.SetString(extension_manifest_keys::kName, "test"); 35 values.SetString(extension_manifest_keys::kName, "test");
36 values.SetString(extension_manifest_keys::kVersion, "0.1"); 36 values.SetString(extension_manifest_keys::kVersion, "0.1");
37 std::string error; 37 std::string error;
38 scoped_refptr<const Extension> extension = Extension::Create( 38 scoped_refptr<const Extension> extension = Extension::Create(
39 base::FilePath(), location, values, Extension::NO_FLAGS, &error); 39 base::FilePath(), location, values, Extension::NO_FLAGS, &error);
40 CHECK(extension.get()) << error; 40 CHECK(extension.get()) << error;
41 return extension; 41 return extension;
42 } 42 }
43 43
44 MessageLoop message_loop_; 44 base::MessageLoop message_loop_;
45 content::TestBrowserThread ui_thread_; 45 content::TestBrowserThread ui_thread_;
46 content::TestBrowserThread file_thread_; 46 content::TestBrowserThread file_thread_;
47 47
48 TestExtensionPrefs prefs_; 48 TestExtensionPrefs prefs_;
49 49
50 StandardManagementPolicyProvider provider_; 50 StandardManagementPolicyProvider provider_;
51 }; 51 };
52 52
53 // Tests the behavior of the ManagementPolicy provider methods for an 53 // Tests the behavior of the ManagementPolicy provider methods for an
54 // extension required by policy. 54 // extension required by policy.
(...skipping 22 matching lines...) Expand all
77 string16 error16; 77 string16 error16;
78 EXPECT_TRUE(provider_.UserMayLoad(extension.get(), &error16)); 78 EXPECT_TRUE(provider_.UserMayLoad(extension.get(), &error16));
79 EXPECT_EQ(string16(), error16); 79 EXPECT_EQ(string16(), error16);
80 EXPECT_TRUE(provider_.UserMayModifySettings(extension.get(), &error16)); 80 EXPECT_TRUE(provider_.UserMayModifySettings(extension.get(), &error16));
81 EXPECT_EQ(string16(), error16); 81 EXPECT_EQ(string16(), error16);
82 EXPECT_FALSE(provider_.MustRemainEnabled(extension.get(), &error16)); 82 EXPECT_FALSE(provider_.MustRemainEnabled(extension.get(), &error16));
83 EXPECT_EQ(string16(), error16); 83 EXPECT_EQ(string16(), error16);
84 } 84 }
85 85
86 } // namespace extensions 86 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/script_bubble_controller_unittest.cc ('k') | chrome/browser/extensions/startup_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698