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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: comments Created 4 years 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) 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 9820 matching lines...) Expand 10 before | Expand all | Expand 10 after
9831 registerMockedHttpURLLoadWithMimeType("white-1x1.png", "image/png"); 9831 registerMockedHttpURLLoadWithMimeType("white-1x1.png", "image/png");
9832 FrameTestHelpers::WebViewHelper webViewHelper; 9832 FrameTestHelpers::WebViewHelper webViewHelper;
9833 webViewHelper.initializeAndLoad(m_baseURL + "white-1x1.png"); 9833 webViewHelper.initializeAndLoad(m_baseURL + "white-1x1.png");
9834 WebViewImpl* webView = webViewHelper.webView(); 9834 WebViewImpl* webView = webViewHelper.webView();
9835 Document* document = webView->mainFrameImpl()->frame()->document(); 9835 Document* document = webView->mainFrameImpl()->frame()->document();
9836 9836
9837 EXPECT_TRUE(document); 9837 EXPECT_TRUE(document);
9838 EXPECT_TRUE(document->isImageDocument()); 9838 EXPECT_TRUE(document->isImageDocument());
9839 9839
9840 ImageDocument* imgDocument = toImageDocument(document); 9840 ImageDocument* imgDocument = toImageDocument(document);
9841 ImageResource* resource = imgDocument->cachedImage(); 9841 ImageResource* resource = imgDocument->cachedImageResourceDeprecated();
9842 9842
9843 EXPECT_TRUE(resource); 9843 EXPECT_TRUE(resource);
9844 EXPECT_NE(0, resource->loadFinishTime()); 9844 EXPECT_NE(0, resource->loadFinishTime());
9845 9845
9846 DocumentLoader* loader = document->loader(); 9846 DocumentLoader* loader = document->loader();
9847 9847
9848 EXPECT_TRUE(loader); 9848 EXPECT_TRUE(loader);
9849 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime()); 9849 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime());
9850 } 9850 }
9851 9851
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
10868 10868
10869 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 10869 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
10870 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 10870 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
10871 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 10871 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
10872 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 10872 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
10873 10873
10874 webViewHelper.reset(); 10874 webViewHelper.reset();
10875 } 10875 }
10876 10876
10877 } // namespace blink 10877 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698