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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 const base::FilePath& expected_path, | 941 const base::FilePath& expected_path, |
942 IconLoader::IconSize icon_size, | 942 IconLoader::IconSize icon_size, |
943 const std::string& response) { | 943 const std::string& response) { |
944 scoped_refptr<DownloadsGetFileIconFunction> function( | 944 scoped_refptr<DownloadsGetFileIconFunction> function( |
945 new DownloadsGetFileIconFunction()); | 945 new DownloadsGetFileIconFunction()); |
946 function->SetIconExtractorForTesting(new MockIconExtractorImpl( | 946 function->SetIconExtractorForTesting(new MockIconExtractorImpl( |
947 expected_path, icon_size, response)); | 947 expected_path, icon_size, response)); |
948 return function; | 948 return function; |
949 } | 949 } |
950 | 950 |
| 951 // https://crbug.com/678967 |
| 952 #if defined(OS_WIN) |
| 953 #define MAYBE_DownloadExtensionTest_FileIcon_Active DISABLED_DownloadExtensionTe
st_FileIcon_Active |
| 954 #else |
| 955 #define MAYBE_DownloadExtensionTest_FileIcon_Active DownloadExtensionTest_FileIc
on_Active |
| 956 #endif |
951 // Test downloads.getFileIcon() on in-progress, finished, cancelled and deleted | 957 // Test downloads.getFileIcon() on in-progress, finished, cancelled and deleted |
952 // download items. | 958 // download items. |
953 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, | 959 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, |
954 DownloadExtensionTest_FileIcon_Active) { | 960 MAYBE_DownloadExtensionTest_FileIcon_Active) { |
955 DownloadItem* download_item = CreateSlowTestDownload(); | 961 DownloadItem* download_item = CreateSlowTestDownload(); |
956 ASSERT_TRUE(download_item); | 962 ASSERT_TRUE(download_item); |
957 ASSERT_FALSE(download_item->GetTargetFilePath().empty()); | 963 ASSERT_FALSE(download_item->GetTargetFilePath().empty()); |
958 std::string args32(base::StringPrintf("[%d, {\"size\": 32}]", | 964 std::string args32(base::StringPrintf("[%d, {\"size\": 32}]", |
959 download_item->GetId())); | 965 download_item->GetId())); |
960 std::string result_string; | 966 std::string result_string; |
961 | 967 |
962 // Get the icon for the in-progress download. This call should succeed even | 968 // Get the icon for the in-progress download. This call should succeed even |
963 // if the file type isn't registered. | 969 // if the file type isn't registered. |
964 // Test whether the correct path is being pased into the icon extractor. | 970 // Test whether the correct path is being pased into the icon extractor. |
(...skipping 3336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4301 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 4307 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
4302 EXPECT_FALSE(warnings.empty()); | 4308 EXPECT_FALSE(warnings.empty()); |
4303 EXPECT_EQ(Warning::kDownloadFilenameConflict, | 4309 EXPECT_EQ(Warning::kDownloadFilenameConflict, |
4304 warnings.begin()->warning_type()); | 4310 warnings.begin()->warning_type()); |
4305 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 4311 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
4306 } | 4312 } |
4307 | 4313 |
4308 } // namespace extensions | 4314 } // namespace extensions |
4309 | 4315 |
4310 #endif // http://crbug.com/306144 | 4316 #endif // http://crbug.com/306144 |
OLD | NEW |