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

Unified Diff: third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp

Issue 2867693004: Snapshot of all changes to get jumbo in blink and content.
Patch Set: Rebased again Created 3 years, 5 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
Index: third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp b/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp
index fe2a37367fabb925ff230e1e91bf11959d36e803..5108aae600421f93829c0f7a6fe08ea986b7cc1b 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp
@@ -24,9 +24,9 @@ namespace {
enum class LoadState { kNotLoaded, kLoadFailed, kLoadSuccessful };
-constexpr char kBaseUrl[] = "http://test.com/";
-constexpr char kBaseDir[] = "notifications/";
-constexpr char kIcon500x500[] = "500x500.png";
+constexpr char kImageLoaderBaseUrl[] = "http://test.com/";
+constexpr char kImageLoaderBaseDir[] = "notifications/";
+constexpr char kImageLoaderIcon500x500[] = "500x500.png";
// This mirrors the definition in NotificationImageLoader.cpp.
constexpr unsigned long kImageFetchTimeoutInMs = 90000;
@@ -54,7 +54,8 @@ class NotificationImageLoaderTest : public ::testing::Test {
// directory.
WebURL RegisterMockedURL(const String& file_name) {
WebURL registered_url = URLTestHelpers::RegisterMockedURLLoadFromBase(
- kBaseUrl, testing::CoreTestDataPath(kBaseDir), file_name, "image/png");
+ kImageLoaderBaseUrl, testing::CoreTestDataPath(kImageLoaderBaseDir),
+ file_name, "image/png");
return registered_url;
}
@@ -86,7 +87,7 @@ class NotificationImageLoaderTest : public ::testing::Test {
};
TEST_F(NotificationImageLoaderTest, SuccessTest) {
- KURL url = RegisterMockedURL(kIcon500x500);
+ KURL url = RegisterMockedURL(kImageLoaderIcon500x500);
LoadImage(url);
histogram_tester_.ExpectTotalCount("Notifications.LoadFinishTime.Icon", 0);
histogram_tester_.ExpectTotalCount("Notifications.LoadFileSize.Icon", 0);
@@ -105,7 +106,7 @@ TEST_F(NotificationImageLoaderTest, TimeoutTest) {
// To test for a timeout, this needs to override the clock in the platform.
// Just creating the mock platform will do everything to set it up.
- KURL url = RegisterMockedURL(kIcon500x500);
+ KURL url = RegisterMockedURL(kImageLoaderIcon500x500);
LoadImage(url);
// Run the platform for kImageFetchTimeoutInMs-1 seconds. This should not

Powered by Google App Engine
This is Rietveld 408576698