OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 9960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9971 registerMockedHttpURLLoadWithMimeType("white-1x1.png", "image/png"); | 9971 registerMockedHttpURLLoadWithMimeType("white-1x1.png", "image/png"); |
9972 FrameTestHelpers::WebViewHelper webViewHelper; | 9972 FrameTestHelpers::WebViewHelper webViewHelper; |
9973 webViewHelper.initializeAndLoad(m_baseURL + "white-1x1.png"); | 9973 webViewHelper.initializeAndLoad(m_baseURL + "white-1x1.png"); |
9974 WebViewImpl* webView = webViewHelper.webView(); | 9974 WebViewImpl* webView = webViewHelper.webView(); |
9975 Document* document = webView->mainFrameImpl()->frame()->document(); | 9975 Document* document = webView->mainFrameImpl()->frame()->document(); |
9976 | 9976 |
9977 EXPECT_TRUE(document); | 9977 EXPECT_TRUE(document); |
9978 EXPECT_TRUE(document->isImageDocument()); | 9978 EXPECT_TRUE(document->isImageDocument()); |
9979 | 9979 |
9980 ImageDocument* imgDocument = toImageDocument(document); | 9980 ImageDocument* imgDocument = toImageDocument(document); |
9981 ImageResource* resource = imgDocument->cachedImage(); | 9981 ImageResource* resource = imgDocument->cachedImageResourceDeprecated(); |
9982 | 9982 |
9983 EXPECT_TRUE(resource); | 9983 EXPECT_TRUE(resource); |
9984 EXPECT_NE(0, resource->loadFinishTime()); | 9984 EXPECT_NE(0, resource->loadFinishTime()); |
9985 | 9985 |
9986 DocumentLoader* loader = document->loader(); | 9986 DocumentLoader* loader = document->loader(); |
9987 | 9987 |
9988 EXPECT_TRUE(loader); | 9988 EXPECT_TRUE(loader); |
9989 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime()); | 9989 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime()); |
9990 } | 9990 } |
9991 | 9991 |
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11008 | 11008 |
11009 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); | 11009 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); |
11010 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); | 11010 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); |
11011 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); | 11011 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); |
11012 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); | 11012 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); |
11013 | 11013 |
11014 webViewHelper.reset(); | 11014 webViewHelper.reset(); |
11015 } | 11015 } |
11016 | 11016 |
11017 } // namespace blink | 11017 } // namespace blink |
OLD | NEW |