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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp

Issue 1413373007: CC AnimationHost: Fix LinkHighlights detach scope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 GraphicsLayerTest() 62 GraphicsLayerTest()
63 { 63 {
64 m_clipLayer = adoptPtr(new GraphicsLayerForTesting(&m_client)); 64 m_clipLayer = adoptPtr(new GraphicsLayerForTesting(&m_client));
65 m_scrollElasticityLayer = adoptPtr(new GraphicsLayerForTesting(&m_client )); 65 m_scrollElasticityLayer = adoptPtr(new GraphicsLayerForTesting(&m_client ));
66 m_graphicsLayer = adoptPtr(new GraphicsLayerForTesting(&m_client)); 66 m_graphicsLayer = adoptPtr(new GraphicsLayerForTesting(&m_client));
67 m_clipLayer->addChild(m_scrollElasticityLayer.get()); 67 m_clipLayer->addChild(m_scrollElasticityLayer.get());
68 m_scrollElasticityLayer->addChild(m_graphicsLayer.get()); 68 m_scrollElasticityLayer->addChild(m_graphicsLayer.get());
69 m_graphicsLayer->platformLayer()->setScrollClipLayer( 69 m_graphicsLayer->platformLayer()->setScrollClipLayer(
70 m_clipLayer->platformLayer()); 70 m_clipLayer->platformLayer());
71 m_platformLayer = m_graphicsLayer->platformLayer(); 71 m_platformLayer = m_graphicsLayer->platformLayer();
72 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->creat eLayerTreeViewForTesting()); 72 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->creat eLayerTreeViewForTesting(false));
73 ASSERT(m_layerTreeView); 73 ASSERT(m_layerTreeView);
74 m_layerTreeView->setRootLayer(*m_clipLayer->platformLayer()); 74 m_layerTreeView->setRootLayer(*m_clipLayer->platformLayer());
75 m_layerTreeView->registerViewportLayers( 75 m_layerTreeView->registerViewportLayers(
76 m_scrollElasticityLayer->platformLayer(), m_clipLayer->platformLayer (), m_graphicsLayer->platformLayer(), 0); 76 m_scrollElasticityLayer->platformLayer(), m_clipLayer->platformLayer (), m_graphicsLayer->platformLayer(), 0);
77 m_layerTreeView->setViewportSize(WebSize(1, 1)); 77 m_layerTreeView->setViewportSize(WebSize(1, 1));
78 } 78 }
79 79
80 ~GraphicsLayerTest() override 80 ~GraphicsLayerTest() override
81 { 81 {
82 m_graphicsLayer.clear(); 82 m_graphicsLayer.clear();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 WebDoublePoint scrollPosition(7, 9); 173 WebDoublePoint scrollPosition(7, 9);
174 m_platformLayer->setScrollPositionDouble(scrollPosition); 174 m_platformLayer->setScrollPositionDouble(scrollPosition);
175 m_graphicsLayer->didScroll(); 175 m_graphicsLayer->didScroll();
176 176
177 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x() ); 177 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x() );
178 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y() ); 178 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y() );
179 } 179 }
180 180
181 } // namespace blink 181 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698