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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 ASSERT_FALSE(cachedImage->errorOccurred()); | 281 ASSERT_FALSE(cachedImage->errorOccurred()); |
282 ASSERT_TRUE(cachedImage->hasImage()); | 282 ASSERT_TRUE(cachedImage->hasImage()); |
283 ASSERT_FALSE(cachedImage->getImage()->isNull()); | 283 ASSERT_FALSE(cachedImage->getImage()->isNull()); |
284 ASSERT_EQ(client.imageChangedCount(), 2); | 284 ASSERT_EQ(client.imageChangedCount(), 2); |
285 ASSERT_TRUE(client.notifyFinishedCalled()); | 285 ASSERT_TRUE(client.notifyFinishedCalled()); |
286 ASSERT_TRUE(cachedImage->getImage()->isBitmapImage()); | 286 ASSERT_TRUE(cachedImage->getImage()->isBitmapImage()); |
287 | 287 |
288 cachedImage->reloadIfLoFi(fetcher); | 288 cachedImage->reloadIfLoFi(fetcher); |
289 ASSERT_FALSE(cachedImage->errorOccurred()); | 289 ASSERT_FALSE(cachedImage->errorOccurred()); |
290 ASSERT_FALSE(cachedImage->resourceBuffer()); | 290 ASSERT_FALSE(cachedImage->resourceBuffer()); |
291 ASSERT_FALSE(cachedImage->hasImage()); | 291 ASSERT_TRUE(cachedImage->hasImage()); |
292 ASSERT_EQ(client.imageChangedCount(), 3); | 292 ASSERT_EQ(client.imageChangedCount(), 3); |
293 | 293 |
294 cachedImage->responseReceived(resourceResponse, nullptr); | 294 cachedImage->responseReceived(resourceResponse, nullptr); |
295 cachedImage->appendData(reinterpret_cast<const char*>(jpeg.data()), jpeg.siz
e()); | 295 cachedImage->appendData(reinterpret_cast<const char*>(jpeg.data()), jpeg.siz
e()); |
296 cachedImage->finish(); | 296 cachedImage->finish(); |
297 ASSERT_FALSE(cachedImage->errorOccurred()); | 297 ASSERT_FALSE(cachedImage->errorOccurred()); |
298 ASSERT_TRUE(cachedImage->hasImage()); | 298 ASSERT_TRUE(cachedImage->hasImage()); |
299 ASSERT_FALSE(cachedImage->getImage()->isNull()); | 299 ASSERT_FALSE(cachedImage->getImage()->isNull()); |
300 ASSERT_TRUE(client.notifyFinishedCalled()); | 300 ASSERT_TRUE(client.notifyFinishedCalled()); |
301 ASSERT_TRUE(cachedImage->getImage()->isBitmapImage()); | 301 ASSERT_TRUE(cachedImage->getImage()->isBitmapImage()); |
302 } | 302 } |
303 | 303 |
304 } // namespace blink | 304 } // namespace blink |
OLD | NEW |