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

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

Issue 1428643004: Repaint on interest rect change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnableSyncPaint
Patch Set: 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 27 matching lines...) Expand all
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698