| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/test/base/testing_profile.h" | 6 #include "chrome/test/base/testing_profile.h" |
| 7 #include "content/browser/download/download_create_info.h" | 7 #include "content/browser/download/download_create_info.h" |
| 8 #include "content/browser/download/download_id.h" | 8 #include "content/browser/download/download_id.h" |
| 9 #include "content/browser/download/download_id_factory.h" | 9 #include "content/browser/download/download_id_factory.h" |
| 10 #include "content/browser/download/download_item.h" | 10 #include "content/browser/download/download_item.h" |
| 11 #include "content/browser/download/download_status_updater.h" | 11 #include "content/browser/download/download_status_updater.h" |
| 12 #include "content/browser/download/interrupt_reasons.h" | 12 #include "content/browser/download/interrupt_reasons.h" |
| 13 #include "content/browser/download/mock_download_item.h" |
| 13 #include "content/browser/download/mock_download_manager.h" | 14 #include "content/browser/download/mock_download_manager.h" |
| 14 #include "content/browser/download/mock_download_manager_delegate.h" | 15 #include "content/browser/download/mock_download_manager_delegate.h" |
| 15 #include "content/test/test_browser_thread.h" | 16 #include "content/test/test_browser_thread.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 18 |
| 18 using content::BrowserThread; | 19 using content::BrowserThread; |
| 19 | 20 |
| 20 DownloadId::Domain kValidDownloadItemIdDomain = "valid DownloadId::Domain"; | 21 DownloadId::Domain kValidDownloadItemIdDomain = "valid DownloadId::Domain"; |
| 21 | 22 |
| 22 class DownloadItemTest : public testing::Test { | 23 class DownloadItemTest : public testing::Test { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 TEST_F(DownloadItemTest, NotificationAfterTogglePause) { | 245 TEST_F(DownloadItemTest, NotificationAfterTogglePause) { |
| 245 DownloadItem* item = CreateDownloadItem(DownloadItem::IN_PROGRESS); | 246 DownloadItem* item = CreateDownloadItem(DownloadItem::IN_PROGRESS); |
| 246 MockObserver observer(item); | 247 MockObserver observer(item); |
| 247 | 248 |
| 248 item->TogglePause(); | 249 item->TogglePause(); |
| 249 ASSERT_TRUE(observer.CheckUpdated()); | 250 ASSERT_TRUE(observer.CheckUpdated()); |
| 250 | 251 |
| 251 item->TogglePause(); | 252 item->TogglePause(); |
| 252 ASSERT_TRUE(observer.CheckUpdated()); | 253 ASSERT_TRUE(observer.CheckUpdated()); |
| 253 } | 254 } |
| 255 |
| 256 TEST(MockDownloadItem, Compiles) { |
| 257 MockDownloadItem mock_item; |
| 258 } |
| OLD | NEW |