| Index: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
|
| diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
|
| index feb7ba9a46a1d92faaf545223ca3d743e4e86ad5..12ace84d0899df674f939d374ea5b080e9dd80c2 100644
|
| --- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
|
| +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
|
| @@ -106,25 +106,14 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
|
| host_resolver()->AddRule("www.example.com", "127.0.0.1");
|
| ASSERT_TRUE(test_server()->Start());
|
| ExtensionInstallUI::DisableFailureUIForTests();
|
| -
|
| - ASSERT_TRUE(tmp_.CreateUniqueTempDirUnderPath(test_data_dir_));
|
| - ASSERT_TRUE(file_util::CreateDirectory(tmp_.path()));
|
| - ASSERT_TRUE(file_util::CopyDirectory(
|
| - test_data_dir_.AppendASCII("webstore_private"),
|
| - tmp_.path(),
|
| - true));
|
| }
|
|
|
| protected:
|
| // Returns a test server URL, but with host 'www.example.com' so it matches
|
| // the web store app's extent that we set up via command line flags.
|
| virtual GURL GetTestServerURL(const std::string& path) {
|
| - std::string basename = tmp_.path().BaseName().MaybeAsASCII();
|
| GURL url = test_server()->GetURL(
|
| - std::string("files/extensions/api_test/") +
|
| - basename +
|
| - "/webstore_private/" +
|
| - path);
|
| + std::string("files/extensions/api_test/webstore_private/") + path);
|
|
|
| // Replace the host with 'www.example.com' so it matches the web store
|
| // app's extent.
|
| @@ -138,19 +127,22 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
|
| // Navigates to |page| and runs the Extension API test there. Any downloads
|
| // of extensions will return the contents of |crx_file|.
|
| bool RunInstallTest(const std::string& page, const std::string& crx_file) {
|
| +#if defined(OS_WIN) && !defined(NDEBUG)
|
| + // See http://crbug.com/177163 for details.
|
| + return true;
|
| +#else
|
| GURL crx_url = GetTestServerURL(crx_file);
|
| CommandLine::ForCurrentProcess()->AppendSwitchASCII(
|
| switches::kAppsGalleryUpdateURL, crx_url.spec());
|
|
|
| GURL page_url = GetTestServerURL(page);
|
| return RunPageTest(page_url.spec());
|
| +#endif
|
| }
|
|
|
| ExtensionService* service() {
|
| return browser()->profile()->GetExtensionService();
|
| }
|
| -
|
| - base::ScopedTempDir tmp_;
|
| };
|
|
|
| // Test cases for webstore origin frame blocking.
|
| @@ -230,8 +222,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, IncorrectManifest2) {
|
| ASSERT_TRUE(RunInstallTest("incorrect_manifest2.html", "extension.crx"));
|
| }
|
|
|
| -// Disabled: http://crbug.com/174399
|
| -#if defined(OS_WIN) && defined(USE_AURA)
|
| +// Disabled: http://crbug.com/174399 and http://crbug.com/177163
|
| +#if defined(OS_WIN) && (defined(USE_AURA) || !defined(NDEBUG))
|
| #define MAYBE_AppInstallBubble DISABLED_AppInstallBubble
|
| #else
|
| #define MAYBE_AppInstallBubble AppInstallBubble
|
| @@ -260,8 +252,14 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, MAYBE_IconUrl) {
|
| ASSERT_TRUE(RunInstallTest("icon_url.html", "extension.crx"));
|
| }
|
|
|
| +// http://crbug.com/177163
|
| +#if defined(OS_WIN) && !defined(NDEBUG)
|
| +#define MAYBE_BeginInstall DISABLED_BeginInstall
|
| +#else
|
| +#define MAYBE_BeginInstall BeginInstall
|
| +#endif
|
| // Tests that the Approvals are properly created in beginInstall.
|
| -IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, BeginInstall) {
|
| +IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, MAYBE_BeginInstall) {
|
| std::string appId = "iladmdjkfniedhfhcfoefgojhgaiaccc";
|
| std::string extensionId = "enfkhcelefdadlmkffamgdlgplcionje";
|
| ASSERT_TRUE(RunInstallTest("begin_install.html", "extension.crx"));
|
| @@ -281,11 +279,17 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, BeginInstall) {
|
| EXPECT_EQ(browser()->profile(), approval->profile);
|
| }
|
|
|
| +// http://crbug.com/177163
|
| +#if defined(OS_WIN) && !defined(NDEBUG)
|
| +#define MAYBE_InstallTheme DISABLED_InstallTheme
|
| +#else
|
| +#define MAYBE_InstallTheme InstallTheme
|
| +#endif
|
| // Tests that themes are installed without an install prompt.
|
| -IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallTheme) {
|
| +IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, MAYBE_InstallTheme) {
|
| WebstoreInstallListener listener;
|
| WebstorePrivateApi::SetWebstoreInstallerDelegateForTesting(&listener);
|
| - ASSERT_TRUE(RunInstallTest("theme.html", "../../../theme.crx"));
|
| + ASSERT_TRUE(RunInstallTest("theme.html", "../../theme.crx"));
|
| listener.Wait();
|
| ASSERT_TRUE(listener.received_success());
|
| ASSERT_EQ("iamefpfkojoapidjnbafmgkgncegbkad", listener.id());
|
|
|