| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" | 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" |
| 10 #include "chrome/browser/extensions/browser_action_test_util.h" | 10 #include "chrome/browser/extensions/browser_action_test_util.h" |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 // | 985 // |
| 986 // Note - there is no "...ViaGet" flavour of this test, because we don't care | 986 // Note - there is no "...ViaGet" flavour of this test, because we don't care |
| 987 // (yet) if GET succeeds with the download or not (it probably should succeed | 987 // (yet) if GET succeeds with the download or not (it probably should succeed |
| 988 // for consistency with POST, but it always failed in M54 and before). After | 988 // for consistency with POST, but it always failed in M54 and before). After |
| 989 // abandoing ShouldFork/OpenURL for all methods (not just for POST) [see comment | 989 // abandoing ShouldFork/OpenURL for all methods (not just for POST) [see comment |
| 990 // about https://crbug.com/646261 in ChromeContentRendererClient::ShouldFork] | 990 // about https://crbug.com/646261 in ChromeContentRendererClient::ShouldFork] |
| 991 // GET should automagically start working for downloads. | 991 // GET should automagically start working for downloads. |
| 992 // TODO(lukasza): https://crbug.com/650694: Add a "Get" flavour of the test once | 992 // TODO(lukasza): https://crbug.com/650694: Add a "Get" flavour of the test once |
| 993 // the download works both for GET and POST requests. | 993 // the download works both for GET and POST requests. |
| 994 | 994 |
| 995 // Disabled on Windows. See http://crbug.com/653856. | 995 // Disabled on Windows and Mac. See http://crbug.com/653856. |
| 996 #if defined(OS_WIN) | 996 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 997 #define MAYBE_DownloadViaPost DISABLED_DownloadViaPost | 997 #define MAYBE_DownloadViaPost DISABLED_DownloadViaPost |
| 998 #else | 998 #else |
| 999 #define MAYBE_DownloadViaPost DownloadViaPost | 999 #define MAYBE_DownloadViaPost DownloadViaPost |
| 1000 #endif | 1000 #endif |
| 1001 | 1001 |
| 1002 IN_PROC_BROWSER_TEST_F(NavigatingExtensionPopupBrowserTest, | 1002 IN_PROC_BROWSER_TEST_F(NavigatingExtensionPopupBrowserTest, |
| 1003 MAYBE_DownloadViaPost) { | 1003 MAYBE_DownloadViaPost) { |
| 1004 content::DownloadTestObserverTerminal downloads_observer( | 1004 content::DownloadTestObserverTerminal downloads_observer( |
| 1005 content::BrowserContext::GetDownloadManager(browser()->profile()), | 1005 content::BrowserContext::GetDownloadManager(browser()->profile()), |
| 1006 1, // == wait_count (only waiting for "download-test3.gif"). | 1006 1, // == wait_count (only waiting for "download-test3.gif"). |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1022 // The test verification below is applicable only to scenarios where the | 1022 // The test verification below is applicable only to scenarios where the |
| 1023 // download shelf is supported - on ChromeOS, instead of the download shelf, | 1023 // download shelf is supported - on ChromeOS, instead of the download shelf, |
| 1024 // there is a download notification in the right-bottom corner of the screen. | 1024 // there is a download notification in the right-bottom corner of the screen. |
| 1025 #if !defined(OS_CHROMEOS) | 1025 #if !defined(OS_CHROMEOS) |
| 1026 EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible()); | 1026 EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible()); |
| 1027 #endif | 1027 #endif |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 } // namespace | 1030 } // namespace |
| 1031 } // namespace extensions | 1031 } // namespace extensions |
| OLD | NEW |