Index: components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler_unittest.cc |
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler_unittest.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler_unittest.cc |
index 17430d87cae36775b2e6588c75f3bd1d4d5b9bf3..9eeb70ddbafba6b5fff1679056aea5ea37b894f0 100644 |
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler_unittest.cc |
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler_unittest.cc |
@@ -31,7 +31,8 @@ const char kOtherProxy[] = "testproxy:17"; |
#else |
const char kClient[] = ""; |
#endif |
-const char kVersion[] = "0"; |
+const char kBuildNumber[] = "0"; |
+const char kPatchNumber[] = "1"; |
const char kTestKey[] = "test-key"; |
const char kExpectedCredentials[] = "96bd72ec4a050ba60981743d41787768"; |
const char kExpectedSession[] = "0-1633771873-1633771873-1633771873"; |
@@ -42,24 +43,24 @@ const char kExpectedSession2[] = "0-1633771873-1633771873-1633771873"; |
#if defined(OS_ANDROID) |
const char kExpectedHeader2[] = |
"ps=0-1633771873-1633771873-1633771873, " |
- "sid=c911fdb402f578787562cf7f00eda972, v=0, c=android"; |
+ "sid=c911fdb402f578787562cf7f00eda972, b=0, p=1, c=android"; |
const char kExpectedHeader3[] = |
"ps=86401-1633771873-1633771873-1633771873, " |
- "sid=d7c1c34ef6b90303b01c48a6c1db6419, v=0, c=android"; |
+ "sid=d7c1c34ef6b90303b01c48a6c1db6419, b=0, p=1, c=android"; |
#elif defined(OS_IOS) |
const char kExpectedHeader2[] = |
"ps=0-1633771873-1633771873-1633771873, " |
- "sid=c911fdb402f578787562cf7f00eda972, v=0, c=ios"; |
+ "sid=c911fdb402f578787562cf7f00eda972, b=0, p=1, c=ios"; |
const char kExpectedHeader3[] = |
"ps=86401-1633771873-1633771873-1633771873, " |
- "sid=d7c1c34ef6b90303b01c48a6c1db6419, v=0, c=ios"; |
+ "sid=d7c1c34ef6b90303b01c48a6c1db6419, b=0, p=1, c=ios"; |
#else |
const char kExpectedHeader2[] = |
"ps=0-1633771873-1633771873-1633771873, " |
- "sid=c911fdb402f578787562cf7f00eda972, v=0"; |
+ "sid=c911fdb402f578787562cf7f00eda972, b=0, p=1"; |
const char kExpectedHeader3[] = |
"ps=86401-1633771873-1633771873-1633771873, " |
- "sid=d7c1c34ef6b90303b01c48a6c1db6419, v=0"; |
+ "sid=d7c1c34ef6b90303b01c48a6c1db6419, b=0, p=1"; |
#endif |
const char kDataReductionProxyKey[] = "12345"; |
@@ -73,11 +74,12 @@ class TestDataReductionProxyAuthRequestHandler |
public: |
TestDataReductionProxyAuthRequestHandler( |
const std::string& client, |
- const std::string& version, |
+ const std::string& build_number, |
+ const std::string& patch_number, |
DataReductionProxyParams* params, |
base::MessageLoopProxy* loop_proxy) |
: DataReductionProxyAuthRequestHandler( |
- client, version, params, loop_proxy) {} |
+ client, build_number, patch_number, params, loop_proxy) {} |
virtual std::string GetDefaultKey() const OVERRIDE { |
return kTestKey; |
@@ -125,13 +127,15 @@ TEST_F(DataReductionProxyAuthRequestHandlerTest, Authorization) { |
TestDataReductionProxyParams::HAS_EVERYTHING & |
~TestDataReductionProxyParams::HAS_DEV_ORIGIN)); |
TestDataReductionProxyAuthRequestHandler auth_handler(kClient, |
- kVersion, |
+ kBuildNumber, |
+ kPatchNumber, |
params.get(), |
loop_proxy_); |
auth_handler.Init(); |
base::RunLoop().RunUntilIdle(); |
EXPECT_EQ(auth_handler.client_, kClient); |
- EXPECT_EQ(kVersion, auth_handler.version_); |
+ EXPECT_EQ(kBuildNumber, auth_handler.build_number_); |
+ EXPECT_EQ(kPatchNumber, auth_handler.patch_number_); |
EXPECT_EQ(auth_handler.key_, kTestKey); |
EXPECT_EQ(kExpectedCredentials, auth_handler.credentials_); |
EXPECT_EQ(kExpectedSession, auth_handler.session_); |