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

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

Issue 2379653006: Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Changed SurfaceManager::kRootSurfaceId to a private field to avoid static initialization Created 4 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 // 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), 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698