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

Side by Side Diff: extensions/browser/management_policy_unittest.cc

Issue 685503002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 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 "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "extensions/browser/management_policy.h" 6 #include "extensions/browser/management_policy.h"
7 #include "extensions/browser/test_management_policy.h" 7 #include "extensions/browser/test_management_policy.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 typedef extensions::TestManagementPolicyProvider TestProvider; 10 typedef extensions::TestManagementPolicyProvider TestProvider;
11 using extensions::Extension; 11 using extensions::Extension;
12 12
13 class ManagementPolicyTest : public testing::Test { 13 class ManagementPolicyTest : public testing::Test {
14 public: 14 public:
15 virtual void SetUp() { 15 void SetUp() override {
16 allow_all_.SetProhibitedActions(TestProvider::ALLOW_ALL); 16 allow_all_.SetProhibitedActions(TestProvider::ALLOW_ALL);
17 no_modify_status_.SetProhibitedActions( 17 no_modify_status_.SetProhibitedActions(
18 TestProvider::PROHIBIT_MODIFY_STATUS); 18 TestProvider::PROHIBIT_MODIFY_STATUS);
19 no_load_.SetProhibitedActions(TestProvider::PROHIBIT_LOAD); 19 no_load_.SetProhibitedActions(TestProvider::PROHIBIT_LOAD);
20 must_remain_enabled_.SetProhibitedActions( 20 must_remain_enabled_.SetProhibitedActions(
21 TestProvider::MUST_REMAIN_ENABLED); 21 TestProvider::MUST_REMAIN_ENABLED);
22 must_remain_disabled_.SetProhibitedActions( 22 must_remain_disabled_.SetProhibitedActions(
23 TestProvider::MUST_REMAIN_DISABLED); 23 TestProvider::MUST_REMAIN_DISABLED);
24 must_remain_disabled_.SetDisableReason(Extension::DISABLE_SIDELOAD_WIPEOUT); 24 must_remain_disabled_.SetDisableReason(Extension::DISABLE_SIDELOAD_WIPEOUT);
25 must_remain_installed_.SetProhibitedActions( 25 must_remain_installed_.SetProhibitedActions(
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 error = original_error16; 233 error = original_error16;
234 EXPECT_FALSE(policy_.UserMayLoad(NULL, &error)); 234 EXPECT_FALSE(policy_.UserMayLoad(NULL, &error));
235 EXPECT_EQ(base::UTF8ToUTF16(TestProvider::expected_error()), error); 235 EXPECT_EQ(base::UTF8ToUTF16(TestProvider::expected_error()), error);
236 error = original_error16; 236 error = original_error16;
237 EXPECT_FALSE(policy_.UserMayModifySettings(NULL, &error)); 237 EXPECT_FALSE(policy_.UserMayModifySettings(NULL, &error));
238 EXPECT_EQ(base::UTF8ToUTF16(TestProvider::expected_error()), error); 238 EXPECT_EQ(base::UTF8ToUTF16(TestProvider::expected_error()), error);
239 error = original_error16; 239 error = original_error16;
240 EXPECT_TRUE(policy_.MustRemainEnabled(NULL, &error)); 240 EXPECT_TRUE(policy_.MustRemainEnabled(NULL, &error));
241 EXPECT_EQ(base::UTF8ToUTF16(TestProvider::expected_error()), error); 241 EXPECT_EQ(base::UTF8ToUTF16(TestProvider::expected_error()), error);
242 } 242 }
OLDNEW
« no previous file with comments | « extensions/browser/lazy_background_task_queue_unittest.cc ('k') | extensions/browser/mojo/stash_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698