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

Unified Diff: components/policy/core/common/cloud/cloud_policy_client_unittest.cc

Issue 2830033003: Use {To/From}JavaTime for policy timestamps (Closed)
Patch Set: Rebase Created 3 years, 8 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: components/policy/core/common/cloud/cloud_policy_client_unittest.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_client_unittest.cc b/components/policy/core/common/cloud/cloud_policy_client_unittest.cc
index bed57e72350ae7dbbd7dfaaf9f9a0124f2409d15..d0ebf6df64a73a057684aab9756a55c51dc6c612 100644
--- a/components/policy/core/common/cloud/cloud_policy_client_unittest.cc
+++ b/components/policy/core/common/cloud/cloud_policy_client_unittest.cc
@@ -537,8 +537,7 @@ TEST_F(CloudPolicyClientTest, PolicyFetchWithMetaData) {
em::PolicyFetchRequest* policy_fetch_request =
policy_request_.mutable_policy_request()->mutable_request(0);
policy_fetch_request->set_machine_id(kMachineID);
- policy_fetch_request->set_timestamp(
- (timestamp - base::Time::UnixEpoch()).InMilliseconds());
+ policy_fetch_request->set_timestamp(timestamp.ToJavaTime());
policy_fetch_request->set_public_key_version(42);
ExpectPolicyFetch(kDMToken);

Powered by Google App Engine
This is Rietveld 408576698