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

Side by Side Diff: src/platform/window_manager/window_test.cc

Issue 501116: wm: Update namespace and header define guards. (Closed)
Patch Set: move using directive inside of namespace for consistency Created 11 years 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 unified diff | Download patch
OLDNEW
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/logging.h" 8 #include "base/logging.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.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/shadow.h" 12 #include "window_manager/shadow.h"
13 #include "window_manager/test_lib.h" 13 #include "window_manager/test_lib.h"
14 #include "window_manager/util.h" 14 #include "window_manager/util.h"
15 #include "window_manager/window.h" 15 #include "window_manager/window.h"
16 #include "window_manager/window_manager.h" 16 #include "window_manager/window_manager.h"
17 17
18 DEFINE_bool(logtostderr, false, 18 DEFINE_bool(logtostderr, false,
19 "Print debugging messages to stderr (suppressed otherwise)"); 19 "Print debugging messages to stderr (suppressed otherwise)");
20 20
21 namespace chromeos { 21 namespace window_manager {
22 22
23 class WindowTest : public BasicWindowManagerTest {}; 23 class WindowTest : public BasicWindowManagerTest {};
24 24
25 TEST_F(WindowTest, WindowType) { 25 TEST_F(WindowTest, WindowType) {
26 XWindow xid = CreateSimpleWindow(); 26 XWindow xid = CreateSimpleWindow();
27 Window win(wm_.get(), xid); 27 Window win(wm_.get(), xid);
28 28
29 // Without a window type, we should have a shadow. 29 // Without a window type, we should have a shadow.
30 EXPECT_EQ(WmIpc::WINDOW_TYPE_UNKNOWN, win.type()); 30 EXPECT_EQ(WmIpc::WINDOW_TYPE_UNKNOWN, win.type());
31 EXPECT_TRUE(win.using_shadow()); 31 EXPECT_TRUE(win.using_shadow());
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 win.FetchAndApplyShape(true); // update_shadow 419 win.FetchAndApplyShape(true); // update_shadow
420 EXPECT_FALSE(win.shaped()); 420 EXPECT_FALSE(win.shaped());
421 EXPECT_TRUE(mock_actor->alpha_mask_bytes() == NULL); 421 EXPECT_TRUE(mock_actor->alpha_mask_bytes() == NULL);
422 422
423 // The newly-created shadow should have the opacity that we set earlier. 423 // The newly-created shadow should have the opacity that we set earlier.
424 EXPECT_TRUE(win.using_shadow()); 424 EXPECT_TRUE(win.using_shadow());
425 ASSERT_TRUE(win.shadow() != NULL); 425 ASSERT_TRUE(win.shadow() != NULL);
426 EXPECT_EQ(shadow_opacity, win.shadow()->opacity()); 426 EXPECT_EQ(shadow_opacity, win.shadow()->opacity());
427 } 427 }
428 428
429 } // namespace chromeos 429 } // namespace window_manager
430 430
431 int main(int argc, char **argv) { 431 int main(int argc, char **argv) {
432 return chromeos::InitAndRunTests(&argc, argv, &FLAGS_logtostderr); 432 return window_manager::InitAndRunTests(&argc, argv, &FLAGS_logtostderr);
433 } 433 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698