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

Side by Side Diff: chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc

Issue 2781473003: Add |SetImageDownloadLimit| to ImageFetcher to limit downloaded bytes (Closed)
Patch Set: Test fix: Mock pure virtual Setter in CrOS notification test Created 3 years, 8 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
« no previous file with comments | « no previous file | components/favicon/core/large_icon_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chromeos/hats/hats_notification_controller.h" 5 #include "chrome/browser/chromeos/hats/hats_notification_controller.h"
6 6
7 #include "base/strings/string_split.h" 7 #include "base/strings/string_split.h"
8 #include "chrome/browser/notifications/message_center_notification_manager.h" 8 #include "chrome/browser/notifications/message_center_notification_manager.h"
9 #include "chrome/browser/notifications/notification.h" 9 #include "chrome/browser/notifications/notification.h"
10 #include "chrome/browser/notifications/notification_ui_manager.h" 10 #include "chrome/browser/notifications/notification_ui_manager.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 public: 70 public:
71 MockImageFetcher() {} 71 MockImageFetcher() {}
72 ~MockImageFetcher() override {} 72 ~MockImageFetcher() override {}
73 73
74 MOCK_METHOD3(StartOrQueueNetworkRequest, 74 MOCK_METHOD3(StartOrQueueNetworkRequest,
75 void(const std::string&, 75 void(const std::string&,
76 const GURL&, 76 const GURL&,
77 const ImageFetcher::ImageFetcherCallback&)); 77 const ImageFetcher::ImageFetcherCallback&));
78 MOCK_METHOD1(SetImageFetcherDelegate, void(ImageFetcherDelegate*)); 78 MOCK_METHOD1(SetImageFetcherDelegate, void(ImageFetcherDelegate*));
79 MOCK_METHOD1(SetDataUseServiceName, void(DataUseServiceName)); 79 MOCK_METHOD1(SetDataUseServiceName, void(DataUseServiceName));
80 MOCK_METHOD1(SetImageDownloadLimit,
81 void(base::Optional<int64_t> max_download_bytes));
80 MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size&)); 82 MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size&));
81 MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*()); 83 MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*());
82 84
83 private: 85 private:
84 DISALLOW_COPY_AND_ASSIGN(MockImageFetcher); 86 DISALLOW_COPY_AND_ASSIGN(MockImageFetcher);
85 }; 87 };
86 88
87 } // namespace 89 } // namespace
88 90
89 class HatsNotificationControllerTest : public BrowserWithTestWindowTest { 91 class HatsNotificationControllerTest : public BrowserWithTestWindowTest {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 ASSERT_TRUE(base::Time::FromInternalValue(new_timestamp) > 280 ASSERT_TRUE(base::Time::FromInternalValue(new_timestamp) >
279 base::Time::FromInternalValue(now_timestamp)); 281 base::Time::FromInternalValue(now_timestamp));
280 282
281 // Destructor for HatsController removes self from observer list. 283 // Destructor for HatsController removes self from observer list.
282 EXPECT_CALL(mock_network_portal_detector_, 284 EXPECT_CALL(mock_network_portal_detector_,
283 RemoveObserver(hats_notification_controller.get())) 285 RemoveObserver(hats_notification_controller.get()))
284 .Times(1); 286 .Times(1);
285 } 287 }
286 288
287 } // namespace chromeos 289 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | components/favicon/core/large_icon_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698