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

Unified Diff: chrome/browser/media/router/discovery/dial/device_description_service_unittest.cc

Issue 2857763002: [Media Router] Fix unit test "DeviceDescriptionServiceTest.TestCleanUpCacheEntries" (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/discovery/dial/device_description_service_unittest.cc
diff --git a/chrome/browser/media/router/discovery/dial/device_description_service_unittest.cc b/chrome/browser/media/router/discovery/dial/device_description_service_unittest.cc
index 14146139a005cfe858a47acb81107636ea80c37f..cebbd6b68a56d8658d39c3088bcf0db80ccf7d64 100644
--- a/chrome/browser/media/router/discovery/dial/device_description_service_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/device_description_service_unittest.cc
@@ -100,9 +100,8 @@ class DeviceDescriptionServiceTest : public ::testing::Test {
const ParsedDialDeviceDescription& description_data,
bool expired) {
DeviceDescriptionService::CacheEntry cache_entry;
- cache_entry.expire_time = base::Time::Now();
- if (!expired)
- cache_entry.expire_time += base::TimeDelta::FromHours(12);
+ cache_entry.expire_time =
+ base::Time::Now() + (expired ? -1 : 1) * base::TimeDelta::FromHours(12);
cache_entry.description_data = description_data;
description_cache_[device_label] = cache_entry;
}
@@ -247,8 +246,7 @@ TEST_F(DeviceDescriptionServiceTest,
"");
}
-// Flaky: https://crbug.com/716810
-TEST_F(DeviceDescriptionServiceTest, DISABLED_TestCleanUpCacheEntries) {
+TEST_F(DeviceDescriptionServiceTest, TestCleanUpCacheEntries) {
DialDeviceData device_data_1 = CreateDialDeviceData(1);
DialDeviceData device_data_2 = CreateDialDeviceData(2);
DialDeviceData device_data_3 = CreateDialDeviceData(3);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698