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

Unified Diff: content/browser/background_fetch/background_fetch_job_controller_unittest.cc

Issue 2860593003: Refactoring DownloadManager::DownloadURL to add proper annotation. (Closed)
Patch Set: Comment addressed. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/background_fetch/background_fetch_job_controller_unittest.cc
diff --git a/content/browser/background_fetch/background_fetch_job_controller_unittest.cc b/content/browser/background_fetch/background_fetch_job_controller_unittest.cc
index d267814283eceda172bb1bc48c722eb20af97793..55853a39c82a0e06010238dc1a6bc0462b3d88e0 100644
--- a/content/browser/background_fetch/background_fetch_job_controller_unittest.cc
+++ b/content/browser/background_fetch/background_fetch_job_controller_unittest.cc
@@ -20,6 +20,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/test/fake_download_item.h"
#include "content/public/test/mock_download_manager.h"
+#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/url_request_context_getter.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -148,7 +149,8 @@ TEST_F(BackgroundFetchJobControllerTest, SingleRequestJob) {
EXPECT_EQ(controller->state(),
BackgroundFetchJobController::State::INITIALIZED);
- controller->Start(initial_requests /* deliberate copy */);
+ controller->Start(initial_requests /* deliberate copy */,
+ TRAFFIC_ANNOTATION_FOR_TESTS);
EXPECT_EQ(controller->state(), BackgroundFetchJobController::State::FETCHING);
// Mark the single download item as finished, completing the job.
@@ -192,7 +194,8 @@ TEST_F(BackgroundFetchJobControllerTest, MultipleRequestJob) {
base::RunLoop run_loop;
job_completed_closure_ = run_loop.QuitClosure();
- controller->Start(initial_requests /* deliberate copy */);
+ controller->Start(initial_requests /* deliberate copy */,
+ TRAFFIC_ANNOTATION_FOR_TESTS);
EXPECT_EQ(controller->state(),
BackgroundFetchJobController::State::FETCHING);
@@ -223,7 +226,8 @@ TEST_F(BackgroundFetchJobControllerTest, AbortJob) {
base::RunLoop run_loop;
job_completed_closure_ = run_loop.QuitClosure();
- controller->Start(initial_requests /* deliberate copy */);
+ controller->Start(initial_requests /* deliberate copy */,
+ TRAFFIC_ANNOTATION_FOR_TESTS);
EXPECT_EQ(controller->state(),
BackgroundFetchJobController::State::FETCHING);

Powered by Google App Engine
This is Rietveld 408576698