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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 const int original_image_changed_count = observer->ImageChangedCount(); | 201 const int original_image_changed_count = observer->ImageChangedCount(); |
202 const bool already_notified_finish = observer->ImageNotifyFinishedCalled(); | 202 const bool already_notified_finish = observer->ImageNotifyFinishedCalled(); |
203 const int image_width_on_image_notify_finished = | 203 const int image_width_on_image_notify_finished = |
204 observer->ImageWidthOnImageNotifyFinished(); | 204 observer->ImageWidthOnImageNotifyFinished(); |
205 ASSERT_NE(kImageWidth, image_width_on_image_notify_finished); | 205 ASSERT_NE(kImageWidth, image_width_on_image_notify_finished); |
206 | 206 |
207 // Does Reload. | 207 // Does Reload. |
208 image_resource->Loader()->DidReceiveResponse(WrappedResourceResponse( | 208 image_resource->Loader()->DidReceiveResponse(WrappedResourceResponse( |
209 ResourceResponse(test_url, "image/jpeg", kDataLength, g_null_atom))); | 209 ResourceResponse(test_url, "image/jpeg", kDataLength, g_null_atom))); |
210 image_resource->Loader()->DidReceiveData(data, kDataLength); | 210 image_resource->Loader()->DidReceiveData(data, kDataLength); |
211 image_resource->Loader()->DidFinishLoading(0.0, kDataLength, kDataLength); | 211 image_resource->Loader()->DidFinishLoading(0.0, kDataLength, kDataLength, |
| 212 kDataLength); |
212 | 213 |
213 // Checks |imageResource|'s status after reloading. | 214 // Checks |imageResource|'s status after reloading. |
214 EXPECT_EQ(ResourceStatus::kCached, image_resource->GetStatus()); | 215 EXPECT_EQ(ResourceStatus::kCached, image_resource->GetStatus()); |
215 EXPECT_FALSE(image_resource->ErrorOccurred()); | 216 EXPECT_FALSE(image_resource->ErrorOccurred()); |
216 EXPECT_EQ(kDataLength, image_resource->EncodedSize()); | 217 EXPECT_EQ(kDataLength, image_resource->EncodedSize()); |
217 | 218 |
218 // Checks |observer| after reloading that it is notified of updates/finish. | 219 // Checks |observer| after reloading that it is notified of updates/finish. |
219 EXPECT_LT(original_image_changed_count, observer->ImageChangedCount()); | 220 EXPECT_LT(original_image_changed_count, observer->ImageChangedCount()); |
220 EXPECT_EQ(kImageWidth, observer->ImageWidthOnLastImageChanged()); | 221 EXPECT_EQ(kImageWidth, observer->ImageWidthOnLastImageChanged()); |
221 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 222 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 response.SetHTTPHeaderField( | 257 response.SetHTTPHeaderField( |
257 "content-range", BuildContentRange(kJpegImageSubrangeWithDimensionsLength, | 258 "content-range", BuildContentRange(kJpegImageSubrangeWithDimensionsLength, |
258 sizeof(kJpegImage))); | 259 sizeof(kJpegImage))); |
259 image_resource->Loader()->DidReceiveResponse( | 260 image_resource->Loader()->DidReceiveResponse( |
260 WrappedResourceResponse(response)); | 261 WrappedResourceResponse(response)); |
261 image_resource->Loader()->DidReceiveData( | 262 image_resource->Loader()->DidReceiveData( |
262 reinterpret_cast<const char*>(kJpegImage), | 263 reinterpret_cast<const char*>(kJpegImage), |
263 kJpegImageSubrangeWithDimensionsLength); | 264 kJpegImageSubrangeWithDimensionsLength); |
264 image_resource->Loader()->DidFinishLoading( | 265 image_resource->Loader()->DidFinishLoading( |
265 0.0, kJpegImageSubrangeWithDimensionsLength, | 266 0.0, kJpegImageSubrangeWithDimensionsLength, |
| 267 kJpegImageSubrangeWithDimensionsLength, |
266 kJpegImageSubrangeWithDimensionsLength); | 268 kJpegImageSubrangeWithDimensionsLength); |
267 | 269 |
268 // Checks that |imageResource| is successfully loaded, showing a placeholder. | 270 // Checks that |imageResource| is successfully loaded, showing a placeholder. |
269 EXPECT_EQ(ResourceStatus::kCached, image_resource->GetStatus()); | 271 EXPECT_EQ(ResourceStatus::kCached, image_resource->GetStatus()); |
270 EXPECT_EQ(kJpegImageSubrangeWithDimensionsLength, | 272 EXPECT_EQ(kJpegImageSubrangeWithDimensionsLength, |
271 image_resource->EncodedSize()); | 273 image_resource->EncodedSize()); |
272 | 274 |
273 EXPECT_LT(0, observer->ImageChangedCount()); | 275 EXPECT_LT(0, observer->ImageChangedCount()); |
274 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnLastImageChanged()); | 276 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnLastImageChanged()); |
275 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 277 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
(...skipping 17 matching lines...) Expand all Loading... |
293 EXPECT_FALSE(image_resource->ShouldShowPlaceholder()); | 295 EXPECT_FALSE(image_resource->ShouldShowPlaceholder()); |
294 EXPECT_EQ(g_null_atom, | 296 EXPECT_EQ(g_null_atom, |
295 image_resource->GetResourceRequest().HttpHeaderField("range")); | 297 image_resource->GetResourceRequest().HttpHeaderField("range")); |
296 EXPECT_EQ(0, observer->ImageChangedCount()); | 298 EXPECT_EQ(0, observer->ImageChangedCount()); |
297 | 299 |
298 // Serves full response. | 300 // Serves full response. |
299 image_resource->Loader()->DidReceiveResponse(WrappedResourceResponse( | 301 image_resource->Loader()->DidReceiveResponse(WrappedResourceResponse( |
300 ResourceResponse(url, "image/jpeg", sizeof(kJpegImage), g_null_atom))); | 302 ResourceResponse(url, "image/jpeg", sizeof(kJpegImage), g_null_atom))); |
301 image_resource->Loader()->DidReceiveData( | 303 image_resource->Loader()->DidReceiveData( |
302 reinterpret_cast<const char*>(kJpegImage), sizeof(kJpegImage)); | 304 reinterpret_cast<const char*>(kJpegImage), sizeof(kJpegImage)); |
303 image_resource->Loader()->DidFinishLoading(0.0, sizeof(kJpegImage), | 305 image_resource->Loader()->DidFinishLoading( |
304 sizeof(kJpegImage)); | 306 0.0, sizeof(kJpegImage), sizeof(kJpegImage), sizeof(kJpegImage)); |
305 | 307 |
306 // Checks that |imageResource| is successfully loaded, | 308 // Checks that |imageResource| is successfully loaded, |
307 // showing a non-placeholder image. | 309 // showing a non-placeholder image. |
308 EXPECT_EQ(ResourceStatus::kCached, image_resource->GetStatus()); | 310 EXPECT_EQ(ResourceStatus::kCached, image_resource->GetStatus()); |
309 EXPECT_EQ(sizeof(kJpegImage), image_resource->EncodedSize()); | 311 EXPECT_EQ(sizeof(kJpegImage), image_resource->EncodedSize()); |
310 | 312 |
311 EXPECT_LT(0, observer->ImageChangedCount()); | 313 EXPECT_LT(0, observer->ImageChangedCount()); |
312 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnLastImageChanged()); | 314 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnLastImageChanged()); |
313 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 315 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
314 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnImageNotifyFinished()); | 316 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnImageNotifyFinished()); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 EXPECT_EQ(0, observer2->ImageChangedCount()); | 391 EXPECT_EQ(0, observer2->ImageChangedCount()); |
390 EXPECT_FALSE(observer2->ImageNotifyFinishedCalled()); | 392 EXPECT_FALSE(observer2->ImageNotifyFinishedCalled()); |
391 | 393 |
392 const char kThirdPart[] = "--boundary"; | 394 const char kThirdPart[] = "--boundary"; |
393 image_resource->AppendData(kThirdPart, strlen(kThirdPart)); | 395 image_resource->AppendData(kThirdPart, strlen(kThirdPart)); |
394 ASSERT_TRUE(image_resource->ResourceBuffer()); | 396 ASSERT_TRUE(image_resource->ResourceBuffer()); |
395 EXPECT_EQ(strlen(kSecondPart) - 1, image_resource->ResourceBuffer()->size()); | 397 EXPECT_EQ(strlen(kSecondPart) - 1, image_resource->ResourceBuffer()->size()); |
396 | 398 |
397 // This part finishes. The image is created, callbacks are sent, and the data | 399 // This part finishes. The image is created, callbacks are sent, and the data |
398 // buffer is cleared. | 400 // buffer is cleared. |
399 image_resource->Loader()->DidFinishLoading(0.0, 0, 0); | 401 image_resource->Loader()->DidFinishLoading(0.0, 0, 0, 0); |
400 EXPECT_TRUE(image_resource->ResourceBuffer()); | 402 EXPECT_TRUE(image_resource->ResourceBuffer()); |
401 EXPECT_FALSE(image_resource->ErrorOccurred()); | 403 EXPECT_FALSE(image_resource->ErrorOccurred()); |
402 ASSERT_TRUE(image_resource->GetContent()->HasImage()); | 404 ASSERT_TRUE(image_resource->GetContent()->HasImage()); |
403 EXPECT_FALSE(image_resource->GetContent()->GetImage()->IsNull()); | 405 EXPECT_FALSE(image_resource->GetContent()->GetImage()->IsNull()); |
404 EXPECT_EQ(kJpegImageWidth, image_resource->GetContent()->GetImage()->width()); | 406 EXPECT_EQ(kJpegImageWidth, image_resource->GetContent()->GetImage()->width()); |
405 EXPECT_EQ(kJpegImageHeight, | 407 EXPECT_EQ(kJpegImageHeight, |
406 image_resource->GetContent()->GetImage()->height()); | 408 image_resource->GetContent()->GetImage()->height()); |
407 EXPECT_EQ(1, observer->ImageChangedCount()); | 409 EXPECT_EQ(1, observer->ImageChangedCount()); |
408 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 410 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
409 EXPECT_EQ(1, observer2->ImageChangedCount()); | 411 EXPECT_EQ(1, observer2->ImageChangedCount()); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 // Send the image response. | 655 // Send the image response. |
654 ResourceResponse resource_response(KURL(), "image/jpeg", sizeof(kJpegImage), | 656 ResourceResponse resource_response(KURL(), "image/jpeg", sizeof(kJpegImage), |
655 g_null_atom); | 657 g_null_atom); |
656 resource_response.AddHTTPHeaderField("chrome-proxy-content-transform", | 658 resource_response.AddHTTPHeaderField("chrome-proxy-content-transform", |
657 "empty-image"); | 659 "empty-image"); |
658 | 660 |
659 image_resource->Loader()->DidReceiveResponse( | 661 image_resource->Loader()->DidReceiveResponse( |
660 WrappedResourceResponse(resource_response)); | 662 WrappedResourceResponse(resource_response)); |
661 image_resource->Loader()->DidReceiveData( | 663 image_resource->Loader()->DidReceiveData( |
662 reinterpret_cast<const char*>(kJpegImage), sizeof(kJpegImage)); | 664 reinterpret_cast<const char*>(kJpegImage), sizeof(kJpegImage)); |
663 image_resource->Loader()->DidFinishLoading(0.0, sizeof(kJpegImage), | 665 image_resource->Loader()->DidFinishLoading( |
664 sizeof(kJpegImage)); | 666 0.0, sizeof(kJpegImage), sizeof(kJpegImage), sizeof(kJpegImage)); |
665 | 667 |
666 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 668 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
667 EXPECT_EQ(image_resource, fetcher->CachedResource(test_url)); | 669 EXPECT_EQ(image_resource, fetcher->CachedResource(test_url)); |
668 | 670 |
669 fetcher->ReloadLoFiImages(); | 671 fetcher->ReloadLoFiImages(); |
670 | 672 |
671 EXPECT_EQ(3, observer->ImageChangedCount()); | 673 EXPECT_EQ(3, observer->ImageChangedCount()); |
672 | 674 |
673 TestThatReloadIsStartedThenServeReload(test_url, image_resource, content, | 675 TestThatReloadIsStartedThenServeReload(test_url, image_resource, content, |
674 observer.get(), | 676 observer.get(), |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 | 1054 |
1053 image_resource->Loader()->DidReceiveResponse( | 1055 image_resource->Loader()->DidReceiveResponse( |
1054 WrappedResourceResponse( | 1056 WrappedResourceResponse( |
1055 ResourceResponse(test_url, "image/jpeg", 0, g_null_atom)), | 1057 ResourceResponse(test_url, "image/jpeg", 0, g_null_atom)), |
1056 nullptr); | 1058 nullptr); |
1057 | 1059 |
1058 EXPECT_EQ(ResourceStatus::kPending, image_resource->GetStatus()); | 1060 EXPECT_EQ(ResourceStatus::kPending, image_resource->GetStatus()); |
1059 EXPECT_FALSE(observer->ImageNotifyFinishedCalled()); | 1061 EXPECT_FALSE(observer->ImageNotifyFinishedCalled()); |
1060 EXPECT_EQ(0, observer->ImageChangedCount()); | 1062 EXPECT_EQ(0, observer->ImageChangedCount()); |
1061 | 1063 |
1062 image_resource->Loader()->DidFinishLoading(0.0, 0, 0); | 1064 image_resource->Loader()->DidFinishLoading(0.0, 0, 0, 0); |
1063 | 1065 |
1064 EXPECT_EQ(ResourceStatus::kDecodeError, image_resource->GetStatus()); | 1066 EXPECT_EQ(ResourceStatus::kDecodeError, image_resource->GetStatus()); |
1065 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 1067 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
1066 EXPECT_EQ(ResourceStatus::kDecodeError, | 1068 EXPECT_EQ(ResourceStatus::kDecodeError, |
1067 observer->StatusOnImageNotifyFinished()); | 1069 observer->StatusOnImageNotifyFinished()); |
1068 EXPECT_EQ(1, observer->ImageChangedCount()); | 1070 EXPECT_EQ(1, observer->ImageChangedCount()); |
1069 EXPECT_FALSE(image_resource->IsLoading()); | 1071 EXPECT_FALSE(image_resource->IsLoading()); |
1070 } | 1072 } |
1071 | 1073 |
1072 // Testing DecodeError that occurs in didFinishLoading(). | 1074 // Testing DecodeError that occurs in didFinishLoading(). |
(...skipping 24 matching lines...) Expand all Loading... |
1097 image_resource->Loader()->DidReceiveData( | 1099 image_resource->Loader()->DidReceiveData( |
1098 reinterpret_cast<const char*>(kJpegImage), | 1100 reinterpret_cast<const char*>(kJpegImage), |
1099 kJpegImageSubrangeWithoutDimensionsLength); | 1101 kJpegImageSubrangeWithoutDimensionsLength); |
1100 | 1102 |
1101 EXPECT_EQ(ResourceStatus::kPending, image_resource->GetStatus()); | 1103 EXPECT_EQ(ResourceStatus::kPending, image_resource->GetStatus()); |
1102 EXPECT_FALSE(observer->ImageNotifyFinishedCalled()); | 1104 EXPECT_FALSE(observer->ImageNotifyFinishedCalled()); |
1103 EXPECT_EQ(0, observer->ImageChangedCount()); | 1105 EXPECT_EQ(0, observer->ImageChangedCount()); |
1104 | 1106 |
1105 image_resource->Loader()->DidFinishLoading( | 1107 image_resource->Loader()->DidFinishLoading( |
1106 0.0, kJpegImageSubrangeWithoutDimensionsLength, | 1108 0.0, kJpegImageSubrangeWithoutDimensionsLength, |
| 1109 kJpegImageSubrangeWithoutDimensionsLength, |
1107 kJpegImageSubrangeWithoutDimensionsLength); | 1110 kJpegImageSubrangeWithoutDimensionsLength); |
1108 | 1111 |
1109 EXPECT_EQ(ResourceStatus::kDecodeError, image_resource->GetStatus()); | 1112 EXPECT_EQ(ResourceStatus::kDecodeError, image_resource->GetStatus()); |
1110 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 1113 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
1111 EXPECT_EQ(ResourceStatus::kDecodeError, | 1114 EXPECT_EQ(ResourceStatus::kDecodeError, |
1112 observer->StatusOnImageNotifyFinished()); | 1115 observer->StatusOnImageNotifyFinished()); |
1113 EXPECT_EQ(1, observer->ImageChangedCount()); | 1116 EXPECT_EQ(1, observer->ImageChangedCount()); |
1114 EXPECT_FALSE(image_resource->IsLoading()); | 1117 EXPECT_FALSE(image_resource->IsLoading()); |
1115 } | 1118 } |
1116 | 1119 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1263 image_resource->Loader()->DidReceiveResponse( | 1266 image_resource->Loader()->DidReceiveResponse( |
1264 WrappedResourceResponse(partial_response)); | 1267 WrappedResourceResponse(partial_response)); |
1265 image_resource->Loader()->DidReceiveData( | 1268 image_resource->Loader()->DidReceiveData( |
1266 reinterpret_cast<const char*>(kJpegImage), | 1269 reinterpret_cast<const char*>(kJpegImage), |
1267 kJpegImageSubrangeWithoutDimensionsLength); | 1270 kJpegImageSubrangeWithoutDimensionsLength); |
1268 | 1271 |
1269 EXPECT_EQ(0, observer->ImageChangedCount()); | 1272 EXPECT_EQ(0, observer->ImageChangedCount()); |
1270 | 1273 |
1271 image_resource->Loader()->DidFinishLoading( | 1274 image_resource->Loader()->DidFinishLoading( |
1272 0.0, kJpegImageSubrangeWithoutDimensionsLength, | 1275 0.0, kJpegImageSubrangeWithoutDimensionsLength, |
| 1276 kJpegImageSubrangeWithoutDimensionsLength, |
1273 kJpegImageSubrangeWithoutDimensionsLength); | 1277 kJpegImageSubrangeWithoutDimensionsLength); |
1274 | 1278 |
1275 EXPECT_FALSE(observer->ImageNotifyFinishedCalled()); | 1279 EXPECT_FALSE(observer->ImageNotifyFinishedCalled()); |
1276 EXPECT_EQ(2, observer->ImageChangedCount()); | 1280 EXPECT_EQ(2, observer->ImageChangedCount()); |
1277 | 1281 |
1278 TestThatReloadIsStartedThenServeReload( | 1282 TestThatReloadIsStartedThenServeReload( |
1279 test_url, image_resource, image_resource->GetContent(), observer.get(), | 1283 test_url, image_resource, image_resource->GetContent(), observer.get(), |
1280 WebCachePolicy::kBypassingCache); | 1284 WebCachePolicy::kBypassingCache); |
1281 } | 1285 } |
1282 | 1286 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 | 1405 |
1402 ResourceResponse response(test_url, "image/jpeg", sizeof(kJpegImage), | 1406 ResourceResponse response(test_url, "image/jpeg", sizeof(kJpegImage), |
1403 g_null_atom); | 1407 g_null_atom); |
1404 response.SetHTTPStatusCode(test.status_code); | 1408 response.SetHTTPStatusCode(test.status_code); |
1405 if (test.content_range != g_null_atom) | 1409 if (test.content_range != g_null_atom) |
1406 response.SetHTTPHeaderField("content-range", test.content_range); | 1410 response.SetHTTPHeaderField("content-range", test.content_range); |
1407 image_resource->Loader()->DidReceiveResponse( | 1411 image_resource->Loader()->DidReceiveResponse( |
1408 WrappedResourceResponse(response)); | 1412 WrappedResourceResponse(response)); |
1409 image_resource->Loader()->DidReceiveData( | 1413 image_resource->Loader()->DidReceiveData( |
1410 reinterpret_cast<const char*>(kJpegImage), sizeof(kJpegImage)); | 1414 reinterpret_cast<const char*>(kJpegImage), sizeof(kJpegImage)); |
1411 image_resource->Loader()->DidFinishLoading(0.0, sizeof(kJpegImage), | 1415 image_resource->Loader()->DidFinishLoading( |
1412 sizeof(kJpegImage)); | 1416 0.0, sizeof(kJpegImage), sizeof(kJpegImage), sizeof(kJpegImage)); |
1413 | 1417 |
1414 EXPECT_EQ(ResourceStatus::kCached, image_resource->GetStatus()); | 1418 EXPECT_EQ(ResourceStatus::kCached, image_resource->GetStatus()); |
1415 EXPECT_EQ(sizeof(kJpegImage), image_resource->EncodedSize()); | 1419 EXPECT_EQ(sizeof(kJpegImage), image_resource->EncodedSize()); |
1416 EXPECT_FALSE(image_resource->ShouldShowPlaceholder()); | 1420 EXPECT_FALSE(image_resource->ShouldShowPlaceholder()); |
1417 EXPECT_LT(0, observer->ImageChangedCount()); | 1421 EXPECT_LT(0, observer->ImageChangedCount()); |
1418 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnLastImageChanged()); | 1422 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnLastImageChanged()); |
1419 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 1423 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
1420 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnImageNotifyFinished()); | 1424 EXPECT_EQ(kJpegImageWidth, observer->ImageWidthOnImageNotifyFinished()); |
1421 | 1425 |
1422 ASSERT_TRUE(image_resource->GetContent()->HasImage()); | 1426 ASSERT_TRUE(image_resource->GetContent()->HasImage()); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); | 1596 EXPECT_TRUE(observer->ImageNotifyFinishedCalled()); |
1593 EXPECT_TRUE(image_resource->GetContent()->GetImage()->IsBitmapImage()); | 1597 EXPECT_TRUE(image_resource->GetContent()->GetImage()->IsBitmapImage()); |
1594 EXPECT_EQ(50, image_resource->GetContent()->GetImage()->width()); | 1598 EXPECT_EQ(50, image_resource->GetContent()->GetImage()->width()); |
1595 EXPECT_EQ(50, image_resource->GetContent()->GetImage()->height()); | 1599 EXPECT_EQ(50, image_resource->GetContent()->GetImage()->height()); |
1596 | 1600 |
1597 WTF::SetTimeFunctionsForTesting(nullptr); | 1601 WTF::SetTimeFunctionsForTesting(nullptr); |
1598 } | 1602 } |
1599 | 1603 |
1600 } // namespace | 1604 } // namespace |
1601 } // namespace blink | 1605 } // namespace blink |
OLD | NEW |