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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/exo/shell_surface.cc ('k') | components/exo/surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface_unittest.cc
diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6ade2840e22b9e769999bcfcf86b075dc4aa2f9d
--- /dev/null
+++ b/components/exo/shell_surface_unittest.cc
@@ -0,0 +1,54 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/strings/utf_string_conversions.h"
+#include "components/exo/shell_surface.h"
+#include "components/exo/surface.h"
+#include "components/exo/test/exo_test_base.h"
+#include "components/exo/test/exo_test_helper.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace exo {
+namespace {
+
+using ShellSurfaceTest = test::ExoTestBase;
+
+TEST_F(ShellSurfaceTest, Show) {
+ scoped_ptr<Surface> surface(new Surface);
+ scoped_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
+
+ shell_surface->Show();
+ surface->Commit();
+}
+
+TEST_F(ShellSurfaceTest, SetToplevel) {
+ scoped_ptr<Surface> surface(new Surface);
+ scoped_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
+
+ shell_surface->SetToplevel();
+ surface->Commit();
+}
+
+TEST_F(ShellSurfaceTest, SetFullscreen) {
+ scoped_ptr<Surface> surface(new Surface);
+ scoped_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
+
+ shell_surface->SetFullscreen(true);
+ surface->Commit();
+
+ // Fullscreen mode can change after the initial Commit().
+ shell_surface->SetFullscreen(false);
+ surface->Commit();
+}
+
+TEST_F(ShellSurfaceTest, SetTitle) {
+ scoped_ptr<Surface> surface(new Surface);
+ scoped_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
+
+ shell_surface->SetTitle(base::string16(base::ASCIIToUTF16("test")));
+ surface->Commit();
+}
+
+} // namespace
+} // namespace exo
« 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