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

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

Issue 2388753003: Introduce cc::LocalFrameId and use in SurfaceFactory (Closed)
Patch Set: Fix exo_unittests Created 4 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
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 "mojo/public/cpp/bindings/binding.h" 9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "mojo/public/cpp/bindings/interface_request.h" 10 #include "mojo/public/cpp/bindings/interface_request.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 MockOffscreenCanvasSurface::MockOffscreenCanvasSurface() : m_binding(this) {} 56 MockOffscreenCanvasSurface::MockOffscreenCanvasSurface() : m_binding(this) {}
57 57
58 MockOffscreenCanvasSurface::~MockOffscreenCanvasSurface() {} 58 MockOffscreenCanvasSurface::~MockOffscreenCanvasSurface() {}
59 59
60 mojom::blink::OffscreenCanvasSurfacePtr MockOffscreenCanvasSurface::GetProxy() { 60 mojom::blink::OffscreenCanvasSurfacePtr MockOffscreenCanvasSurface::GetProxy() {
61 return m_binding.CreateInterfacePtrAndBind(); 61 return m_binding.CreateInterfacePtrAndBind();
62 } 62 }
63 63
64 void MockOffscreenCanvasSurface::GetSurfaceId( 64 void MockOffscreenCanvasSurface::GetSurfaceId(
65 const GetSurfaceIdCallback& callback) { 65 const GetSurfaceIdCallback& callback) {
66 callback.Run(cc::SurfaceId(cc::FrameSinkId(10, 11), 15, 0)); 66 callback.Run(cc::SurfaceId(cc::FrameSinkId(10, 11), cc::LocalFrameId(15, 0)));
67 } 67 }
68 68
69 void CanvasSurfaceLayerBridgeTest::SetUp() { 69 void CanvasSurfaceLayerBridgeTest::SetUp() {
70 m_surfaceLayerBridge = 70 m_surfaceLayerBridge =
71 wrapUnique(new CanvasSurfaceLayerBridge(m_service.GetProxy())); 71 wrapUnique(new CanvasSurfaceLayerBridge(m_service.GetProxy()));
72 } 72 }
73 73
74 TEST_F(CanvasSurfaceLayerBridgeTest, SurfaceLayerCreation) { 74 TEST_F(CanvasSurfaceLayerBridgeTest, SurfaceLayerCreation) {
75 bool success = this->surfaceLayerBridge()->createSurfaceLayer(50, 50); 75 bool success = this->surfaceLayerBridge()->createSurfaceLayer(50, 50);
76 EXPECT_TRUE(success); 76 EXPECT_TRUE(success);
77 } 77 }
78 78
79 } // namespace blink 79 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698