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

Side by Side Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium 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 <string> 5 #include <string>
6 6
7 #include "ash/shelf/wm_shelf.h" 7 #include "ash/shelf/wm_shelf.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray.h" 9 #include "ash/system/tray/system_tray.h"
10 #include "ash/wm_window.h" 10 #include "ash/wm_window.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 ScopedStubInstallAttributes install_attributes_; 322 ScopedStubInstallAttributes install_attributes_;
323 323
324 DISALLOW_COPY_AND_ASSIGN(ActiveDirectoryLoginTest); 324 DISALLOW_COPY_AND_ASSIGN(ActiveDirectoryLoginTest);
325 }; 325 };
326 326
327 // Used to make sure that the system tray is visible and within the screen 327 // Used to make sure that the system tray is visible and within the screen
328 // bounds after login. 328 // bounds after login.
329 void TestSystemTrayIsVisible(bool otr) { 329 void TestSystemTrayIsVisible(bool otr) {
330 ash::SystemTray* tray = ash::Shell::Get()->GetPrimarySystemTray(); 330 ash::SystemTray* tray = ash::Shell::Get()->GetPrimarySystemTray();
331 aura::Window* primary_win = ash::Shell::GetPrimaryRootWindow(); 331 aura::Window* primary_win = ash::Shell::GetPrimaryRootWindow();
332 ash::WmWindow* wm_primary_win = ash::WmWindow::Get(primary_win); 332 ash::WmShelf* wm_shelf = ash::WmShelf::ForWindow(primary_win);
333 ash::WmShelf* wm_shelf = ash::WmShelf::ForWindow(wm_primary_win);
334 SCOPED_TRACE(testing::Message() 333 SCOPED_TRACE(testing::Message()
335 << "ShelfVisibilityState=" << wm_shelf->GetVisibilityState() 334 << "ShelfVisibilityState=" << wm_shelf->GetVisibilityState()
336 << " ShelfAutoHideBehavior=" << wm_shelf->auto_hide_behavior()); 335 << " ShelfAutoHideBehavior=" << wm_shelf->auto_hide_behavior());
337 EXPECT_TRUE(tray->visible()); 336 EXPECT_TRUE(tray->visible());
338 337
339 // This check flakes for LoginGuestTest: https://crbug.com/693106. 338 // This check flakes for LoginGuestTest: https://crbug.com/693106.
340 if (!otr) 339 if (!otr)
341 EXPECT_TRUE(RectContains(primary_win->bounds(), tray->GetBoundsInScreen())); 340 EXPECT_TRUE(RectContains(primary_win->bounds(), tray->GetBoundsInScreen()));
342 } 341 }
343 342
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 TestDomainVisible(); 478 TestDomainVisible();
480 479
481 fake_auth_policy_client_->set_auth_error(authpolicy::ERROR_BAD_PASSWORD); 480 fake_auth_policy_client_->set_auth_error(authpolicy::ERROR_BAD_PASSWORD);
482 SubmitActiveDirectoryCredentials(kTestActiveDirectoryUser, kPassword); 481 SubmitActiveDirectoryCredentials(kTestActiveDirectoryUser, kPassword);
483 WaitForMessage(&message_queue, "\"ShowAuthError\""); 482 WaitForMessage(&message_queue, "\"ShowAuthError\"");
484 TestPasswordError(); 483 TestPasswordError();
485 TestDomainVisible(); 484 TestDomainVisible();
486 } 485 }
487 486
488 } // namespace chromeos 487 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/first_run/steps/tray_step.cc ('k') | chrome/browser/chromeos/ui/accessibility_cursor_ring_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698