| Index: chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
|
| diff --git a/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc b/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
|
| index 1bbf63b0df848e4459d3595d87eb289dc5219224..596693b43615d5b5ed675106eda6be48f67c7822 100644
|
| --- a/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
|
| +++ b/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
|
| @@ -23,6 +23,7 @@
|
| #include "components/prefs/pref_service.h"
|
| #include "content/public/test/test_browser_thread_bundle.h"
|
| #include "content/public/test/test_utils.h"
|
| +#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/gfx/image/image_unittest_util.h"
|
| @@ -48,10 +49,11 @@ class MockImageFetcher : public image_fetcher::ImageFetcher {
|
| MockImageFetcher() {}
|
| ~MockImageFetcher() override {}
|
|
|
| - MOCK_METHOD3(StartOrQueueNetworkRequest,
|
| + MOCK_METHOD4(StartOrQueueNetworkRequest,
|
| void(const std::string&,
|
| const GURL&,
|
| - const ImageFetcher::ImageFetcherCallback&));
|
| + const ImageFetcher::ImageFetcherCallback&,
|
| + const net::NetworkTrafficAnnotationTag&));
|
| MOCK_METHOD1(SetImageFetcherDelegate, void(ImageFetcherDelegate*));
|
| MOCK_METHOD1(SetDataUseServiceName, void(DataUseServiceName));
|
| MOCK_METHOD1(SetImageDownloadLimit,
|
| @@ -125,10 +127,11 @@ class HatsNotificationControllerTest : public BrowserWithTestWindowTest {
|
| // Run the image fetcher callback to simulate a successful 1x icon fetch.
|
| ON_CALL(*mock_image_fetcher_,
|
| StartOrQueueNetworkRequest(
|
| - HatsNotificationController::kImageFetcher1xId, _, _))
|
| + HatsNotificationController::kImageFetcher1xId, _, _, _))
|
| .WillByDefault(Invoke([&hats_notification_controller](
|
| const std::string&, const GURL&,
|
| - const ImageFetcher::ImageFetcherCallback&) {
|
| + const ImageFetcher::ImageFetcherCallback&,
|
| + const net::NetworkTrafficAnnotationTag&) {
|
| gfx::Image icon_1x(gfx::test::CreateImage());
|
| hats_notification_controller->OnImageFetched(
|
| HatsNotificationController::kImageFetcher1xId, icon_1x,
|
| @@ -138,10 +141,11 @@ class HatsNotificationControllerTest : public BrowserWithTestWindowTest {
|
| // Run the image fetcher callback to simulate a successful 2x icon fetch.
|
| ON_CALL(*mock_image_fetcher_,
|
| StartOrQueueNetworkRequest(
|
| - HatsNotificationController::kImageFetcher2xId, _, _))
|
| + HatsNotificationController::kImageFetcher2xId, _, _, _))
|
| .WillByDefault(Invoke([&hats_notification_controller](
|
| const std::string&, const GURL&,
|
| - ImageFetcher::ImageFetcherCallback) {
|
| + ImageFetcher::ImageFetcherCallback,
|
| + const net::NetworkTrafficAnnotationTag&) {
|
| gfx::Image icon_1x(gfx::test::CreateImage());
|
| hats_notification_controller->OnImageFetched(
|
| HatsNotificationController::kImageFetcher2xId, icon_1x,
|
| @@ -206,12 +210,12 @@ TEST_F(HatsNotificationControllerTest, OldDevice_ShouldShowNotification) {
|
| EXPECT_CALL(*mock_image_fetcher_,
|
| StartOrQueueNetworkRequest(
|
| HatsNotificationController::kImageFetcher1xId,
|
| - GURL(HatsNotificationController::kGoogleIcon1xUrl), _))
|
| + GURL(HatsNotificationController::kGoogleIcon1xUrl), _, _))
|
| .Times(1);
|
| EXPECT_CALL(*mock_image_fetcher_,
|
| StartOrQueueNetworkRequest(
|
| HatsNotificationController::kImageFetcher2xId,
|
| - GURL(HatsNotificationController::kGoogleIcon2xUrl), _))
|
| + GURL(HatsNotificationController::kGoogleIcon2xUrl), _, _))
|
| .Times(1);
|
|
|
| hats_notification_controller->Initialize(false);
|
|
|