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

Side by Side Diff: screen_locker_handler_test.cc

Issue 6902072: wm: Update a lot of code to use structs from geometry.h. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: move override-redirect stacking and visibility into Window Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « screen_locker_handler.cc ('k') | test_lib.h » ('j') | window.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 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 <cmath> 5 #include <cmath>
6 #include <vector> 6 #include <vector>
7 7
8 #include <gflags/gflags.h> 8 #include <gflags/gflags.h>
9 #include <gtest/gtest.h> 9 #include <gtest/gtest.h>
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // The window's actor shouldn't be in any visibility groups, and the 104 // The window's actor shouldn't be in any visibility groups, and the
105 // compositor shouldn't be restricting its drawing to a particular group. 105 // compositor shouldn't be restricting its drawing to a particular group.
106 MockCompositor::TexturePixmapActor* toplevel_actor = 106 MockCompositor::TexturePixmapActor* toplevel_actor =
107 GetMockActorForWindow(wm_->GetWindowOrDie(toplevel_xid)); 107 GetMockActorForWindow(wm_->GetWindowOrDie(toplevel_xid));
108 EXPECT_TRUE(toplevel_actor->visibility_groups().empty()); 108 EXPECT_TRUE(toplevel_actor->visibility_groups().empty());
109 EXPECT_TRUE(compositor_->active_visibility_groups().empty()); 109 EXPECT_TRUE(compositor_->active_visibility_groups().empty());
110 110
111 // Now create a screen locker window. 111 // Now create a screen locker window.
112 XWindow screen_locker_xid = 112 XWindow screen_locker_xid =
113 CreateBasicWindow(5, 5, wm_->width() - 5, wm_->height() - 5); 113 CreateBasicWindow(Rect(5, 5, wm_->width() - 5, wm_->height() - 5));
114 MockXConnection::WindowInfo* screen_locker_info = 114 MockXConnection::WindowInfo* screen_locker_info =
115 xconn_->GetWindowInfoOrDie(screen_locker_xid); 115 xconn_->GetWindowInfoOrDie(screen_locker_xid);
116 wm_->wm_ipc()->SetWindowType( 116 wm_->wm_ipc()->SetWindowType(
117 screen_locker_xid, chromeos::WM_IPC_WINDOW_CHROME_SCREEN_LOCKER, NULL); 117 screen_locker_xid, chromeos::WM_IPC_WINDOW_CHROME_SCREEN_LOCKER, NULL);
118 WmIpc::Message msg; 118 WmIpc::Message msg;
119 EXPECT_FALSE( 119 EXPECT_FALSE(
120 GetFirstWmIpcMessageOfType( 120 GetFirstWmIpcMessageOfType(
121 screen_locker_xid, 121 screen_locker_xid,
122 chromeos::WM_IPC_MESSAGE_CHROME_NOTIFY_SCREEN_REDRAWN_FOR_LOCK, 122 chromeos::WM_IPC_MESSAGE_CHROME_NOTIFY_SCREEN_REDRAWN_FOR_LOCK,
123 &msg)); 123 &msg));
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 TestActorConfiguredForFadeout(GetSnapshotActor()); 485 TestActorConfiguredForFadeout(GetSnapshotActor());
486 EXPECT_TRUE(IsOnlyActiveVisibilityGroup( 486 EXPECT_TRUE(IsOnlyActiveVisibilityGroup(
487 WindowManager::VISIBILITY_GROUP_SESSION_ENDING)); 487 WindowManager::VISIBILITY_GROUP_SESSION_ENDING));
488 } 488 }
489 489
490 } // namespace window_manager 490 } // namespace window_manager
491 491
492 int main(int argc, char** argv) { 492 int main(int argc, char** argv) {
493 return window_manager::InitAndRunTests(&argc, argv, &FLAGS_logtostderr); 493 return window_manager::InitAndRunTests(&argc, argv, &FLAGS_logtostderr);
494 } 494 }
OLDNEW
« no previous file with comments | « screen_locker_handler.cc ('k') | test_lib.h » ('j') | window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698