| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "cc/layer.h" | 7 #include "cc/layer.h" |
| 8 | 8 |
| 9 #include "cc/keyframed_animation_curve.h" | 9 #include "cc/keyframed_animation_curve.h" |
| 10 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 MOCK_METHOD0(setNeedsCommit, void()); | 46 MOCK_METHOD0(setNeedsCommit, void()); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 FakeLayerImplTreeHostClient m_fakeClient; | 49 FakeLayerImplTreeHostClient m_fakeClient; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 class MockLayerPainter : public LayerPainter { | 52 class MockLayerPainter : public LayerPainter { |
| 53 public: | 53 public: |
| 54 virtual void paint(SkCanvas*, const IntRect&, FloatRect&) OVERRIDE { } | 54 virtual void paint(SkCanvas*, const gfx::Rect&, gfx::RectF&) OVERRIDE { } |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 | 57 |
| 58 class LayerTest : public testing::Test { | 58 class LayerTest : public testing::Test { |
| 59 public: | 59 public: |
| 60 LayerTest() | 60 LayerTest() |
| 61 { | 61 { |
| 62 } | 62 } |
| 63 | 63 |
| 64 protected: | 64 protected: |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 scoped_refptr<MockLayer> layer(new MockLayer); | 843 scoped_refptr<MockLayer> layer(new MockLayer); |
| 844 EXPECT_FALSE(layer->needsDisplay()); | 844 EXPECT_FALSE(layer->needsDisplay()); |
| 845 layer->setBounds(IntSize(0, 10)); | 845 layer->setBounds(IntSize(0, 10)); |
| 846 EXPECT_FALSE(layer->needsDisplay()); | 846 EXPECT_FALSE(layer->needsDisplay()); |
| 847 layer->setBounds(IntSize(10, 10)); | 847 layer->setBounds(IntSize(10, 10)); |
| 848 EXPECT_TRUE(layer->needsDisplay()); | 848 EXPECT_TRUE(layer->needsDisplay()); |
| 849 } | 849 } |
| 850 | 850 |
| 851 | 851 |
| 852 } // namespace | 852 } // namespace |
| OLD | NEW |