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

Side by Side Diff: Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp

Issue 13430007: Merge 147178 "[Chromium] Don't create SolidColorLayer for full t..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 years, 8 months 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
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 { 140 {
141 FakeScrollableArea scrollableArea; 141 FakeScrollableArea scrollableArea;
142 m_graphicsLayer->setScrollableArea(&scrollableArea); 142 m_graphicsLayer->setScrollableArea(&scrollableArea);
143 143
144 WebPoint scrollPosition(7, 9); 144 WebPoint scrollPosition(7, 9);
145 m_platformLayer->setScrollPosition(scrollPosition); 145 m_platformLayer->setScrollPosition(scrollPosition);
146 146
147 EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition())); 147 EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition()));
148 } 148 }
149 149
150 TEST_F(GraphicsLayerChromiumTest, setContentsToSolidColor)
151 {
152 m_graphicsLayer->setContentsToSolidColor(Color::transparent);
153 EXPECT_FALSE(m_graphicsLayer->contentsLayer());
154
155 m_graphicsLayer->setContentsToSolidColor(Color::white);
156 EXPECT_TRUE(m_graphicsLayer->contentsLayer());
157
158 m_graphicsLayer->setContentsToSolidColor(Color());
159 EXPECT_FALSE(m_graphicsLayer->contentsLayer());
160 }
161
150 } // namespace 162 } // namespace
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698