| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/notifications/NotificationResourcesLoader.h" | 5 #include "modules/notifications/NotificationResourcesLoader.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include "core/testing/DummyPageHolder.h" | 8 #include "core/testing/DummyPageHolder.h" |
| 9 #include "platform/heap/Heap.h" | 9 #include "platform/heap/Heap.h" |
| 10 #include "platform/loader/fetch/MemoryCache.h" | 10 #include "platform/loader/fetch/MemoryCache.h" |
| 11 #include "platform/testing/URLTestHelpers.h" | 11 #include "platform/testing/URLTestHelpers.h" |
| 12 #include "platform/testing/UnitTestHelpers.h" | 12 #include "platform/testing/UnitTestHelpers.h" |
| 13 #include "platform/weborigin/KURL.h" | 13 #include "platform/weborigin/KURL.h" |
| 14 #include "platform/wtf/Functional.h" |
| 15 #include "platform/wtf/text/WTFString.h" |
| 14 #include "public/platform/Platform.h" | 16 #include "public/platform/Platform.h" |
| 15 #include "public/platform/WebURL.h" | 17 #include "public/platform/WebURL.h" |
| 16 #include "public/platform/WebURLLoaderMockFactory.h" | 18 #include "public/platform/WebURLLoaderMockFactory.h" |
| 17 #include "public/platform/WebURLResponse.h" | 19 #include "public/platform/WebURLResponse.h" |
| 18 #include "public/platform/modules/notifications/WebNotificationConstants.h" | 20 #include "public/platform/modules/notifications/WebNotificationConstants.h" |
| 19 #include "public/platform/modules/notifications/WebNotificationData.h" | 21 #include "public/platform/modules/notifications/WebNotificationData.h" |
| 20 #include "public/platform/modules/notifications/WebNotificationResources.h" | 22 #include "public/platform/modules/notifications/WebNotificationResources.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #include "wtf/Functional.h" | |
| 23 #include "wtf/text/WTFString.h" | |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 constexpr char kBaseUrl[] = "http://test.com/"; | 28 constexpr char kBaseUrl[] = "http://test.com/"; |
| 29 constexpr char kBaseDir[] = "notifications/"; | 29 constexpr char kBaseDir[] = "notifications/"; |
| 30 constexpr char kIcon48x48[] = "48x48.png"; | 30 constexpr char kIcon48x48[] = "48x48.png"; |
| 31 constexpr char kIcon100x100[] = "100x100.png"; | 31 constexpr char kIcon100x100[] = "100x100.png"; |
| 32 constexpr char kIcon110x110[] = "110x110.png"; | 32 constexpr char kIcon110x110[] = "110x110.png"; |
| 33 constexpr char kIcon120x120[] = "120x120.png"; | 33 constexpr char kIcon120x120[] = "120x120.png"; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 Platform::Current()->GetURLLoaderMockFactory()->ServeAsynchronousRequests(); | 268 Platform::Current()->GetURLLoaderMockFactory()->ServeAsynchronousRequests(); |
| 269 | 269 |
| 270 // Loading should have been cancelled when |stop| was called so no resources | 270 // Loading should have been cancelled when |stop| was called so no resources |
| 271 // should have been received by the test even though | 271 // should have been received by the test even though |
| 272 // |serveAsynchronousRequests| was called. | 272 // |serveAsynchronousRequests| was called. |
| 273 ASSERT_FALSE(Resources()); | 273 ASSERT_FALSE(Resources()); |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace | 276 } // namespace |
| 277 } // namespace blink | 277 } // namespace blink |
| OLD | NEW |