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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/stl_util.h" | 6 #include "base/stl_util.h" |
7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
8 #include "content/browser/download/download_create_info.h" | 8 #include "content/browser/download/download_create_info.h" |
9 #include "content/browser/download/download_file_manager.h" | 9 #include "content/browser/download/download_file_manager.h" |
10 #include "content/browser/download/download_item_impl.h" | 10 #include "content/browser/download/download_item_impl.h" |
11 #include "content/browser/download/download_request_handle.h" | 11 #include "content/browser/download/download_request_handle.h" |
12 #include "content/public/browser/download_id.h" | 12 #include "content/public/browser/download_id.h" |
13 #include "content/public/browser/download_interrupt_reasons.h" | 13 #include "content/public/browser/download_interrupt_reasons.h" |
14 #include "content/public/test/mock_download_item.h" | 14 #include "content/public/test/mock_download_item.h" |
15 #include "content/test/test_browser_thread.h" | 15 #include "content/public/test/test_browser_thread.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 using content::BrowserThread; | 19 using content::BrowserThread; |
20 using content::DownloadId; | 20 using content::DownloadId; |
21 using content::DownloadItem; | 21 using content::DownloadItem; |
22 using content::DownloadManager; | 22 using content::DownloadManager; |
23 using content::MockDownloadItem; | 23 using content::MockDownloadItem; |
24 using content::WebContents; | 24 using content::WebContents; |
25 using ::testing::_; | 25 using ::testing::_; |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 final_path)))); | 529 final_path)))); |
530 item->OnDownloadCompleting(file_manager.get()); | 530 item->OnDownloadCompleting(file_manager.get()); |
531 RunAllPendingInMessageLoops(); | 531 RunAllPendingInMessageLoops(); |
532 ::testing::Mock::VerifyAndClearExpectations(file_manager.get()); | 532 ::testing::Mock::VerifyAndClearExpectations(file_manager.get()); |
533 ::testing::Mock::VerifyAndClearExpectations(mock_delegate()); | 533 ::testing::Mock::VerifyAndClearExpectations(mock_delegate()); |
534 } | 534 } |
535 | 535 |
536 TEST(MockDownloadItem, Compiles) { | 536 TEST(MockDownloadItem, Compiles) { |
537 MockDownloadItem mock_item; | 537 MockDownloadItem mock_item; |
538 } | 538 } |
OLD | NEW |