| OLD | NEW |
| 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 27 matching lines...) Expand all Loading... |
| 38 #include "public/platform/WebUnitTestSupport.h" | 38 #include "public/platform/WebUnitTestSupport.h" |
| 39 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" |
| 40 #include <gtest/gtest.h> | 40 #include <gtest/gtest.h> |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 class MockGraphicsLayerClient : public GraphicsLayerClient { | 46 class MockGraphicsLayerClient : public GraphicsLayerClient { |
| 47 public: | 47 public: |
| 48 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) const override { } | 48 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect* inClip) const override { } |
| 49 void paintContentsIfNeeded(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase) const override { } | |
| 50 String debugName(const GraphicsLayer*) override { return String(); } | 49 String debugName(const GraphicsLayer*) override { return String(); } |
| 51 }; | 50 }; |
| 52 | 51 |
| 53 class GraphicsLayerForTesting : public GraphicsLayer { | 52 class GraphicsLayerForTesting : public GraphicsLayer { |
| 54 public: | 53 public: |
| 55 explicit GraphicsLayerForTesting(GraphicsLayerClient* client) | 54 explicit GraphicsLayerForTesting(GraphicsLayerClient* client) |
| 56 : GraphicsLayer(client) { } | 55 : GraphicsLayer(client) { } |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 } // anonymous namespace | 58 } // anonymous namespace |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 172 |
| 174 WebDoublePoint scrollPosition(7, 9); | 173 WebDoublePoint scrollPosition(7, 9); |
| 175 m_platformLayer->setScrollPositionDouble(scrollPosition); | 174 m_platformLayer->setScrollPositionDouble(scrollPosition); |
| 176 m_graphicsLayer->didScroll(); | 175 m_graphicsLayer->didScroll(); |
| 177 | 176 |
| 178 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x()
); | 177 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x()
); |
| 179 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y()
); | 178 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y()
); |
| 180 } | 179 } |
| 181 | 180 |
| 182 } // namespace blink | 181 } // namespace blink |
| OLD | NEW |