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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 ASSERT_TRUE(client->notifyFinishedCalled()); 287 ASSERT_TRUE(client->notifyFinishedCalled());
288 ASSERT_TRUE(cachedImage->getImage()->isBitmapImage()); 288 ASSERT_TRUE(cachedImage->getImage()->isBitmapImage());
289 289
290 cachedImage->reloadIfLoFi(fetcher); 290 cachedImage->reloadIfLoFi(fetcher);
291 ASSERT_FALSE(cachedImage->errorOccurred()); 291 ASSERT_FALSE(cachedImage->errorOccurred());
292 ASSERT_FALSE(cachedImage->resourceBuffer()); 292 ASSERT_FALSE(cachedImage->resourceBuffer());
293 ASSERT_TRUE(cachedImage->hasImage()); 293 ASSERT_TRUE(cachedImage->hasImage());
294 ASSERT_EQ(client->imageChangedCount(), 3); 294 ASSERT_EQ(client->imageChangedCount(), 3);
295 295
296 cachedImage->loader()->didReceiveResponse(nullptr, WrappedResourceResponse(r esourceResponse), nullptr); 296 cachedImage->loader()->didReceiveResponse(nullptr, WrappedResourceResponse(r esourceResponse), nullptr);
297 cachedImage->loader()->didReceiveData(nullptr, reinterpret_cast<const char*> (jpeg.data()), jpeg.size(), jpeg.size()); 297 cachedImage->loader()->didReceiveData(nullptr, reinterpret_cast<const char*> (jpeg.data()), jpeg.size(), jpeg.size(), jpeg.size());
298 cachedImage->loader()->didFinishLoading(nullptr, 0.0, jpeg.size()); 298 cachedImage->loader()->didFinishLoading(nullptr, 0.0, jpeg.size());
299 ASSERT_FALSE(cachedImage->errorOccurred()); 299 ASSERT_FALSE(cachedImage->errorOccurred());
300 ASSERT_TRUE(cachedImage->hasImage()); 300 ASSERT_TRUE(cachedImage->hasImage());
301 ASSERT_FALSE(cachedImage->getImage()->isNull()); 301 ASSERT_FALSE(cachedImage->getImage()->isNull());
302 ASSERT_TRUE(client->notifyFinishedCalled()); 302 ASSERT_TRUE(client->notifyFinishedCalled());
303 ASSERT_TRUE(cachedImage->getImage()->isBitmapImage()); 303 ASSERT_TRUE(cachedImage->getImage()->isBitmapImage());
304 } 304 }
305 305
306 } // namespace blink 306 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698