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

Unified Diff: cc/scrollbar_layer_unittest.cc

Issue 11189043: cc: Rename cc classes and members to match filenames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
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());
« cc/active_animation.h ('K') | « cc/scrollbar_layer_impl.cc ('k') | cc/settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698