Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / extensions / shell / browser / api / shell_window / shell_window_api_unittest.cc
1 // Copyright 2014 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 "extensions/shell/browser/api/shell_window/shell_window_api.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "base/values.h"
9 #include "extensions/browser/api_unittest.h"
10
11 using base::Value;
12
13 namespace extensions {
14
15 using ShellWindowApiTest = ApiUnitTest;
16
17 // Verifies that the show and hide functions exists and can be called without
18 // crashing.
19 TEST_F(ShellWindowApiTest, ShowHideBasics) {
20   scoped_ptr<Value> result =
21       RunFunctionAndReturnValue(new ShellWindowRequestHideFunction, "[]");
22
23   // Function returns nothing.
24   EXPECT_FALSE(result.get());
25
26   result = RunFunctionAndReturnValue(new ShellWindowRequestShowFunction, "[]");
27
28   // Function returns nothing.
29   EXPECT_FALSE(result.get());
30
31   result = RunFunctionAndReturnValue(new ShellWindowShowAppFunction, "[{}]");
32
33   // Function returns nothing.
34   EXPECT_FALSE(result.get());
35 }
36
37 }  // namespace extensions