| 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 <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 result_id, | 1521 result_id, |
| 1522 GetFilename("slow.txt").c_str()))); | 1522 GetFilename("slow.txt").c_str()))); |
| 1523 ASSERT_TRUE(WaitFor(api::OnChanged::kEventName, | 1523 ASSERT_TRUE(WaitFor(api::OnChanged::kEventName, |
| 1524 base::StringPrintf("[{\"id\":%d," | 1524 base::StringPrintf("[{\"id\":%d," |
| 1525 " \"state\": {" | 1525 " \"state\": {" |
| 1526 " \"current\": \"complete\"," | 1526 " \"current\": \"complete\"," |
| 1527 " \"previous\": \"in_progress\"}}]", | 1527 " \"previous\": \"in_progress\"}}]", |
| 1528 result_id))); | 1528 result_id))); |
| 1529 } | 1529 } |
| 1530 | 1530 |
| 1531 #if defined(OS_WIN) && defined(USE_AURA) | 1531 #if defined(OS_WIN) |
| 1532 // This test is very flaky on Win Aura. http://crbug.com/248438 | 1532 // This test is very flaky on Win. http://crbug.com/248438 |
| 1533 #define MAYBE_DownloadExtensionTest_Download_UnsafeHeaders \ | 1533 #define MAYBE_DownloadExtensionTest_Download_UnsafeHeaders \ |
| 1534 DISABLED_DownloadExtensionTest_Download_UnsafeHeaders | 1534 DISABLED_DownloadExtensionTest_Download_UnsafeHeaders |
| 1535 #else | 1535 #else |
| 1536 #define MAYBE_DownloadExtensionTest_Download_UnsafeHeaders \ | 1536 #define MAYBE_DownloadExtensionTest_Download_UnsafeHeaders \ |
| 1537 DownloadExtensionTest_Download_UnsafeHeaders | 1537 DownloadExtensionTest_Download_UnsafeHeaders |
| 1538 #endif | 1538 #endif |
| 1539 | 1539 |
| 1540 // Test that we disallow certain headers case-insensitively. | 1540 // Test that we disallow certain headers case-insensitively. |
| 1541 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, | 1541 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, |
| 1542 MAYBE_DownloadExtensionTest_Download_UnsafeHeaders) { | 1542 MAYBE_DownloadExtensionTest_Download_UnsafeHeaders) { |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 GetFilename("data.txt").c_str()))); | 1771 GetFilename("data.txt").c_str()))); |
| 1772 ASSERT_TRUE(WaitFor(api::OnChanged::kEventName, | 1772 ASSERT_TRUE(WaitFor(api::OnChanged::kEventName, |
| 1773 base::StringPrintf("[{\"id\": %d," | 1773 base::StringPrintf("[{\"id\": %d," |
| 1774 " \"state\": {" | 1774 " \"state\": {" |
| 1775 " \"previous\": \"in_progress\"," | 1775 " \"previous\": \"in_progress\"," |
| 1776 " \"current\": \"complete\"}}]", | 1776 " \"current\": \"complete\"}}]", |
| 1777 result_id))); | 1777 result_id))); |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 // Valid file URLs are valid URLs. | 1780 // Valid file URLs are valid URLs. |
| 1781 #if defined(OS_WIN) && defined(USE_AURA) | 1781 #if defined(OS_WIN) |
| 1782 // Disabled due to crbug.com/175711 | 1782 // Disabled due to crbug.com/175711 |
| 1783 #define MAYBE_DownloadExtensionTest_Download_File \ | 1783 #define MAYBE_DownloadExtensionTest_Download_File \ |
| 1784 DISABLED_DownloadExtensionTest_Download_File | 1784 DISABLED_DownloadExtensionTest_Download_File |
| 1785 #else | 1785 #else |
| 1786 #define MAYBE_DownloadExtensionTest_Download_File \ | 1786 #define MAYBE_DownloadExtensionTest_Download_File \ |
| 1787 DownloadExtensionTest_Download_File | 1787 DownloadExtensionTest_Download_File |
| 1788 #endif | 1788 #endif |
| 1789 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, | 1789 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, |
| 1790 MAYBE_DownloadExtensionTest_Download_File) { | 1790 MAYBE_DownloadExtensionTest_Download_File) { |
| 1791 GoOnTheRecord(); | 1791 GoOnTheRecord(); |
| (...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3635 EXPECT_EQ("suggester", winner_id); | 3635 EXPECT_EQ("suggester", winner_id); |
| 3636 EXPECT_EQ(FILE_PATH_LITERAL("b"), filename.value()); | 3636 EXPECT_EQ(FILE_PATH_LITERAL("b"), filename.value()); |
| 3637 EXPECT_EQ(api::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 3637 EXPECT_EQ(api::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
| 3638 EXPECT_FALSE(warnings.empty()); | 3638 EXPECT_FALSE(warnings.empty()); |
| 3639 EXPECT_EQ(extensions::ExtensionWarning::kDownloadFilenameConflict, | 3639 EXPECT_EQ(extensions::ExtensionWarning::kDownloadFilenameConflict, |
| 3640 warnings.begin()->warning_type()); | 3640 warnings.begin()->warning_type()); |
| 3641 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 3641 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
| 3642 } | 3642 } |
| 3643 | 3643 |
| 3644 #endif // http://crbug.com/3061144 | 3644 #endif // http://crbug.com/3061144 |
| OLD | NEW |