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

Unified Diff: components/cryptauth/foreground_eid_generator_unittest.cc

Issue 2847233003: [EasyUnlock] Move DataWithTimestamp out of ForegroundEidGenerator so it can be shared. (Closed)
Patch Set: fixes 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/cryptauth/foreground_eid_generator_unittest.cc
diff --git a/components/cryptauth/foreground_eid_generator_unittest.cc b/components/cryptauth/foreground_eid_generator_unittest.cc
index a52b0d89d11d6ee7d2a7ee2eb7d90c42eb1adfff..97e90179685a1e1c4db282ae475e0eafb3ecb906 100644
--- a/components/cryptauth/foreground_eid_generator_unittest.cc
+++ b/components/cryptauth/foreground_eid_generator_unittest.cc
@@ -359,7 +359,7 @@ TEST_F(CryptAuthForegroundEidGeneratorTest,
TEST_F(CryptAuthForegroundEidGeneratorTest, GenerateAdvertisementData) {
SetTestTime(kDefaultCurrentTime);
- std::unique_ptr<ForegroundEidGenerator::DataWithTimestamp> data =
+ std::unique_ptr<DataWithTimestamp> data =
eid_generator_->GenerateAdvertisement(kDefaultAdvertisingDevicePublicKey,
scanning_device_beacon_seeds_);
ASSERT_TRUE(data);
@@ -376,7 +376,7 @@ TEST_F(CryptAuthForegroundEidGeneratorTest,
GenerateAdvertisementData_NoSeedForPeriod) {
SetTestTime(kDefaultCurrentTime + 4 * kNumMsInEidSeedPeriod);
- std::unique_ptr<ForegroundEidGenerator::DataWithTimestamp> data =
+ std::unique_ptr<DataWithTimestamp> data =
eid_generator_->GenerateAdvertisement(kDefaultAdvertisingDevicePublicKey,
scanning_device_beacon_seeds_);
EXPECT_FALSE(data);
@@ -387,7 +387,7 @@ TEST_F(CryptAuthForegroundEidGeneratorTest,
SetTestTime(kDefaultCurrentTime + 4 * kNumMsInEidSeedPeriod);
std::vector<BeaconSeed> empty;
- std::unique_ptr<ForegroundEidGenerator::DataWithTimestamp> data =
+ std::unique_ptr<DataWithTimestamp> data =
eid_generator_->GenerateAdvertisement(kDefaultAdvertisingDevicePublicKey,
empty);
EXPECT_FALSE(data);
@@ -637,8 +637,8 @@ TEST_F(CryptAuthForegroundEidGeneratorTest,
}
TEST_F(CryptAuthForegroundEidGeneratorTest, DataWithTimestamp_ContainsTime) {
- ForegroundEidGenerator::DataWithTimestamp data_with_timestamp(
- "data", /* start */ 1000L, /* end */ 2000L);
+ DataWithTimestamp data_with_timestamp("data", /* start */ 1000L,
+ /* end */ 2000L);
EXPECT_FALSE(data_with_timestamp.ContainsTime(999L));
EXPECT_TRUE(data_with_timestamp.ContainsTime(1000L));
EXPECT_TRUE(data_with_timestamp.ContainsTime(1500L));
« no previous file with comments | « components/cryptauth/foreground_eid_generator.cc ('k') | components/cryptauth/mock_foreground_eid_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698