OLD | NEW |
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 Loading... |
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 // Flaky: https://crbug.com/716810 |
| 251 TEST_F(DeviceDescriptionServiceTest, DISABLED_TestCleanUpCacheEntries) { |
251 DialDeviceData device_data_1 = CreateDialDeviceData(1); | 252 DialDeviceData device_data_1 = CreateDialDeviceData(1); |
252 DialDeviceData device_data_2 = CreateDialDeviceData(2); | 253 DialDeviceData device_data_2 = CreateDialDeviceData(2); |
253 DialDeviceData device_data_3 = CreateDialDeviceData(3); | 254 DialDeviceData device_data_3 = CreateDialDeviceData(3); |
254 | 255 |
255 AddToCache(device_data_1.label(), ParsedDialDeviceDescription(), | 256 AddToCache(device_data_1.label(), ParsedDialDeviceDescription(), |
256 true /* expired */); | 257 true /* expired */); |
257 AddToCache(device_data_2.label(), ParsedDialDeviceDescription(), | 258 AddToCache(device_data_2.label(), ParsedDialDeviceDescription(), |
258 true /* expired */); | 259 true /* expired */); |
259 AddToCache(device_data_3.label(), ParsedDialDeviceDescription(), | 260 AddToCache(device_data_3.label(), ParsedDialDeviceDescription(), |
260 false /* expired */); | 261 false /* expired */); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 OnDeviceDescriptionFetchComplete(1); | 320 OnDeviceDescriptionFetchComplete(1); |
320 | 321 |
321 EXPECT_TRUE(device_description_service()->parser_); | 322 EXPECT_TRUE(device_description_service()->parser_); |
322 OnDeviceDescriptionFetchComplete(2); | 323 OnDeviceDescriptionFetchComplete(2); |
323 OnDeviceDescriptionFetchComplete(3); | 324 OnDeviceDescriptionFetchComplete(3); |
324 | 325 |
325 EXPECT_FALSE(device_description_service()->parser_); | 326 EXPECT_FALSE(device_description_service()->parser_); |
326 } | 327 } |
327 | 328 |
328 } // namespace media_router | 329 } // namespace media_router |
OLD | NEW |