Chromium Code Reviews| 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 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1252 base::DictionaryValue* item1_value = NULL; | 1252 base::DictionaryValue* item1_value = NULL; |
| 1253 ASSERT_TRUE(result_list->GetDictionary(0, &item0_value)); | 1253 ASSERT_TRUE(result_list->GetDictionary(0, &item0_value)); |
| 1254 ASSERT_TRUE(result_list->GetDictionary(1, &item1_value)); | 1254 ASSERT_TRUE(result_list->GetDictionary(1, &item1_value)); |
| 1255 std::string item0_name, item1_name; | 1255 std::string item0_name, item1_name; |
| 1256 ASSERT_TRUE(item0_value->GetString("filename", &item0_name)); | 1256 ASSERT_TRUE(item0_value->GetString("filename", &item0_name)); |
| 1257 ASSERT_TRUE(item1_value->GetString("filename", &item1_name)); | 1257 ASSERT_TRUE(item1_value->GetString("filename", &item1_name)); |
| 1258 ASSERT_GT(items[0]->GetTargetFilePath().value(), | 1258 ASSERT_GT(items[0]->GetTargetFilePath().value(), |
| 1259 items[1]->GetTargetFilePath().value()); | 1259 items[1]->GetTargetFilePath().value()); |
| 1260 // The order of results when orderBy is empty is unspecified. When there are | 1260 // The order of results when orderBy is empty is unspecified. When there are |
| 1261 // no sorters, DownloadQuery does not call sort(), so the order of the results | 1261 // no sorters, DownloadQuery does not call sort(), so the order of the results |
| 1262 // depends on the order of the items in base::hash_map<uint32_t,...> | 1262 // depends on the order of the items in DownloadManagerImpl::downloads_, |
| 1263 // DownloadManagerImpl::downloads_, which is unspecified and differs between | 1263 // which is unspecified and differs between libc++ and libstdc++. |
| 1264 // libc++ and libstdc++. http://crbug.com/365334 | 1264 // http://crbug.com/365334 |
|
chrisha
2017/05/23 20:07:59
Fix leading spaces in this line and the one above.
brettw
2017/06/28 23:58:39
Done.
| |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 // Test the |danger| option for search(). | 1267 // Test the |danger| option for search(). |
| 1268 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, | 1268 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, |
| 1269 DownloadExtensionTest_SearchDanger) { | 1269 DownloadExtensionTest_SearchDanger) { |
| 1270 const HistoryDownloadInfo kHistoryInfo[] = { | 1270 const HistoryDownloadInfo kHistoryInfo[] = { |
| 1271 { FILE_PATH_LITERAL("zzz"), | 1271 { FILE_PATH_LITERAL("zzz"), |
| 1272 DownloadItem::COMPLETE, | 1272 DownloadItem::COMPLETE, |
| 1273 content::DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT }, | 1273 content::DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT }, |
| 1274 { FILE_PATH_LITERAL("baz"), | 1274 { FILE_PATH_LITERAL("baz"), |
| (...skipping 3030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4305 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 4305 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
| 4306 EXPECT_FALSE(warnings.empty()); | 4306 EXPECT_FALSE(warnings.empty()); |
| 4307 EXPECT_EQ(Warning::kDownloadFilenameConflict, | 4307 EXPECT_EQ(Warning::kDownloadFilenameConflict, |
| 4308 warnings.begin()->warning_type()); | 4308 warnings.begin()->warning_type()); |
| 4309 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 4309 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
| 4310 } | 4310 } |
| 4311 | 4311 |
| 4312 } // namespace extensions | 4312 } // namespace extensions |
| 4313 | 4313 |
| 4314 #endif // http://crbug.com/306144 | 4314 #endif // http://crbug.com/306144 |
| OLD | NEW |