| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/download/download_request_manager.h" | 5 #include "chrome/browser/download/download_request_manager.h" |
| 6 #include "chrome/browser/renderer_host/test_render_view_host.h" | 6 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 7 #include "chrome/browser/tab_contents/navigation_controller.h" | 7 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 8 #include "chrome/test/testing_profile.h" | 8 #include "chrome/test/testing_profile.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 class DownloadRequestManagerTest | 11 class DownloadRequestManagerTest |
| 12 : public RenderViewHostTestHarness, | 12 : public RenderViewHostTestHarness, |
| 13 public DownloadRequestManager::Callback { | 13 public DownloadRequestManager::Callback { |
| 14 public: | 14 public: |
| 15 virtual void SetUp() { | 15 virtual void SetUp() { |
| 16 RenderViewHostTestHarness::SetUp(); | 16 RenderViewHostTestHarness::SetUp(); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 ask_allow_count_ = continue_count_ = cancel_count_ = 0; | 193 ask_allow_count_ = continue_count_ = cancel_count_ = 0; |
| 194 CanDownload(); | 194 CanDownload(); |
| 195 ASSERT_EQ(0, ask_allow_count_); | 195 ASSERT_EQ(0, ask_allow_count_); |
| 196 ASSERT_EQ(0, continue_count_); | 196 ASSERT_EQ(0, continue_count_); |
| 197 ASSERT_EQ(1, cancel_count_); | 197 ASSERT_EQ(1, cancel_count_); |
| 198 // And the state shouldn't have changed. | 198 // And the state shouldn't have changed. |
| 199 ASSERT_EQ(DownloadRequestManager::DOWNLOADS_NOT_ALLOWED, | 199 ASSERT_EQ(DownloadRequestManager::DOWNLOADS_NOT_ALLOWED, |
| 200 download_request_manager_->GetDownloadStatus( | 200 download_request_manager_->GetDownloadStatus( |
| 201 controller().tab_contents())); | 201 controller().tab_contents())); |
| 202 } | 202 } |
| OLD | NEW |