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

Side by Side Diff: chrome/browser/chromeos/extensions/device_local_account_management_policy_provider_unittest.cc

Issue 2858643002: PS - Filtering activeTab URL (Closed)
Patch Set: ExtensionBuilder in test Created 3 years, 7 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 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/chromeos/extensions/device_local_account_management_pol icy_provider.h" 5 #include "chrome/browser/chromeos/extensions/device_local_account_management_pol icy_provider.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 // session. 607 // session.
608 extension = CreateRegularExtension(kWhitelistedId); 608 extension = CreateRegularExtension(kWhitelistedId);
609 ASSERT_TRUE(extension.get()); 609 ASSERT_TRUE(extension.get());
610 EXPECT_TRUE(provider.UserMayLoad(extension.get(), &error)); 610 EXPECT_TRUE(provider.UserMayLoad(extension.get(), &error));
611 EXPECT_EQ(base::string16(), error); 611 EXPECT_EQ(base::string16(), error);
612 error.clear(); 612 error.clear();
613 } 613 }
614 614
615 TEST(DeviceLocalAccountManagementPolicyProviderTest, IsWhitelisted) { 615 TEST(DeviceLocalAccountManagementPolicyProviderTest, IsWhitelisted) {
616 // Whitelisted extension, Chrome Remote Desktop. 616 // Whitelisted extension, Chrome Remote Desktop.
617 auto extension = CreateRegularExtension(kWhitelistedId);
618 EXPECT_TRUE(DeviceLocalAccountManagementPolicyProvider::IsWhitelisted( 617 EXPECT_TRUE(DeviceLocalAccountManagementPolicyProvider::IsWhitelisted(
619 extension.get())); 618 kWhitelistedId));
620 619
621 // Bogus extension ID (never true). 620 // Bogus extension ID (never true).
622 extension = CreateRegularExtension(kBogusId);
623 EXPECT_FALSE(DeviceLocalAccountManagementPolicyProvider::IsWhitelisted( 621 EXPECT_FALSE(DeviceLocalAccountManagementPolicyProvider::IsWhitelisted(
624 extension.get())); 622 kBogusId));
625 } 623 }
626 624
627 } // namespace chromeos 625 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698