OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/process_util.h" | 6 #include "base/process_util.h" |
7 #include "base/synchronization/waitable_event.h" | 7 #include "base/synchronization/waitable_event.h" |
8 #include "base/system_monitor/system_monitor.h" | 8 #include "base/system_monitor/system_monitor.h" |
9 #include "content/browser/gamepad/gamepad_provider.h" | 9 #include "content/browser/gamepad/gamepad_provider.h" |
10 #include "content/common/gamepad_messages.h" | 10 #include "content/common/gamepad_messages.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 protected: | 49 protected: |
50 GamepadProviderTest() { | 50 GamepadProviderTest() { |
51 } | 51 } |
52 | 52 |
53 MessageLoop main_message_loop_; | 53 MessageLoop main_message_loop_; |
54 scoped_ptr<base::SystemMonitor> system_monitor_; | 54 scoped_ptr<base::SystemMonitor> system_monitor_; |
55 MockDataFetcher* mock_data_fetcher_; | 55 MockDataFetcher* mock_data_fetcher_; |
56 scoped_refptr<GamepadProvider> provider_; | 56 scoped_refptr<GamepadProvider> provider_; |
57 }; | 57 }; |
58 | 58 |
59 TEST_F(GamepadProviderTest, PollingAccess) { | 59 // Crashes. http://crbug.com/106163 |
| 60 TEST_F(GamepadProviderTest, DISABLED_PollingAccess) { |
60 WebGamepads test_data; | 61 WebGamepads test_data; |
61 test_data.length = 1; | 62 test_data.length = 1; |
62 test_data.items[0].connected = true; | 63 test_data.items[0].connected = true; |
63 test_data.items[0].timestamp = 0; | 64 test_data.items[0].timestamp = 0; |
64 test_data.items[0].buttonsLength = 1; | 65 test_data.items[0].buttonsLength = 1; |
65 test_data.items[0].axesLength = 2; | 66 test_data.items[0].axesLength = 2; |
66 test_data.items[0].buttons[0] = 1.f; | 67 test_data.items[0].buttons[0] = 1.f; |
67 test_data.items[0].axes[0] = -1.f; | 68 test_data.items[0].axes[0] = -1.f; |
68 test_data.items[0].axes[1] = .5f; | 69 test_data.items[0].axes[1] = .5f; |
69 | 70 |
(...skipping 25 matching lines...) Expand all Loading... |
95 EXPECT_EQ(1u, output.items[0].buttonsLength); | 96 EXPECT_EQ(1u, output.items[0].buttonsLength); |
96 EXPECT_EQ(1.f, output.items[0].buttons[0]); | 97 EXPECT_EQ(1.f, output.items[0].buttons[0]); |
97 EXPECT_EQ(2u, output.items[0].axesLength); | 98 EXPECT_EQ(2u, output.items[0].axesLength); |
98 EXPECT_EQ(-1.f, output.items[0].axes[0]); | 99 EXPECT_EQ(-1.f, output.items[0].axes[0]); |
99 EXPECT_EQ(0.5f, output.items[0].axes[1]); | 100 EXPECT_EQ(0.5f, output.items[0].axes[1]); |
100 } | 101 } |
101 | 102 |
102 } // namespace | 103 } // namespace |
103 | 104 |
104 } // namespace content | 105 } // namespace content |
OLD | NEW |