| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |