Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: chrome/browser/download/download_request_limiter_unittest.cc

Issue 8983010: Convert WebContents to return a content::NavigationController instead of the implementation. Upda... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/download/download_request_limiter.h" 5 #include "chrome/browser/download/download_request_limiter.h"
6 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" 6 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
7 #include "chrome/test/base/testing_profile.h" 7 #include "chrome/test/base/testing_profile.h"
8 #include "content/browser/tab_contents/navigation_controller.h"
9 #include "content/browser/tab_contents/test_tab_contents.h" 8 #include "content/browser/tab_contents/test_tab_contents.h"
9 #include "content/public/browser/navigation_controller.h"
10 #include "content/test/test_browser_thread.h" 10 #include "content/test/test_browser_thread.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 using content::BrowserThread; 13 using content::BrowserThread;
14 14
15 class DownloadRequestLimiterTest 15 class DownloadRequestLimiterTest
16 : public TabContentsWrapperTestHarness, 16 : public TabContentsWrapperTestHarness,
17 public DownloadRequestLimiter::Callback { 17 public DownloadRequestLimiter::Callback {
18 public: 18 public:
19 DownloadRequestLimiterTest() 19 DownloadRequestLimiterTest()
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // And make sure we really can't download. 193 // And make sure we really can't download.
194 ask_allow_count_ = continue_count_ = cancel_count_ = 0; 194 ask_allow_count_ = continue_count_ = cancel_count_ = 0;
195 CanDownload(); 195 CanDownload();
196 ASSERT_EQ(0, ask_allow_count_); 196 ASSERT_EQ(0, ask_allow_count_);
197 ASSERT_EQ(0, continue_count_); 197 ASSERT_EQ(0, continue_count_);
198 ASSERT_EQ(1, cancel_count_); 198 ASSERT_EQ(1, cancel_count_);
199 // And the state shouldn't have changed. 199 // And the state shouldn't have changed.
200 ASSERT_EQ(DownloadRequestLimiter::DOWNLOADS_NOT_ALLOWED, 200 ASSERT_EQ(DownloadRequestLimiter::DOWNLOADS_NOT_ALLOWED,
201 download_request_limiter_->GetDownloadStatus(contents())); 201 download_request_limiter_->GetDownloadStatus(contents()));
202 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698