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

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: Rebase. 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 9895 matching lines...) Expand 10 before | Expand all | Expand 10 after
9906 registerMockedHttpURLLoadWithMimeType("white-1x1.png", "image/png"); 9906 registerMockedHttpURLLoadWithMimeType("white-1x1.png", "image/png");
9907 FrameTestHelpers::WebViewHelper webViewHelper; 9907 FrameTestHelpers::WebViewHelper webViewHelper;
9908 webViewHelper.initializeAndLoad(m_baseURL + "white-1x1.png"); 9908 webViewHelper.initializeAndLoad(m_baseURL + "white-1x1.png");
9909 WebViewImpl* webView = webViewHelper.webView(); 9909 WebViewImpl* webView = webViewHelper.webView();
9910 Document* document = webView->mainFrameImpl()->frame()->document(); 9910 Document* document = webView->mainFrameImpl()->frame()->document();
9911 9911
9912 EXPECT_TRUE(document); 9912 EXPECT_TRUE(document);
9913 EXPECT_TRUE(document->isImageDocument()); 9913 EXPECT_TRUE(document->isImageDocument());
9914 9914
9915 ImageDocument* imgDocument = toImageDocument(document); 9915 ImageDocument* imgDocument = toImageDocument(document);
9916 ImageResource* resource = imgDocument->cachedImage(); 9916 ImageResource* resource = imgDocument->cachedImageResourceDeprecated();
9917 9917
9918 EXPECT_TRUE(resource); 9918 EXPECT_TRUE(resource);
9919 EXPECT_NE(0, resource->loadFinishTime()); 9919 EXPECT_NE(0, resource->loadFinishTime());
9920 9920
9921 DocumentLoader* loader = document->loader(); 9921 DocumentLoader* loader = document->loader();
9922 9922
9923 EXPECT_TRUE(loader); 9923 EXPECT_TRUE(loader);
9924 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime()); 9924 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime());
9925 } 9925 }
9926 9926
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
10943 10943
10944 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 10944 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
10945 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 10945 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
10946 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 10946 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
10947 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 10947 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
10948 10948
10949 webViewHelper.reset(); 10949 webViewHelper.reset();
10950 } 10950 }
10951 10951
10952 } // namespace blink 10952 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698