Skip to content

Commit

Permalink
[Extensions] Whitelist Imprivata extensions for stable (1/2)
Browse files Browse the repository at this point in the history
This CL upgrades the 'signin_screen' behaviors whitelisted for the
Imprivata extensions from dev to stable.

Bug: 956540, 945345, 986266
Change-Id: Ib2cd9a28990deb84f83be76358b4d97f5626a542
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1783139
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693647}
  • Loading branch information
alex292 authored and Commit Bot committed Sep 5, 2019
1 parent dc19b6f commit 23fd9f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,44 +209,25 @@ IN_PROC_BROWSER_TEST_P(SigninProfileExtensionsPolicyPerChannelTest,
}
}

// Tests that a whitelisted extension (as opposed to an app) gets installed when
// on Dev, Canary or "unknown" (trunk) channels, but not on Beta or Stable
// channels. Force-installed extensions on the sign-in screen should also
// automatically have the |login_screen_extension| type.
// Tests that a whitelisted extension is installed on any browser channel.
// Force-installed extensions on the sign-in screen should also automatically
// have the |login_screen_extension| type.
IN_PROC_BROWSER_TEST_P(SigninProfileExtensionsPolicyPerChannelTest,
WhitelistedExtensionInstallation) {
Profile* profile = GetInitialProfile();

extensions::TestExtensionRegistryObserver registry_observer(
extensions::ExtensionRegistry::Get(profile), kWhitelistedExtensionId);
ExtensionInstallErrorObserver install_error_observer(profile,
kWhitelistedExtensionId);

AddExtensionForForceInstallation(kWhitelistedExtensionId,
kWhitelistedExtensionUpdateManifestPath);

switch (channel_) {
case version_info::Channel::UNKNOWN:
case version_info::Channel::CANARY:
case version_info::Channel::DEV: {
registry_observer.WaitForExtensionLoaded();
const extensions::Extension* extension =
extensions::ExtensionRegistry::Get(profile)
->enabled_extensions()
.GetByID(kWhitelistedExtensionId);
ASSERT_TRUE(extension);
EXPECT_TRUE(extension->is_login_screen_extension());
break;
}
case version_info::Channel::BETA:
case version_info::Channel::STABLE: {
install_error_observer.Wait();
EXPECT_FALSE(
extensions::ExtensionRegistry::Get(profile)->GetInstalledExtension(
kWhitelistedExtensionId));
break;
}
}
registry_observer.WaitForExtensionLoaded();
const extensions::Extension* extension =
extensions::ExtensionRegistry::Get(profile)->enabled_extensions().GetByID(
kWhitelistedExtensionId);
ASSERT_TRUE(extension);
EXPECT_TRUE(extension->is_login_screen_extension());
}

// Tests that a non-whitelisted extension (as opposed to an app) is forbidden
Expand Down
2 changes: 1 addition & 1 deletion extensions/common/api/_behavior_features.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
// will receive type "login_screen_extension" and have limited API
// capabilities. Nonetheless, we only allow specifically whitelisted
// extensions here.
"channel": "dev",
"channel": "stable",
"component_extensions_auto_granted": false,
"extension_types": ["login_screen_extension"],
"location": "policy",
Expand Down

0 comments on commit 23fd9f5

Please sign in to comment.