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

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

Issue 176053002: [WebsiteSettings] Change permission bubble API to adapt to new mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try 2 Created 6 years, 9 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) 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 "chrome/browser/download/download_request_limiter.h" 5 #include "chrome/browser/download/download_request_limiter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/content_settings/host_content_settings_map.h" 9 #include "chrome/browser/content_settings/host_content_settings_map.h"
10 #include "chrome/browser/download/download_request_infobar_delegate.h" 10 #include "chrome/browser/download/download_request_infobar_delegate.h"
(...skipping 27 matching lines...) Expand all
38 // PermissionBubbleView: 38 // PermissionBubbleView:
39 virtual void SetDelegate(Delegate* delegate) OVERRIDE { 39 virtual void SetDelegate(Delegate* delegate) OVERRIDE {
40 delegate_ = delegate; 40 delegate_ = delegate;
41 } 41 }
42 42
43 virtual void Show( 43 virtual void Show(
44 const std::vector<PermissionBubbleRequest*>& requests, 44 const std::vector<PermissionBubbleRequest*>& requests,
45 const std::vector<bool>& accept_state, 45 const std::vector<bool>& accept_state,
46 bool customization_mode) OVERRIDE; 46 bool customization_mode) OVERRIDE;
47 47
48 virtual bool CanAcceptRequestUpdate() OVERRIDE { return false; }
49
48 virtual void Hide() OVERRIDE {} 50 virtual void Hide() OVERRIDE {}
49 51
50 private: 52 private:
51 DownloadRequestLimiterTest* test_; 53 DownloadRequestLimiterTest* test_;
52 Delegate* delegate_; 54 Delegate* delegate_;
53 }; 55 };
54 56
55 class DownloadRequestLimiterTest : public ChromeRenderViewHostTestHarness { 57 class DownloadRequestLimiterTest : public ChromeRenderViewHostTestHarness {
56 public: 58 public:
57 enum TestingAction { 59 enum TestingAction {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 CanDownload(); 455 CanDownload();
454 ExpectAndResetCounts(0, 1, 0, __LINE__); 456 ExpectAndResetCounts(0, 1, 0, __LINE__);
455 ASSERT_EQ(DownloadRequestLimiter::PROMPT_BEFORE_DOWNLOAD, 457 ASSERT_EQ(DownloadRequestLimiter::PROMPT_BEFORE_DOWNLOAD,
456 download_request_limiter_->GetDownloadStatus(web_contents())); 458 download_request_limiter_->GetDownloadStatus(web_contents()));
457 459
458 CanDownload(); 460 CanDownload();
459 ExpectAndResetCounts(0, 1, 0, __LINE__); 461 ExpectAndResetCounts(0, 1, 0, __LINE__);
460 ASSERT_EQ(DownloadRequestLimiter::PROMPT_BEFORE_DOWNLOAD, 462 ASSERT_EQ(DownloadRequestLimiter::PROMPT_BEFORE_DOWNLOAD,
461 download_request_limiter_->GetDownloadStatus(web_contents())); 463 download_request_limiter_->GetDownloadStatus(web_contents()));
462 } 464 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698