| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/prefs/pref_service.h" | |
| 14 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 15 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 16 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
| 17 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 16 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 18 #include "chrome/browser/download/download_item_model.h" | 17 #include "chrome/browser/download/download_item_model.h" |
| 19 #include "chrome/browser/download/download_prefs.h" | 18 #include "chrome/browser/download/download_prefs.h" |
| 20 #include "chrome/browser/download/download_target_info.h" | 19 #include "chrome/browser/download/download_target_info.h" |
| 21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 22 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 21 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 23 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
| 23 #include "components/prefs/pref_service.h" |
| 24 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 24 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
| 25 #include "content/public/browser/download_interrupt_reasons.h" | 25 #include "content/public/browser/download_interrupt_reasons.h" |
| 26 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
| 27 #include "content/public/browser/web_contents_delegate.h" | 27 #include "content/public/browser/web_contents_delegate.h" |
| 28 #include "content/public/test/mock_download_item.h" | 28 #include "content/public/test/mock_download_item.h" |
| 29 #include "content/public/test/mock_download_manager.h" | 29 #include "content/public/test/mock_download_manager.h" |
| 30 #include "content/public/test/test_renderer_host.h" | 30 #include "content/public/test/test_renderer_host.h" |
| 31 #include "content/public/test/web_contents_tester.h" | 31 #include "content/public/test/web_contents_tester.h" |
| 32 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 EXPECT_CALL(*download_item, OnContentCheckCompleted(_)).Times(0); | 658 EXPECT_CALL(*download_item, OnContentCheckCompleted(_)).Times(0); |
| 659 } | 659 } |
| 660 | 660 |
| 661 base::RunLoop run_loop; | 661 base::RunLoop run_loop; |
| 662 ASSERT_FALSE(delegate()->ShouldCompleteDownload(download_item.get(), | 662 ASSERT_FALSE(delegate()->ShouldCompleteDownload(download_item.get(), |
| 663 run_loop.QuitClosure())); | 663 run_loop.QuitClosure())); |
| 664 run_loop.Run(); | 664 run_loop.Run(); |
| 665 } | 665 } |
| 666 | 666 |
| 667 #endif // FULL_SAFE_BROWSING | 667 #endif // FULL_SAFE_BROWSING |
| OLD | NEW |