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

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

Issue 1412093006: components: Add Exosphere component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove some ifdefs Created 5 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
« no previous file with comments | « components/exo/shell_surface.cc ('k') | components/exo/surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/strings/utf_string_conversions.h"
6 #include "components/exo/shell_surface.h"
7 #include "components/exo/surface.h"
8 #include "components/exo/test/exo_test_base.h"
9 #include "components/exo/test/exo_test_helper.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace exo {
13 namespace {
14
15 using ShellSurfaceTest = test::ExoTestBase;
16
17 TEST_F(ShellSurfaceTest, Show) {
18 scoped_ptr<Surface> surface(new Surface);
19 scoped_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
20
21 shell_surface->Show();
22 surface->Commit();
23 }
24
25 TEST_F(ShellSurfaceTest, SetToplevel) {
26 scoped_ptr<Surface> surface(new Surface);
27 scoped_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
28
29 shell_surface->SetToplevel();
30 surface->Commit();
31 }
32
33 TEST_F(ShellSurfaceTest, SetFullscreen) {
34 scoped_ptr<Surface> surface(new Surface);
35 scoped_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
36
37 shell_surface->SetFullscreen(true);
38 surface->Commit();
39
40 // Fullscreen mode can change after the initial Commit().
41 shell_surface->SetFullscreen(false);
42 surface->Commit();
43 }
44
45 TEST_F(ShellSurfaceTest, SetTitle) {
46 scoped_ptr<Surface> surface(new Surface);
47 scoped_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
48
49 shell_surface->SetTitle(base::string16(base::ASCIIToUTF16("test")));
50 surface->Commit();
51 }
52
53 } // namespace
54 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/shell_surface.cc ('k') | components/exo/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698