| Index: cc/scrollbar_layer_unittest.cc
|
| diff --git a/cc/scrollbar_layer_unittest.cc b/cc/scrollbar_layer_unittest.cc
|
| index 73a7fac6fb457b14406b5e770a53e028e771c4ab..a03fb1fdac4a99bba938e7045f616476ed46aaf0 100644
|
| --- a/cc/scrollbar_layer_unittest.cc
|
| +++ b/cc/scrollbar_layer_unittest.cc
|
| @@ -43,7 +43,7 @@ public:
|
| virtual Orientation orientation() const OVERRIDE { return WebScrollbar::Horizontal; }
|
| };
|
|
|
| -TEST(ScrollbarLayerChromiumTest, resolveScrollLayerPointer)
|
| +TEST(ScrollbarLayerTest, resolveScrollLayerPointer)
|
| {
|
| DebugScopedSetImplThread impl;
|
|
|
| @@ -51,16 +51,16 @@ TEST(ScrollbarLayerChromiumTest, resolveScrollLayerPointer)
|
|
|
| {
|
| scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::create());
|
| - scoped_refptr<LayerChromium> layerTreeRoot = LayerChromium::create();
|
| - scoped_refptr<LayerChromium> child1 = LayerChromium::create();
|
| - scoped_refptr<LayerChromium> child2 = ScrollbarLayerChromium::create(scrollbar.Pass(), painter, WebKit::FakeWebScrollbarThemeGeometry::create(), child1->id());
|
| + scoped_refptr<Layer> layerTreeRoot = Layer::create();
|
| + scoped_refptr<Layer> child1 = Layer::create();
|
| + scoped_refptr<Layer> child2 = ScrollbarLayer::create(scrollbar.Pass(), painter, WebKit::FakeWebScrollbarThemeGeometry::create(), child1->id());
|
| layerTreeRoot->addChild(child1);
|
| layerTreeRoot->addChild(child2);
|
|
|
| - scoped_ptr<CCLayerImpl> ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), scoped_ptr<CCLayerImpl>(), 0);
|
| + scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), 0);
|
|
|
| - CCLayerImpl* ccChild1 = ccLayerTreeRoot->children()[0];
|
| - CCScrollbarLayerImpl* ccChild2 = static_cast<CCScrollbarLayerImpl*>(ccLayerTreeRoot->children()[1]);
|
| + LayerImpl* ccChild1 = layerImplTreeRoot->children()[0];
|
| + ScrollbarLayerImpl* ccChild2 = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[1]);
|
|
|
| EXPECT_TRUE(ccChild1->scrollbarAnimationController());
|
| EXPECT_EQ(ccChild1->horizontalScrollbarLayer(), ccChild2);
|
| @@ -68,32 +68,32 @@ TEST(ScrollbarLayerChromiumTest, resolveScrollLayerPointer)
|
|
|
| { // another traverse order
|
| scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::create());
|
| - scoped_refptr<LayerChromium> layerTreeRoot = LayerChromium::create();
|
| - scoped_refptr<LayerChromium> child2 = LayerChromium::create();
|
| - scoped_refptr<LayerChromium> child1 = ScrollbarLayerChromium::create(scrollbar.Pass(), painter, WebKit::FakeWebScrollbarThemeGeometry::create(), child2->id());
|
| + scoped_refptr<Layer> layerTreeRoot = Layer::create();
|
| + scoped_refptr<Layer> child2 = Layer::create();
|
| + scoped_refptr<Layer> child1 = ScrollbarLayer::create(scrollbar.Pass(), painter, WebKit::FakeWebScrollbarThemeGeometry::create(), child2->id());
|
| layerTreeRoot->addChild(child1);
|
| layerTreeRoot->addChild(child2);
|
|
|
| - scoped_ptr<CCLayerImpl> ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), scoped_ptr<CCLayerImpl>(), 0);
|
| + scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), 0);
|
|
|
| - CCScrollbarLayerImpl* ccChild1 = static_cast<CCScrollbarLayerImpl*>(ccLayerTreeRoot->children()[0]);
|
| - CCLayerImpl* ccChild2 = ccLayerTreeRoot->children()[1];
|
| + ScrollbarLayerImpl* ccChild1 = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[0]);
|
| + LayerImpl* ccChild2 = layerImplTreeRoot->children()[1];
|
|
|
| EXPECT_TRUE(ccChild2->scrollbarAnimationController());
|
| EXPECT_EQ(ccChild2->horizontalScrollbarLayer(), ccChild1);
|
| }
|
| }
|
|
|
| -TEST(ScrollbarLayerChromiumTest, scrollOffsetSynchronization)
|
| +TEST(ScrollbarLayerTest, scrollOffsetSynchronization)
|
| {
|
| DebugScopedSetImplThread impl;
|
|
|
| WebKit::WebScrollbarThemePainter painter;
|
|
|
| scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::create());
|
| - scoped_refptr<LayerChromium> layerTreeRoot = LayerChromium::create();
|
| - scoped_refptr<LayerChromium> contentLayer = LayerChromium::create();
|
| - scoped_refptr<LayerChromium> scrollbarLayer = ScrollbarLayerChromium::create(scrollbar.Pass(), painter, WebKit::FakeWebScrollbarThemeGeometry::create(), layerTreeRoot->id());
|
| + scoped_refptr<Layer> layerTreeRoot = Layer::create();
|
| + scoped_refptr<Layer> contentLayer = Layer::create();
|
| + scoped_refptr<Layer> scrollbarLayer = ScrollbarLayer::create(scrollbar.Pass(), painter, WebKit::FakeWebScrollbarThemeGeometry::create(), layerTreeRoot->id());
|
| layerTreeRoot->addChild(contentLayer);
|
| layerTreeRoot->addChild(scrollbarLayer);
|
|
|
| @@ -101,9 +101,9 @@ TEST(ScrollbarLayerChromiumTest, scrollOffsetSynchronization)
|
| layerTreeRoot->setMaxScrollPosition(IntSize(30, 50));
|
| contentLayer->setBounds(IntSize(100, 200));
|
|
|
| - scoped_ptr<CCLayerImpl> ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), scoped_ptr<CCLayerImpl>(), 0);
|
| + scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), 0);
|
|
|
| - CCScrollbarLayerImpl* ccScrollbarLayer = static_cast<CCScrollbarLayerImpl*>(ccLayerTreeRoot->children()[1]);
|
| + ScrollbarLayerImpl* ccScrollbarLayer = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[1]);
|
|
|
| EXPECT_EQ(10, ccScrollbarLayer->currentPos());
|
| EXPECT_EQ(100, ccScrollbarLayer->totalSize());
|
| @@ -113,15 +113,15 @@ TEST(ScrollbarLayerChromiumTest, scrollOffsetSynchronization)
|
| layerTreeRoot->setMaxScrollPosition(IntSize(300, 500));
|
| contentLayer->setBounds(IntSize(1000, 2000));
|
|
|
| - CCScrollbarAnimationController* scrollbarController = ccLayerTreeRoot->scrollbarAnimationController();
|
| - ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), ccLayerTreeRoot.Pass(), 0);
|
| - EXPECT_EQ(scrollbarController, ccLayerTreeRoot->scrollbarAnimationController());
|
| + ScrollbarAnimationController* scrollbarController = layerImplTreeRoot->scrollbarAnimationController();
|
| + layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), layerImplTreeRoot.Pass(), 0);
|
| + EXPECT_EQ(scrollbarController, layerImplTreeRoot->scrollbarAnimationController());
|
|
|
| EXPECT_EQ(100, ccScrollbarLayer->currentPos());
|
| EXPECT_EQ(1000, ccScrollbarLayer->totalSize());
|
| EXPECT_EQ(300, ccScrollbarLayer->maximum());
|
|
|
| - ccLayerTreeRoot->scrollBy(FloatSize(12, 34));
|
| + layerImplTreeRoot->scrollBy(FloatSize(12, 34));
|
|
|
| EXPECT_EQ(112, ccScrollbarLayer->currentPos());
|
| EXPECT_EQ(1000, ccScrollbarLayer->totalSize());
|
|
|