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

Unified Diff: ui/gfx/image/image_unittest.cc

Issue 8769017: GTK: Move CairoCachedSurface from being owned by GtkThemeService to gfx::Image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase for commit Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/image/image.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_unittest.cc
diff --git a/ui/gfx/image/image_unittest.cc b/ui/gfx/image/image_unittest.cc
index 2df0715b4ab7c89a4e1e7b334ec6ca35001c4232..2c8270056f6f94452170fbe22900c2ccee6cc160 100644
--- a/ui/gfx/image/image_unittest.cc
+++ b/ui/gfx/image/image_unittest.cc
@@ -141,6 +141,13 @@ TEST_F(ImageTest, SkiaToGdkCopy) {
EXPECT_TRUE(pixbuf);
g_object_unref(pixbuf);
}
+
+TEST_F(ImageTest, SkiaToCairoCreatesGdk) {
+ gfx::Image image(gt::CreateBitmap(25, 25));
+ EXPECT_FALSE(image.HasRepresentation(gfx::Image::kImageRepGdk));
+ EXPECT_TRUE(image.ToCairo());
+ EXPECT_TRUE(image.HasRepresentation(gfx::Image::kImageRepGdk));
+}
#endif
#if defined(OS_MACOSX)
« no previous file with comments | « ui/gfx/image/image.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698