OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/safe_browsing/download_feedback.h" | 5 #include "chrome/browser/safe_browsing/download_feedback.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "chrome/browser/safe_browsing/two_phase_uploader.h" | 13 #include "chrome/browser/safe_browsing/two_phase_uploader.h" |
14 #include "components/safe_browsing/csd.pb.h" | 14 #include "chrome/common/safe_browsing/csd.pb.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
17 #include "net/url_request/url_request_test_util.h" | 17 #include "net/url_request/url_request_test_util.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 namespace safe_browsing { | 20 namespace safe_browsing { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 class FakeUploader : public TwoPhaseUploader { | 24 class FakeUploader : public TwoPhaseUploader { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 EXPECT_TRUE(base::PathExists(upload_file_path_)); | 214 EXPECT_TRUE(base::PathExists(upload_file_path_)); |
215 | 215 |
216 feedback.reset(); | 216 feedback.reset(); |
217 EXPECT_FALSE(feedback_finish_called_); | 217 EXPECT_FALSE(feedback_finish_called_); |
218 | 218 |
219 base::RunLoop().RunUntilIdle(); | 219 base::RunLoop().RunUntilIdle(); |
220 EXPECT_FALSE(base::PathExists(upload_file_path_)); | 220 EXPECT_FALSE(base::PathExists(upload_file_path_)); |
221 } | 221 } |
222 | 222 |
223 } // namespace safe_browsing | 223 } // namespace safe_browsing |
OLD | NEW |