| 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/mock_x_connection.h" | 11 #include "window_manager/mock_x_connection.h" |
| 12 #include "window_manager/panel.h" | 12 #include "window_manager/panel.h" |
| 13 #include "window_manager/panel_bar.h" | 13 #include "window_manager/panel_bar.h" |
| 14 #include "window_manager/shadow.h" | 14 #include "window_manager/shadow.h" |
| 15 #include "window_manager/stacking_manager.h" | 15 #include "window_manager/stacking_manager.h" |
| 16 #include "window_manager/test_lib.h" | 16 #include "window_manager/test_lib.h" |
| 17 #include "window_manager/util.h" | 17 #include "window_manager/util.h" |
| 18 #include "window_manager/window.h" | 18 #include "window_manager/window.h" |
| 19 #include "window_manager/window_manager.h" | 19 #include "window_manager/window_manager.h" |
| 20 | 20 |
| 21 DEFINE_bool(logtostderr, false, | 21 DEFINE_bool(logtostderr, false, |
| 22 "Print debugging messages to stderr (suppressed otherwise)"); | 22 "Print debugging messages to stderr (suppressed otherwise)"); |
| 23 | 23 |
| 24 namespace chromeos { | 24 namespace window_manager { |
| 25 | 25 |
| 26 class PanelTest : public BasicWindowManagerTest { | 26 class PanelTest : public BasicWindowManagerTest { |
| 27 protected: | 27 protected: |
| 28 virtual void SetUp() { | 28 virtual void SetUp() { |
| 29 BasicWindowManagerTest::SetUp(); | 29 BasicWindowManagerTest::SetUp(); |
| 30 panel_bar_ = wm_->panel_bar_.get(); | 30 panel_bar_ = wm_->panel_bar_.get(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 PanelBar* panel_bar_; // instance belonging to 'wm_' | 33 PanelBar* panel_bar_; // instance belonging to 'wm_' |
| 34 }; | 34 }; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 // The content window's shadow should disappear again if we collapse the | 243 // The content window's shadow should disappear again if we collapse the |
| 244 // panel. | 244 // panel. |
| 245 panel.SetState(false); | 245 panel.SetState(false); |
| 246 EXPECT_TRUE(titlebar_win.shadow()->is_shown()); | 246 EXPECT_TRUE(titlebar_win.shadow()->is_shown()); |
| 247 EXPECT_TRUE(panel_win.shadow()->is_shown()); | 247 EXPECT_TRUE(panel_win.shadow()->is_shown()); |
| 248 EXPECT_DOUBLE_EQ(1.0, titlebar_win.shadow()->opacity()); | 248 EXPECT_DOUBLE_EQ(1.0, titlebar_win.shadow()->opacity()); |
| 249 EXPECT_DOUBLE_EQ(0.0, panel_win.shadow()->opacity()); | 249 EXPECT_DOUBLE_EQ(0.0, panel_win.shadow()->opacity()); |
| 250 } | 250 } |
| 251 | 251 |
| 252 } // namespace chromeos | 252 } // namespace window_manager |
| 253 | 253 |
| 254 int main(int argc, char **argv) { | 254 int main(int argc, char **argv) { |
| 255 return chromeos::InitAndRunTests(&argc, argv, &FLAGS_logtostderr); | 255 return window_manager::InitAndRunTests(&argc, argv, &FLAGS_logtostderr); |
| 256 } | 256 } |
| OLD | NEW |