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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 { | 59 { |
60 } | 60 } |
61 | 61 |
62 mojom::blink::OffscreenCanvasSurfacePtr MockOffscreenCanvasSurface::GetProxy() | 62 mojom::blink::OffscreenCanvasSurfacePtr MockOffscreenCanvasSurface::GetProxy() |
63 { | 63 { |
64 return m_binding.CreateInterfacePtrAndBind(); | 64 return m_binding.CreateInterfacePtrAndBind(); |
65 } | 65 } |
66 | 66 |
67 void MockOffscreenCanvasSurface::GetSurfaceId(const GetSurfaceIdCallback& callba
ck) | 67 void MockOffscreenCanvasSurface::GetSurfaceId(const GetSurfaceIdCallback& callba
ck) |
68 { | 68 { |
69 callback.Run(cc::SurfaceId(10, 15, 0)); | 69 callback.Run(cc::SurfaceId(10, 15, base::UnguessableToken::Create())); |
70 } | 70 } |
71 | 71 |
72 void CanvasSurfaceLayerBridgeTest::SetUp() | 72 void CanvasSurfaceLayerBridgeTest::SetUp() |
73 { | 73 { |
74 m_surfaceLayerBridge = wrapUnique(new CanvasSurfaceLayerBridge(m_service.Get
Proxy())); | 74 m_surfaceLayerBridge = wrapUnique(new CanvasSurfaceLayerBridge(m_service.Get
Proxy())); |
75 } | 75 } |
76 | 76 |
77 TEST_F(CanvasSurfaceLayerBridgeTest, SurfaceLayerCreation) | 77 TEST_F(CanvasSurfaceLayerBridgeTest, SurfaceLayerCreation) |
78 { | 78 { |
79 bool success = this->surfaceLayerBridge()->createSurfaceLayer(50, 50); | 79 bool success = this->surfaceLayerBridge()->createSurfaceLayer(50, 50); |
80 EXPECT_TRUE(success); | 80 EXPECT_TRUE(success); |
81 } | 81 } |
82 | 82 |
83 } // namespace blink | 83 } // namespace blink |
OLD | NEW |