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

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: fix 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 9957 matching lines...) Expand 10 before | Expand all | Expand 10 after
9968 registerMockedHttpURLLoadWithMimeType("white-1x1.png", "image/png"); 9968 registerMockedHttpURLLoadWithMimeType("white-1x1.png", "image/png");
9969 FrameTestHelpers::WebViewHelper webViewHelper; 9969 FrameTestHelpers::WebViewHelper webViewHelper;
9970 webViewHelper.initializeAndLoad(m_baseURL + "white-1x1.png"); 9970 webViewHelper.initializeAndLoad(m_baseURL + "white-1x1.png");
9971 WebViewImpl* webView = webViewHelper.webView(); 9971 WebViewImpl* webView = webViewHelper.webView();
9972 Document* document = webView->mainFrameImpl()->frame()->document(); 9972 Document* document = webView->mainFrameImpl()->frame()->document();
9973 9973
9974 EXPECT_TRUE(document); 9974 EXPECT_TRUE(document);
9975 EXPECT_TRUE(document->isImageDocument()); 9975 EXPECT_TRUE(document->isImageDocument());
9976 9976
9977 ImageDocument* imgDocument = toImageDocument(document); 9977 ImageDocument* imgDocument = toImageDocument(document);
9978 ImageResource* resource = imgDocument->cachedImage(); 9978 ImageResource* resource = imgDocument->cachedImageResourceDeprecated();
9979 9979
9980 EXPECT_TRUE(resource); 9980 EXPECT_TRUE(resource);
9981 EXPECT_NE(0, resource->loadFinishTime()); 9981 EXPECT_NE(0, resource->loadFinishTime());
9982 9982
9983 DocumentLoader* loader = document->loader(); 9983 DocumentLoader* loader = document->loader();
9984 9984
9985 EXPECT_TRUE(loader); 9985 EXPECT_TRUE(loader);
9986 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime()); 9986 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime());
9987 } 9987 }
9988 9988
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
11005 11005
11006 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11006 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11007 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11007 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11008 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11008 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11009 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11009 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11010 11010
11011 webViewHelper.reset(); 11011 webViewHelper.reset();
11012 } 11012 }
11013 11013
11014 } // namespace blink 11014 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698