Re-enabled a couple of ExtensionCrxInstallerTests:

- Whitelisting is disabled on ChromeOS by design;
- PackAndInstallExtension passes on a local ChromeOS build;
- AllowOffStore needed a fix in its waiting logic and now passes too.

BUG=404789,136397,140893

Review URL: https://codereview.chromium.org/486233002

Cr-Commit-Position: refs/heads/master@{#290805}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290805 0039d316-1c4b-4281-b951-d872f2087c98
parent b18c6920
...@@ -231,12 +231,10 @@ class ExtensionCrxInstallerTest : public ExtensionBrowserTest { ...@@ -231,12 +231,10 @@ class ExtensionCrxInstallerTest : public ExtensionBrowserTest {
} }
}; };
#if defined(OS_CHROMEOS) // This test is skipped on ChromeOS because it requires the NPAPI,
#define MAYBE_Whitelisting DISABLED_Whitelisting // which is not available on that platform.
#else #if !defined(OS_CHROMEOS)
#define MAYBE_Whitelisting Whitelisting IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, Whitelisting) {
#endif
IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, MAYBE_Whitelisting) {
std::string id = "hdgllgikmikobbofgnabhfimcfoopgnd"; std::string id = "hdgllgikmikobbofgnabhfimcfoopgnd";
ExtensionService* service = extensions::ExtensionSystem::Get( ExtensionService* service = extensions::ExtensionSystem::Get(
browser()->profile())->extension_service(); browser()->profile())->extension_service();
...@@ -248,6 +246,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, MAYBE_Whitelisting) { ...@@ -248,6 +246,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, MAYBE_Whitelisting) {
EXPECT_FALSE(mock_prompt->confirmation_requested()); EXPECT_FALSE(mock_prompt->confirmation_requested());
EXPECT_TRUE(service->GetExtensionById(id, false)); EXPECT_TRUE(service->GetExtensionById(id, false));
} }
#endif
IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest,
GalleryInstallGetsExperimental) { GalleryInstallGetsExperimental) {
...@@ -275,14 +274,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PlatformAppCrx) { ...@@ -275,14 +274,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PlatformAppCrx) {
test_data_dir_.AppendASCII("minimal_platform_app.crx"), 1)); test_data_dir_.AppendASCII("minimal_platform_app.crx"), 1));
} }
// http://crbug.com/136397 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PackAndInstallExtension) {
#if defined(OS_CHROMEOS)
#define MAYBE_PackAndInstallExtension DISABLED_PackAndInstallExtension
#else
#define MAYBE_PackAndInstallExtension PackAndInstallExtension
#endif
IN_PROC_BROWSER_TEST_F(
ExtensionCrxInstallerTest, MAYBE_PackAndInstallExtension) {
if (!FeatureSwitch::easy_off_store_install()->IsEnabled()) if (!FeatureSwitch::easy_off_store_install()->IsEnabled())
return; return;
...@@ -336,14 +328,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DoNotGrantScopes) { ...@@ -336,14 +328,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DoNotGrantScopes) {
false)); false));
} }
// Off-store install cannot yet be disabled on Aura. IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, AllowOffStore) {
#if defined(USE_AURA)
#define MAYBE_AllowOffStore DISABLED_AllowOffStore
#else
#define MAYBE_AllowOffStore AllowOffStore
#endif
// Crashy: http://crbug.com/140893
IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DISABLED_AllowOffStore) {
ExtensionService* service = extensions::ExtensionSystem::Get( ExtensionService* service = extensions::ExtensionSystem::Get(
browser()->profile())->extension_service(); browser()->profile())->extension_service();
const bool kTestData[] = {false, true}; const bool kTestData[] = {false, true};
...@@ -363,8 +348,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DISABLED_AllowOffStore) { ...@@ -363,8 +348,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DISABLED_AllowOffStore) {
} }
crx_installer->InstallCrx(test_data_dir_.AppendASCII("good.crx")); crx_installer->InstallCrx(test_data_dir_.AppendASCII("good.crx"));
EXPECT_EQ(kTestData[i], // The |mock_prompt| will quit running the loop once the |crx_installer|
WaitForExtensionInstall()) << kTestData[i]; // is done.
content::RunMessageLoop();
EXPECT_EQ(kTestData[i], mock_prompt->did_succeed()); EXPECT_EQ(kTestData[i], mock_prompt->did_succeed());
EXPECT_EQ(kTestData[i], mock_prompt->confirmation_requested()) << EXPECT_EQ(kTestData[i], mock_prompt->confirmation_requested()) <<
kTestData[i]; kTestData[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment