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

Unified Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 2689283010: Added additional logging to flaky test "LoginGuestTest.CursorShown" (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/BUILD.gn » ('j') | ui/gfx/geometry/test/rect_test_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_browsertest.cc
diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc
index b1dd99b5af1321d5fad5e295232ad604f9e9032a..139cdd82f09967456269cd8983aef1ac182f0431 100644
--- a/chrome/browser/chromeos/login/login_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_browsertest.cc
@@ -2,7 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <string>
+
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/system/tray/system_tray.h"
+#include "ash/common/wm_window.h"
#include "ash/shell.h"
#include "base/command_line.h"
#include "base/location.h"
@@ -32,7 +36,9 @@
#include "extensions/browser/extension_system.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/geometry/test/rect_test_util.h"
+using ::gfx::test::RectContains;
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::Return;
@@ -178,8 +184,13 @@ class LoginTest : public LoginManagerTest {
void TestSystemTrayIsVisible() {
ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
aura::Window* primary_win = ash::Shell::GetPrimaryRootWindow();
+ ash::WmWindow* wm_primary_win = ash::WmWindow::Get(primary_win);
+ ash::WmShelf* wm_shelf = ash::WmShelf::ForWindow(wm_primary_win);
+ SCOPED_TRACE(testing::Message()
+ << "ShelfVisibilityState=" << wm_shelf->GetVisibilityState()
+ << " ShelfAutoHideBehavior=" << wm_shelf->auto_hide_behavior());
EXPECT_TRUE(tray->visible());
- EXPECT_TRUE(primary_win->bounds().Contains(tray->GetBoundsInScreen()));
+ EXPECT_TRUE(RectContains(primary_win->bounds(), tray->GetBoundsInScreen()));
}
} // namespace
« no previous file with comments | « no previous file | ui/gfx/BUILD.gn » ('j') | ui/gfx/geometry/test/rect_test_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698