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

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

Issue 2102123002: Make Satisfy/Require callbacks pass Surface id and sequence by reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/CanvasSurfaceLayerBridge.h" 5 #include "platform/graphics/CanvasSurfaceLayerBridge.h"
6 6
7 #include "cc/surfaces/surface_id.h" 7 #include "cc/surfaces/surface_id.h"
8 #include "cc/surfaces/surface_sequence.h" 8 #include "cc/surfaces/surface_sequence.h"
9 #include "platform/graphics/CanvasSurfaceLayerBridgeClient.h" 9 #include "platform/graphics/CanvasSurfaceLayerBridgeClient.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 20 matching lines...) Expand all
31 31
32 //----------------------------------------------------------------------------- 32 //-----------------------------------------------------------------------------
33 33
34 class MockCanvasSurfaceLayerBridgeClient final : public CanvasSurfaceLayerBridge Client { 34 class MockCanvasSurfaceLayerBridgeClient final : public CanvasSurfaceLayerBridge Client {
35 public: 35 public:
36 explicit MockCanvasSurfaceLayerBridgeClient(FakeOffscreenCanvasSurfaceImpl*) ; 36 explicit MockCanvasSurfaceLayerBridgeClient(FakeOffscreenCanvasSurfaceImpl*) ;
37 ~MockCanvasSurfaceLayerBridgeClient() override; 37 ~MockCanvasSurfaceLayerBridgeClient() override;
38 38
39 bool syncGetSurfaceId(cc::SurfaceId*) override; 39 bool syncGetSurfaceId(cc::SurfaceId*) override;
40 void asyncRequestSurfaceCreation(const cc::SurfaceId&) override; 40 void asyncRequestSurfaceCreation(const cc::SurfaceId&) override;
41 void asyncRequire(cc::SurfaceId, cc::SurfaceSequence) override {} 41 void asyncRequire(const cc::SurfaceId&, const cc::SurfaceSequence&) override {}
42 void asyncSatisfy(cc::SurfaceSequence) override {}; 42 void asyncSatisfy(const cc::SurfaceSequence&) override {}
43 43
44 private: 44 private:
45 FakeOffscreenCanvasSurfaceImpl* m_service; 45 FakeOffscreenCanvasSurfaceImpl* m_service;
46 cc::SurfaceId m_surfaceId; 46 cc::SurfaceId m_surfaceId;
47 }; 47 };
48 48
49 //----------------------------------------------------------------------------- 49 //-----------------------------------------------------------------------------
50 50
51 class CanvasSurfaceLayerBridgeTest : public testing::Test { 51 class CanvasSurfaceLayerBridgeTest : public testing::Test {
52 public: 52 public:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 TEST_F(CanvasSurfaceLayerBridgeTest, SurfaceLayerCreation) 113 TEST_F(CanvasSurfaceLayerBridgeTest, SurfaceLayerCreation)
114 { 114 {
115 bool success = this->surfaceLayerBridge()->createSurfaceLayer(50, 50); 115 bool success = this->surfaceLayerBridge()->createSurfaceLayer(50, 50);
116 EXPECT_TRUE(this->surfaceService()->isSurfaceInSurfaceMap(this->surfaceLayer Bridge()->getSurfaceId())); 116 EXPECT_TRUE(this->surfaceService()->isSurfaceInSurfaceMap(this->surfaceLayer Bridge()->getSurfaceId()));
117 EXPECT_TRUE(success); 117 EXPECT_TRUE(success);
118 } 118 }
119 119
120 } // namespace blink 120 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClientImpl.cpp ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698