OLD | NEW |
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 Loading... |
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), cc::LocalFrameId(15, 0))); | 66 callback.Run( |
| 67 cc::SurfaceId(cc::FrameSinkId(10, 11), |
| 68 cc::LocalFrameId(15, base::UnguessableToken::Create()))); |
67 } | 69 } |
68 | 70 |
69 void CanvasSurfaceLayerBridgeTest::SetUp() { | 71 void CanvasSurfaceLayerBridgeTest::SetUp() { |
70 m_surfaceLayerBridge = | 72 m_surfaceLayerBridge = |
71 wrapUnique(new CanvasSurfaceLayerBridge(m_service.GetProxy())); | 73 wrapUnique(new CanvasSurfaceLayerBridge(m_service.GetProxy())); |
72 } | 74 } |
73 | 75 |
74 TEST_F(CanvasSurfaceLayerBridgeTest, SurfaceLayerCreation) { | 76 TEST_F(CanvasSurfaceLayerBridgeTest, SurfaceLayerCreation) { |
75 bool success = this->surfaceLayerBridge()->createSurfaceLayer(50, 50); | 77 bool success = this->surfaceLayerBridge()->createSurfaceLayer(50, 50); |
76 EXPECT_TRUE(success); | 78 EXPECT_TRUE(success); |
77 } | 79 } |
78 | 80 |
79 } // namespace blink | 81 } // namespace blink |
OLD | NEW |