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

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

Issue 652593003: Web Animations: Plumb compositor group id through animation creation and start/finish notifications (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass groupId to createAnimation. Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 29 matching lines...) Expand all
40 #include "wtf/PassOwnPtr.h" 40 #include "wtf/PassOwnPtr.h"
41 41
42 #include <gtest/gtest.h> 42 #include <gtest/gtest.h>
43 43
44 using namespace blink; 44 using namespace blink;
45 45
46 namespace { 46 namespace {
47 47
48 class MockGraphicsLayerClient : public GraphicsLayerClient { 48 class MockGraphicsLayerClient : public GraphicsLayerClient {
49 public: 49 public:
50 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi me) override { }
51 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& inClip) override { } 50 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& inClip) override { }
52 virtual String debugName(const GraphicsLayer*) override { return String(); } 51 virtual String debugName(const GraphicsLayer*) override { return String(); }
53 }; 52 };
54 53
55 class GraphicsLayerForTesting : public GraphicsLayer { 54 class GraphicsLayerForTesting : public GraphicsLayer {
56 public: 55 public:
57 explicit GraphicsLayerForTesting(GraphicsLayerClient* client) 56 explicit GraphicsLayerForTesting(GraphicsLayerClient* client)
58 : GraphicsLayer(client) { }; 57 : GraphicsLayer(client) { };
59 58
60 virtual WebLayer* contentsLayer() const { return GraphicsLayer::contentsLaye r(); } 59 virtual WebLayer* contentsLayer() const { return GraphicsLayer::contentsLaye r(); }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 160
162 WebDoublePoint scrollPosition(7.2, 9.6); 161 WebDoublePoint scrollPosition(7.2, 9.6);
163 m_platformLayer->setScrollPositionDouble(scrollPosition); 162 m_platformLayer->setScrollPositionDouble(scrollPosition);
164 m_graphicsLayer->didScroll(); 163 m_graphicsLayer->didScroll();
165 164
166 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea.scrollPositionDouble().x()) ; 165 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea.scrollPositionDouble().x()) ;
167 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea.scrollPositionDouble().y()) ; 166 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea.scrollPositionDouble().y()) ;
168 } 167 }
169 168
170 } // namespace 169 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsLayerClient.h ('k') | Source/platform/graphics/ImageLayerChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698