| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/common/system/web_notification/ash_popup_alignment_delegate.h" | 5 #include "ash/common/system/web_notification/ash_popup_alignment_delegate.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/shelf/shelf_types.h" | 10 #include "ash/common/shelf/shelf_types.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 #endif | 297 #endif |
| 298 TEST_F(AshPopupAlignmentDelegateTest, MAYBE_KeyboardShowing) { | 298 TEST_F(AshPopupAlignmentDelegateTest, MAYBE_KeyboardShowing) { |
| 299 ASSERT_TRUE(keyboard::IsKeyboardEnabled()); | 299 ASSERT_TRUE(keyboard::IsKeyboardEnabled()); |
| 300 ASSERT_TRUE(keyboard::IsKeyboardOverscrollEnabled()); | 300 ASSERT_TRUE(keyboard::IsKeyboardOverscrollEnabled()); |
| 301 | 301 |
| 302 UpdateDisplay("600x600"); | 302 UpdateDisplay("600x600"); |
| 303 int baseline = alignment_delegate()->GetBaseLine(); | 303 int baseline = alignment_delegate()->GetBaseLine(); |
| 304 | 304 |
| 305 WmShelf* shelf = GetPrimaryShelf(); | 305 WmShelf* shelf = GetPrimaryShelf(); |
| 306 gfx::Rect keyboard_bounds(0, 300, 600, 300); | 306 gfx::Rect keyboard_bounds(0, 300, 600, 300); |
| 307 shelf->SetKeyboardBoundsForTesting(keyboard_bounds); | 307 shelf->SetVirtualKeyboardBoundsForTesting(keyboard_bounds); |
| 308 int keyboard_baseline = alignment_delegate()->GetBaseLine(); | 308 int keyboard_baseline = alignment_delegate()->GetBaseLine(); |
| 309 EXPECT_NE(baseline, keyboard_baseline); | 309 EXPECT_NE(baseline, keyboard_baseline); |
| 310 EXPECT_GT(keyboard_bounds.y(), keyboard_baseline); | 310 EXPECT_GT(keyboard_bounds.y(), keyboard_baseline); |
| 311 | 311 |
| 312 shelf->SetKeyboardBoundsForTesting(gfx::Rect()); | 312 shelf->SetVirtualKeyboardBoundsForTesting(gfx::Rect()); |
| 313 EXPECT_EQ(baseline, alignment_delegate()->GetBaseLine()); | 313 EXPECT_EQ(baseline, alignment_delegate()->GetBaseLine()); |
| 314 } | 314 } |
| 315 | 315 |
| 316 } // namespace ash | 316 } // namespace ash |
| OLD | NEW |