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

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

Issue 2853723002: Disable flaky TestCleanUpCacheEntries on Linux (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media/router/discovery/dial/device_description_service. h" 5 #include "chrome/browser/media/router/discovery/dial/device_description_service. h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/test/mock_callback.h" 8 #include "base/test/mock_callback.h"
9 #include "chrome/browser/media/router/discovery/dial/device_description_fetcher. h" 9 #include "chrome/browser/media/router/discovery/dial/device_description_fetcher. h"
10 #include "chrome/browser/media/router/discovery/dial/dial_device_data.h" 10 #include "chrome/browser/media/router/discovery/dial/dial_device_data.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 EXPECT_CALL(mock_error_cb_, Run(_, _)).Times(3); 241 EXPECT_CALL(mock_error_cb_, Run(_, _)).Times(3);
242 device_description_service()->OnDeviceDescriptionFetchError(device_data_1, 242 device_description_service()->OnDeviceDescriptionFetchError(device_data_1,
243 ""); 243 "");
244 device_description_service()->OnDeviceDescriptionFetchError(device_data_2, 244 device_description_service()->OnDeviceDescriptionFetchError(device_data_2,
245 ""); 245 "");
246 device_description_service()->OnDeviceDescriptionFetchError(device_data_3, 246 device_description_service()->OnDeviceDescriptionFetchError(device_data_3,
247 ""); 247 "");
248 } 248 }
249 249
250 TEST_F(DeviceDescriptionServiceTest, TestCleanUpCacheEntries) { 250 #if defined(OS_LINUX)
251 #define MAYBE_TestCleanUpCacheEntries DISABLED_TestCleanUpCacheEntries
252 #else
253 #define MAYBE_TestCleanUpCacheEntries TestCleanUpCacheEntries
254 #endif
255
256 TEST_F(DeviceDescriptionServiceTest, MAYBE_TestCleanUpCacheEntries) {
251 DialDeviceData device_data_1 = CreateDialDeviceData(1); 257 DialDeviceData device_data_1 = CreateDialDeviceData(1);
252 DialDeviceData device_data_2 = CreateDialDeviceData(2); 258 DialDeviceData device_data_2 = CreateDialDeviceData(2);
253 DialDeviceData device_data_3 = CreateDialDeviceData(3); 259 DialDeviceData device_data_3 = CreateDialDeviceData(3);
254 260
255 AddToCache(device_data_1.label(), ParsedDialDeviceDescription(), 261 AddToCache(device_data_1.label(), ParsedDialDeviceDescription(),
256 true /* expired */); 262 true /* expired */);
257 AddToCache(device_data_2.label(), ParsedDialDeviceDescription(), 263 AddToCache(device_data_2.label(), ParsedDialDeviceDescription(),
258 true /* expired */); 264 true /* expired */);
259 AddToCache(device_data_3.label(), ParsedDialDeviceDescription(), 265 AddToCache(device_data_3.label(), ParsedDialDeviceDescription(),
260 false /* expired */); 266 false /* expired */);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 OnDeviceDescriptionFetchComplete(1); 325 OnDeviceDescriptionFetchComplete(1);
320 326
321 EXPECT_TRUE(device_description_service()->parser_); 327 EXPECT_TRUE(device_description_service()->parser_);
322 OnDeviceDescriptionFetchComplete(2); 328 OnDeviceDescriptionFetchComplete(2);
323 OnDeviceDescriptionFetchComplete(3); 329 OnDeviceDescriptionFetchComplete(3);
324 330
325 EXPECT_FALSE(device_description_service()->parser_); 331 EXPECT_FALSE(device_description_service()->parser_);
326 } 332 }
327 333
328 } // namespace media_router 334 } // namespace media_router
OLDNEW
« 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