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

Side by Side Diff: athena/input/input_manager_unittest.cc

Issue 660773002: Temporarily disable InputManagerTest.PowerButton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "athena/input/input_manager_impl.h" 5 #include "athena/input/input_manager_impl.h"
6 6
7 #include "athena/input/public/accelerator_manager.h" 7 #include "athena/input/public/accelerator_manager.h"
8 #include "athena/test/base/athena_test_base.h" 8 #include "athena/test/base/athena_test_base.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "ui/events/test/event_generator.h" 10 #include "ui/events/test/event_generator.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 int original_timeout_; 67 int original_timeout_;
68 DISALLOW_COPY_AND_ASSIGN(ScopedPowerButtonTimeoutShortener); 68 DISALLOW_COPY_AND_ASSIGN(ScopedPowerButtonTimeoutShortener);
69 }; 69 };
70 70
71 } // namespace test 71 } // namespace test
72 72
73 typedef test::AthenaTestBase InputManagerTest; 73 typedef test::AthenaTestBase InputManagerTest;
74 74
75 TEST_F(InputManagerTest, PowerButton) { 75 // This fails on bots. crbug.com/424109.
76 // Investigate once crbug.com/424093 is fixed.
77 TEST_F(InputManagerTest, DISABLED_PowerButton) {
76 test::ScopedPowerButtonTimeoutShortener shortener; 78 test::ScopedPowerButtonTimeoutShortener shortener;
77 TestPowerButtonObserver observer; 79 TestPowerButtonObserver observer;
78 80
79 ui::test::EventGenerator generator(root_window()); 81 ui::test::EventGenerator generator(root_window());
80 generator.PressKey(ui::VKEY_P, ui::EF_NONE); 82 generator.PressKey(ui::VKEY_P, ui::EF_NONE);
81 EXPECT_EQ(0, observer.count()); 83 EXPECT_EQ(0, observer.count());
82 84
83 // Test short press. 85 // Test short press.
84 generator.PressKey(ui::VKEY_P, ui::EF_ALT_DOWN); 86 generator.PressKey(ui::VKEY_P, ui::EF_ALT_DOWN);
85 EXPECT_EQ(1, observer.count()); 87 EXPECT_EQ(1, observer.count());
(...skipping 10 matching lines...) Expand all
96 EXPECT_TRUE(observer.WaitForLongPress()); 98 EXPECT_TRUE(observer.WaitForLongPress());
97 EXPECT_EQ(4, observer.count()); 99 EXPECT_EQ(4, observer.count());
98 EXPECT_EQ(PowerButtonObserver::LONG_PRESSED, observer.state()); 100 EXPECT_EQ(PowerButtonObserver::LONG_PRESSED, observer.state());
99 101
100 generator.ReleaseKey(ui::VKEY_P, ui::EF_ALT_DOWN); 102 generator.ReleaseKey(ui::VKEY_P, ui::EF_ALT_DOWN);
101 EXPECT_EQ(5, observer.count()); 103 EXPECT_EQ(5, observer.count());
102 EXPECT_EQ(PowerButtonObserver::RELEASED, observer.state()); 104 EXPECT_EQ(PowerButtonObserver::RELEASED, observer.state());
103 } 105 }
104 106
105 } // namespace athena 107 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698