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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor_unittest.cc

Issue 1866483002: Add a new priority level, THROTTLED, below IDLE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjusted predictor priorities. Created 4 years, 2 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: chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
index 61d34a59d449d71f1b48b2fa67a8e32863b74181..ef9637377d80fb026fc88777be192b60527de8c7 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
@@ -440,6 +440,16 @@ void ResourcePrefetchPredictorTest::InitializeSampleData() {
}
}
+// Confirm that there's been no shift in the
Benoit L 2016/10/21 16:51:20 Thanks for that!
+// ResourceData_Priority/net::RequestPriority equivalence.
+static_assert(static_cast<int>(net::MINIMUM_PRIORITY) ==
+ static_cast<int>(
+ ResourceData_Priority_REQUEST_PRIORITY_THROTTLED),
+ "Database/Net priority mismatch: Minimum");
+static_assert(static_cast<int>(net::MAXIMUM_PRIORITY) ==
+ static_cast<int>(ResourceData_Priority_REQUEST_PRIORITY_HIGHEST),
+ "Database/Net priority mismatch: Maximum");
+
// Tests that the predictor initializes correctly without any data.
TEST_F(ResourcePrefetchPredictorTest, LazilyInitializeEmpty) {
EXPECT_TRUE(predictor_->url_table_cache_->empty());
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor_tables.h ('k') | content/browser/loader/async_revalidation_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698