| 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 // Disable everything on windows only. http://crbug.com/306144 | 5 // Disable everything on windows only. http://crbug.com/306144 |
| 6 #ifndef OS_WIN | 6 #ifndef OS_WIN |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 3981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3992 GetFilename("42 (1).txt").c_str()))); | 3992 GetFilename("42 (1).txt").c_str()))); |
| 3993 ASSERT_TRUE(WaitFor(downloads::OnChanged::kEventName, | 3993 ASSERT_TRUE(WaitFor(downloads::OnChanged::kEventName, |
| 3994 base::StringPrintf( | 3994 base::StringPrintf( |
| 3995 "[{\"id\": %d," | 3995 "[{\"id\": %d," |
| 3996 " \"state\": {" | 3996 " \"state\": {" |
| 3997 " \"previous\": \"in_progress\"," | 3997 " \"previous\": \"in_progress\"," |
| 3998 " \"current\": \"complete\"}}]", | 3998 " \"current\": \"complete\"}}]", |
| 3999 result_id))); | 3999 result_id))); |
| 4000 } | 4000 } |
| 4001 | 4001 |
| 4002 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_LINUX) | |
| 4003 // This test is very flaky on Win XP and Aura. http://crbug.com/248438 | 4002 // This test is very flaky on Win XP and Aura. http://crbug.com/248438 |
| 4004 // Also flaky on Linux. http://crbug.com/700382 | 4003 // Also flaky on Linux. http://crbug.com/700382 |
| 4005 #define MAYBE_DownloadExtensionTest_OnDeterminingFilename_InterruptedResume \ | 4004 // Also flaky on Mac ASAN with PlzNavigate. |
| 4006 DISABLED_DownloadExtensionTest_OnDeterminingFilename_InterruptedResume | |
| 4007 #else | |
| 4008 #define MAYBE_DownloadExtensionTest_OnDeterminingFilename_InterruptedResume \ | |
| 4009 DownloadExtensionTest_OnDeterminingFilename_InterruptedResume | |
| 4010 #endif | |
| 4011 | |
| 4012 // Test download interruption while extensions determining filename. Should not | 4005 // Test download interruption while extensions determining filename. Should not |
| 4013 // re-dispatch onDeterminingFilename. | 4006 // re-dispatch onDeterminingFilename. |
| 4014 IN_PROC_BROWSER_TEST_F( | 4007 IN_PROC_BROWSER_TEST_F( |
| 4015 DownloadExtensionTest, | 4008 DownloadExtensionTest, |
| 4016 MAYBE_DownloadExtensionTest_OnDeterminingFilename_InterruptedResume) { | 4009 DISABLED_DownloadExtensionTest_OnDeterminingFilename_InterruptedResume) { |
| 4017 LoadExtension("downloads_split"); | 4010 LoadExtension("downloads_split"); |
| 4018 ASSERT_TRUE(StartEmbeddedTestServer()); | 4011 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 4019 GoOnTheRecord(); | 4012 GoOnTheRecord(); |
| 4020 content::RenderProcessHost* host = AddFilenameDeterminer(); | 4013 content::RenderProcessHost* host = AddFilenameDeterminer(); |
| 4021 | 4014 |
| 4022 // Start a download. | 4015 // Start a download. |
| 4023 DownloadItem* item = NULL; | 4016 DownloadItem* item = NULL; |
| 4024 { | 4017 { |
| 4025 DownloadManager* manager = GetCurrentManager(); | 4018 DownloadManager* manager = GetCurrentManager(); |
| 4026 std::unique_ptr<content::DownloadTestObserver> observer( | 4019 std::unique_ptr<content::DownloadTestObserver> observer( |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4304 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 4297 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
| 4305 EXPECT_FALSE(warnings.empty()); | 4298 EXPECT_FALSE(warnings.empty()); |
| 4306 EXPECT_EQ(Warning::kDownloadFilenameConflict, | 4299 EXPECT_EQ(Warning::kDownloadFilenameConflict, |
| 4307 warnings.begin()->warning_type()); | 4300 warnings.begin()->warning_type()); |
| 4308 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 4301 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
| 4309 } | 4302 } |
| 4310 | 4303 |
| 4311 } // namespace extensions | 4304 } // namespace extensions |
| 4312 | 4305 |
| 4313 #endif // http://crbug.com/306144 | 4306 #endif // http://crbug.com/306144 |
| OLD | NEW |