| OLD | NEW |
| 1 // Copyright 2016 Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/notifications/NotificationImageLoader.h" | 5 #include "modules/notifications/NotificationImageLoader.h" |
| 6 | 6 |
| 7 #include "core/dom/ExecutionContext.h" | 7 #include "core/dom/ExecutionContext.h" |
| 8 #include "core/testing/DummyPageHolder.h" | 8 #include "core/testing/DummyPageHolder.h" |
| 9 #include "platform/loader/fetch/MemoryCache.h" | 9 #include "platform/loader/fetch/MemoryCache.h" |
| 10 #include "platform/testing/HistogramTester.h" | 10 #include "platform/testing/HistogramTester.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 // If the loader times out, it calls the callback and returns an empty bitmap. | 122 // If the loader times out, it calls the callback and returns an empty bitmap. |
| 123 EXPECT_EQ(LoadState::kLoadFailed, Loaded()); | 123 EXPECT_EQ(LoadState::kLoadFailed, Loaded()); |
| 124 histogram_tester_.ExpectTotalCount("Notifications.LoadFinishTime.Icon", 0); | 124 histogram_tester_.ExpectTotalCount("Notifications.LoadFinishTime.Icon", 0); |
| 125 histogram_tester_.ExpectTotalCount("Notifications.LoadFileSize.Icon", 0); | 125 histogram_tester_.ExpectTotalCount("Notifications.LoadFileSize.Icon", 0); |
| 126 // Should log a non-zero failure time. | 126 // Should log a non-zero failure time. |
| 127 histogram_tester_.ExpectTotalCount("Notifications.LoadFailTime.Icon", 1); | 127 histogram_tester_.ExpectTotalCount("Notifications.LoadFailTime.Icon", 1); |
| 128 histogram_tester_.ExpectBucketCount("Notifications.LoadFailTime.Icon", 0, 0); | 128 histogram_tester_.ExpectBucketCount("Notifications.LoadFailTime.Icon", 0, 0); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namspace | 131 } // namespace |
| 132 } // namespace blink | 132 } // namespace blink |
| OLD | NEW |