OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 <gflags/gflags.h> | 5 #include <gflags/gflags.h> |
6 #include <gtest/gtest.h> | 6 #include <gtest/gtest.h> |
7 | 7 |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "window_manager/clutter_interface.h" | 10 #include "window_manager/clutter_interface.h" |
11 #include "window_manager/shadow.h" | 11 #include "window_manager/shadow.h" |
12 #include "window_manager/test_lib.h" | 12 #include "window_manager/test_lib.h" |
13 | 13 |
14 DEFINE_bool(logtostderr, false, | 14 DEFINE_bool(logtostderr, false, |
15 "Print debugging messages to stderr (suppressed otherwise)"); | 15 "Print debugging messages to stderr (suppressed otherwise)"); |
16 | 16 |
17 namespace chromeos { | 17 namespace window_manager { |
18 | 18 |
19 class ShadowTest : public ::testing::Test { | 19 class ShadowTest : public ::testing::Test { |
20 protected: | 20 protected: |
21 virtual void SetUp() { | 21 virtual void SetUp() { |
22 clutter_.reset(new MockClutterInterface); | 22 clutter_.reset(new MockClutterInterface); |
23 } | 23 } |
24 | 24 |
25 scoped_ptr<ClutterInterface> clutter_; | 25 scoped_ptr<ClutterInterface> clutter_; |
26 }; | 26 }; |
27 | 27 |
28 TEST_F(ShadowTest, Basic) { | 28 TEST_F(ShadowTest, Basic) { |
29 Shadow shadow(clutter_.get()); | 29 Shadow shadow(clutter_.get()); |
30 shadow.Move(10, 20, 0); | 30 shadow.Move(10, 20, 0); |
31 shadow.Resize(200, 100, 0); | 31 shadow.Resize(200, 100, 0); |
32 shadow.SetOpacity(0.75, 0); | 32 shadow.SetOpacity(0.75, 0); |
33 shadow.Show(); | 33 shadow.Show(); |
34 // TODO: Check that the individual images are positioned correctly. | 34 // TODO: Check that the individual images are positioned correctly. |
35 } | 35 } |
36 | 36 |
37 } // namespace chromeos | 37 } // namespace window_manager |
38 | 38 |
39 int main(int argc, char **argv) { | 39 int main(int argc, char **argv) { |
40 return chromeos::InitAndRunTests(&argc, argv, &FLAGS_logtostderr); | 40 return window_manager::InitAndRunTests(&argc, argv, &FLAGS_logtostderr); |
41 } | 41 } |
OLD | NEW |