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

Unified Diff: extensions/shell/browser/api/shell_window/shell_window_api_unittest.cc

Issue 686983002: Add idl for managing focus in app_shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gn build Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: extensions/shell/browser/api/shell_window/shell_window_api_unittest.cc
diff --git a/extensions/shell/browser/api/shell_window/shell_window_api_unittest.cc b/extensions/shell/browser/api/shell_window/shell_window_api_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..641a3da81d6bd44b0847c0afff1ee78e0bc1692f
--- /dev/null
+++ b/extensions/shell/browser/api/shell_window/shell_window_api_unittest.cc
@@ -0,0 +1,37 @@
+// Copyright 2014 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 "extensions/shell/browser/api/shell_window/shell_window_api.h"
+
+#include "base/memory/scoped_ptr.h"
+#include "base/values.h"
+#include "extensions/browser/api_unittest.h"
+
+using base::Value;
+
+namespace extensions {
+
+using ShellWindowApiTest = ApiUnitTest;
+
+// Verifies that the show and hide functions exists and can be called without
+// crashing.
+TEST_F(ShellWindowApiTest, ShowHideBasics) {
+ scoped_ptr<Value> result =
+ RunFunctionAndReturnValue(new ShellWindowRequestHideFunction, "[]");
+
+ // Function returns nothing.
+ EXPECT_FALSE(result.get());
+
+ result = RunFunctionAndReturnValue(new ShellWindowRequestShowFunction, "[]");
+
+ // Function returns nothing.
+ EXPECT_FALSE(result.get());
+
+ result = RunFunctionAndReturnValue(new ShellWindowShowAppFunction, "[{}]");
+
+ // Function returns nothing.
+ EXPECT_FALSE(result.get());
+}
+
+} // namespace extensions
« no previous file with comments | « extensions/shell/browser/api/shell_window/shell_window_api.cc ('k') | extensions/shell/common/api/_api_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698