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

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

Issue 18083034: Don't set scroll client for main frame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address jamesr review Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/page/scrolling/ScrollingCoordinator.h » ('j') | 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 virtual void setScrollOffset(const IntPoint& scrollOffset) OVERRIDE { m_scro llPosition = scrollOffset; } 133 virtual void setScrollOffset(const IntPoint& scrollOffset) OVERRIDE { m_scro llPosition = scrollOffset; }
134 virtual IntPoint scrollPosition() const OVERRIDE { return m_scrollPosition; } 134 virtual IntPoint scrollPosition() const OVERRIDE { return m_scrollPosition; }
135 135
136 private: 136 private:
137 IntPoint m_scrollPosition; 137 IntPoint m_scrollPosition;
138 }; 138 };
139 139
140 TEST_F(GraphicsLayerTest, applyScrollToScrollableArea) 140 TEST_F(GraphicsLayerTest, applyScrollToScrollableArea)
141 { 141 {
142 FakeScrollableArea scrollableArea; 142 FakeScrollableArea scrollableArea;
143 m_graphicsLayer->setScrollableArea(&scrollableArea); 143 m_graphicsLayer->setScrollableArea(&scrollableArea, false);
144 144
145 WebPoint scrollPosition(7, 9); 145 WebPoint scrollPosition(7, 9);
146 m_platformLayer->setScrollPosition(scrollPosition); 146 m_platformLayer->setScrollPosition(scrollPosition);
147 m_graphicsLayer->didScroll(); 147 m_graphicsLayer->didScroll();
148 148
149 EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition())); 149 EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition()));
150 } 150 }
151 151
152 TEST_F(GraphicsLayerTest, DISABLED_setContentsToSolidColor) 152 TEST_F(GraphicsLayerTest, DISABLED_setContentsToSolidColor)
153 { 153 {
154 m_graphicsLayer->setContentsToSolidColor(Color::transparent); 154 m_graphicsLayer->setContentsToSolidColor(Color::transparent);
155 EXPECT_FALSE(m_graphicsLayer->contentsLayer()); 155 EXPECT_FALSE(m_graphicsLayer->contentsLayer());
156 156
157 m_graphicsLayer->setContentsToSolidColor(Color::white); 157 m_graphicsLayer->setContentsToSolidColor(Color::white);
158 EXPECT_TRUE(m_graphicsLayer->contentsLayer()); 158 EXPECT_TRUE(m_graphicsLayer->contentsLayer());
159 159
160 m_graphicsLayer->setContentsToSolidColor(Color()); 160 m_graphicsLayer->setContentsToSolidColor(Color());
161 EXPECT_FALSE(m_graphicsLayer->contentsLayer()); 161 EXPECT_FALSE(m_graphicsLayer->contentsLayer());
162 } 162 }
163 163
164 } // namespace 164 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/scrolling/ScrollingCoordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698