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

Side by Side Diff: components/exo/surface_unittest.cc

Issue 1802993003: exo: Add support for secure_output interface to wayland bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wayland-protocols-secure-contents
Patch Set: rebase Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "components/exo/buffer.h" 6 #include "components/exo/buffer.h"
7 #include "components/exo/surface.h" 7 #include "components/exo/surface.h"
8 #include "components/exo/test/exo_test_base.h" 8 #include "components/exo/test/exo_test_base.h"
9 #include "components/exo/test/exo_test_helper.h" 9 #include "components/exo/test/exo_test_helper.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 // This will update the bounds of the surface and take the viewport into 127 // This will update the bounds of the surface and take the viewport into
128 // account. 128 // account.
129 surface->Attach(buffer.get()); 129 surface->Attach(buffer.get());
130 gfx::Size viewport(256, 256); 130 gfx::Size viewport(256, 256);
131 surface->SetViewport(viewport); 131 surface->SetViewport(viewport);
132 surface->Commit(); 132 surface->Commit();
133 EXPECT_EQ(viewport.ToString(), surface->bounds().size().ToString()); 133 EXPECT_EQ(viewport.ToString(), surface->bounds().size().ToString());
134 } 134 }
135 135
136 TEST_F(SurfaceTest, SetOnlyVisibleOnSecureOutput) {
137 gfx::Size buffer_size(1, 1);
138 scoped_ptr<Buffer> buffer(
139 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
140 scoped_ptr<Surface> surface(new Surface);
141
142 surface->Attach(buffer.get());
143 surface->SetOnlyVisibleOnSecureOutput(true);
144 surface->Commit();
Daniele Castagna 2016/03/16 22:28:07 Test that the produced mailbox has the flag secure
reveman 2016/03/17 16:36:32 Done.
145 }
146
136 TEST_F(SurfaceTest, Commit) { 147 TEST_F(SurfaceTest, Commit) {
137 scoped_ptr<Surface> surface(new Surface); 148 scoped_ptr<Surface> surface(new Surface);
138 149
139 // Calling commit without a buffer should succeed. 150 // Calling commit without a buffer should succeed.
140 surface->Commit(); 151 surface->Commit();
141 } 152 }
142 153
143 } // namespace 154 } // namespace
144 } // namespace exo 155 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698