| Index: cc/layer_unittest.cc
|
| diff --git a/cc/layer_unittest.cc b/cc/layer_unittest.cc
|
| index 60a05392008f49ec2aac456416fdd92e71200610..828d37ea6a8ac58e5906034142173e3a4b626a0a 100644
|
| --- a/cc/layer_unittest.cc
|
| +++ b/cc/layer_unittest.cc
|
| @@ -552,56 +552,6 @@ TEST_F(LayerTest, verifyPushPropertiesAccumulatesUpdateRect)
|
| EXPECT_FLOAT_RECT_EQ(FloatRect(FloatPoint(10, 10), FloatSize(5, 5)), implLayer->updateRect());
|
| }
|
|
|
| -class LayerWithContentScaling : public Layer {
|
| -public:
|
| - explicit LayerWithContentScaling()
|
| - : Layer()
|
| - {
|
| - }
|
| -
|
| - virtual bool needsContentsScale() const OVERRIDE
|
| - {
|
| - return true;
|
| - }
|
| -
|
| - virtual void setNeedsDisplayRect(const FloatRect& dirtyRect) OVERRIDE
|
| - {
|
| - m_lastNeedsDisplayRect = dirtyRect;
|
| - Layer::setNeedsDisplayRect(dirtyRect);
|
| - }
|
| -
|
| - void resetNeedsDisplay()
|
| - {
|
| - m_needsDisplay = false;
|
| - }
|
| -
|
| - const FloatRect& lastNeedsDisplayRect() const { return m_lastNeedsDisplayRect; }
|
| -
|
| -private:
|
| - virtual ~LayerWithContentScaling()
|
| - {
|
| - }
|
| -
|
| - FloatRect m_lastNeedsDisplayRect;
|
| -};
|
| -
|
| -TEST_F(LayerTest, checkContentsScaleChangeTriggersNeedsDisplay)
|
| -{
|
| - scoped_refptr<LayerWithContentScaling> testLayer = make_scoped_refptr(new LayerWithContentScaling());
|
| - testLayer->setIsDrawable(true);
|
| - testLayer->setLayerTreeHost(m_layerTreeHost.get());
|
| -
|
| - IntSize testBounds = IntSize(320, 240);
|
| - EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBounds(testBounds));
|
| -
|
| - testLayer->resetNeedsDisplay();
|
| - EXPECT_FALSE(testLayer->needsDisplay());
|
| -
|
| - EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setContentsScale(testLayer->contentsScale() + 1.f));
|
| - EXPECT_TRUE(testLayer->needsDisplay());
|
| - EXPECT_FLOAT_RECT_EQ(FloatRect(0, 0, 320, 240), testLayer->lastNeedsDisplayRect());
|
| -}
|
| -
|
| class FakeLayerImplTreeHost : public LayerTreeHost {
|
| public:
|
| static scoped_ptr<FakeLayerImplTreeHost> create()
|
|
|