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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc

Issue 2940163002: Randomizing seed page id for DRP (Closed)
Patch Set: tbansal comments Created 3 years, 6 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
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
index eb11d635005bdf7db722c3b66abb2fd6c4f38f15..3b84422478ba5d1918d670dd1ea1d005d603cf74 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
@@ -417,15 +417,17 @@ TEST_F(DataReductionProxyRequestOptionsTest, GetSessionKeyFromRequestHeaders) {
TEST_F(DataReductionProxyRequestOptionsTest, PageIdIncrementing) {
CreateRequestOptions(kVersion);
- DCHECK_EQ(1u, request_options()->GeneratePageId());
- DCHECK_EQ(2u, request_options()->GeneratePageId());
- DCHECK_EQ(3u, request_options()->GeneratePageId());
+ uint64_t page_id = request_options()->GeneratePageId();
+ DCHECK_EQ(++page_id, request_options()->GeneratePageId());
+ DCHECK_EQ(++page_id, request_options()->GeneratePageId());
+ DCHECK_EQ(++page_id, request_options()->GeneratePageId());
request_options()->SetSecureSession("blah");
- DCHECK_EQ(1u, request_options()->GeneratePageId());
- DCHECK_EQ(2u, request_options()->GeneratePageId());
- DCHECK_EQ(3u, request_options()->GeneratePageId());
+ page_id = request_options()->GeneratePageId();
+ DCHECK_EQ(++page_id, request_options()->GeneratePageId());
+ DCHECK_EQ(++page_id, request_options()->GeneratePageId());
+ DCHECK_EQ(++page_id, request_options()->GeneratePageId());
}
} // namespace data_reduction_proxy
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698