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

Side by Side Diff: gamepad_provider_unittest.cc

Issue 11828004: Disable GamepadProviderTest.UserGesture: testing auto-disable script (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/content/browser/gamepad/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« 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 (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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/memory/weak_ptr.h" 6 #include "base/memory/weak_ptr.h"
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "content/browser/gamepad/gamepad_data_fetcher.h" 8 #include "content/browser/gamepad/gamepad_data_fetcher.h"
9 #include "content/browser/gamepad/gamepad_provider.h" 9 #include "content/browser/gamepad/gamepad_provider.h"
10 #include "content/browser/gamepad/gamepad_test_helpers.h" 10 #include "content/browser/gamepad/gamepad_test_helpers.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 EXPECT_EQ(1u, output.length); 104 EXPECT_EQ(1u, output.length);
105 EXPECT_EQ(1u, output.items[0].buttonsLength); 105 EXPECT_EQ(1u, output.items[0].buttonsLength);
106 EXPECT_EQ(1.f, output.items[0].buttons[0]); 106 EXPECT_EQ(1.f, output.items[0].buttons[0]);
107 EXPECT_EQ(2u, output.items[0].axesLength); 107 EXPECT_EQ(2u, output.items[0].axesLength);
108 EXPECT_EQ(-1.f, output.items[0].axes[0]); 108 EXPECT_EQ(-1.f, output.items[0].axes[0]);
109 EXPECT_EQ(0.5f, output.items[0].axes[1]); 109 EXPECT_EQ(0.5f, output.items[0].axes[1]);
110 } 110 }
111 111
112 // Tests that waiting for a user gesture works properly. 112 // Tests that waiting for a user gesture works properly.
113 TEST_F(GamepadProviderTest, UserGesture) { 113 TEST_F(GamepadProviderTest, DISABLED_UserGesture) {
114 WebGamepads no_button_data; 114 WebGamepads no_button_data;
115 no_button_data.length = 1; 115 no_button_data.length = 1;
116 no_button_data.items[0].connected = true; 116 no_button_data.items[0].connected = true;
117 no_button_data.items[0].timestamp = 0; 117 no_button_data.items[0].timestamp = 0;
118 no_button_data.items[0].buttonsLength = 1; 118 no_button_data.items[0].buttonsLength = 1;
119 no_button_data.items[0].axesLength = 2; 119 no_button_data.items[0].axesLength = 2;
120 no_button_data.items[0].buttons[0] = 0.f; 120 no_button_data.items[0].buttons[0] = 0.f;
121 no_button_data.items[0].axes[0] = -1.f; 121 no_button_data.items[0].axes[0] = -1.f;
122 no_button_data.items[0].axes[1] = .5f; 122 no_button_data.items[0].axes[1] = .5f;
123 123
(...skipping 26 matching lines...) Expand all
150 mock_data_fetcher_->WaitForDataRead(); 150 mock_data_fetcher_->WaitForDataRead();
151 151
152 // It should have issued our callback. 152 // It should have issued our callback.
153 message_loop().RunUntilIdle(); 153 message_loop().RunUntilIdle();
154 EXPECT_TRUE(listener.has_user_gesture()); 154 EXPECT_TRUE(listener.has_user_gesture());
155 } 155 }
156 156
157 } // namespace 157 } // namespace
158 158
159 } // namespace content 159 } // namespace content
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