OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 // Checks that a click on an extension CRX download triggers the extension | 1741 // Checks that a click on an extension CRX download triggers the extension |
1742 // installation prompt without further user interaction when the source is | 1742 // installation prompt without further user interaction when the source is |
1743 // whitelisted by policy. | 1743 // whitelisted by policy. |
1744 // Flaky on windows; http://crbug.com/295729 . | 1744 // Flaky on windows; http://crbug.com/295729 . |
1745 #if defined(OS_WIN) | 1745 #if defined(OS_WIN) |
1746 #define MAYBE_ExtensionInstallSources DISABLED_ExtensionInstallSources | 1746 #define MAYBE_ExtensionInstallSources DISABLED_ExtensionInstallSources |
1747 #else | 1747 #else |
1748 #define MAYBE_ExtensionInstallSources ExtensionInstallSources | 1748 #define MAYBE_ExtensionInstallSources ExtensionInstallSources |
1749 #endif | 1749 #endif |
1750 IN_PROC_BROWSER_TEST_F(PolicyTest, MAYBE_ExtensionInstallSources) { | 1750 IN_PROC_BROWSER_TEST_F(PolicyTest, MAYBE_ExtensionInstallSources) { |
1751 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 1751 ExtensionInstallPrompt::g_auto_confirm_for_tests = |
1752 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); | 1752 ExtensionInstallPrompt::ACCEPT; |
1753 | 1753 |
1754 const GURL install_source_url(URLRequestMockHTTPJob::GetMockUrl( | 1754 const GURL install_source_url(URLRequestMockHTTPJob::GetMockUrl( |
1755 base::FilePath(FILE_PATH_LITERAL("extensions/*")))); | 1755 base::FilePath(FILE_PATH_LITERAL("extensions/*")))); |
1756 const GURL referrer_url(URLRequestMockHTTPJob::GetMockUrl( | 1756 const GURL referrer_url(URLRequestMockHTTPJob::GetMockUrl( |
1757 base::FilePath(FILE_PATH_LITERAL("policy/*")))); | 1757 base::FilePath(FILE_PATH_LITERAL("policy/*")))); |
1758 | 1758 |
1759 base::ScopedTempDir download_directory; | 1759 base::ScopedTempDir download_directory; |
1760 ASSERT_TRUE(download_directory.CreateUniqueTempDir()); | 1760 ASSERT_TRUE(download_directory.CreateUniqueTempDir()); |
1761 DownloadPrefs* download_prefs = | 1761 DownloadPrefs* download_prefs = |
1762 DownloadPrefs::FromBrowserContext(browser()->profile()); | 1762 DownloadPrefs::FromBrowserContext(browser()->profile()); |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3154 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3154 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
3155 browser2->tab_strip_model()->GetActiveWebContents(), | 3155 browser2->tab_strip_model()->GetActiveWebContents(), |
3156 "domAutomationController.send(window.showModalDialog !== undefined);", | 3156 "domAutomationController.send(window.showModalDialog !== undefined);", |
3157 &result)); | 3157 &result)); |
3158 EXPECT_TRUE(result); | 3158 EXPECT_TRUE(result); |
3159 } | 3159 } |
3160 | 3160 |
3161 #endif // !defined(CHROME_OS) | 3161 #endif // !defined(CHROME_OS) |
3162 | 3162 |
3163 } // namespace policy | 3163 } // namespace policy |
OLD | NEW |