OLD | NEW |
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 Loading... |
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 |
OLD | NEW |