| 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 6486c88e183cb4b1b7289e8f6cb001be83ac19dd..0728e79b3dc307443e34b8415cfc2bafabe96a48 100644
|
| --- a/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
|
| +++ b/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
|
| @@ -22,6 +22,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"
|
| @@ -72,10 +73,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,
|
| @@ -149,10 +151,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,
|
| @@ -162,10 +165,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,
|
| @@ -230,12 +234,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);
|
|
|