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

Side by Side Diff: device/gamepad/gamepad_provider_unittest.cc

Issue 2757293003: Disable GamepadProviderTest.Sanitization on Linux and CrOS. (Closed)
Patch Set: r Created 3 years, 9 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 (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 "device/gamepad/gamepad_provider.h" 5 #include "device/gamepad/gamepad_provider.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 // Set a button down and wait for it to be read twice. 200 // Set a button down and wait for it to be read twice.
201 mock_data_fetcher_->SetTestData(button_down_data); 201 mock_data_fetcher_->SetTestData(button_down_data);
202 mock_data_fetcher_->WaitForDataReadAndCallbacksIssued(); 202 mock_data_fetcher_->WaitForDataReadAndCallbacksIssued();
203 203
204 // It should have issued our callback. 204 // It should have issued our callback.
205 base::RunLoop().RunUntilIdle(); 205 base::RunLoop().RunUntilIdle();
206 EXPECT_TRUE(listener.has_user_gesture()); 206 EXPECT_TRUE(listener.has_user_gesture());
207 } 207 }
208 208
209 // Flaky on MSAN: http://crbug.com/640086 209 // Flaky on CrOS and Linux: http://crbug.com/640086, https://crbug.com/702712
210 #if defined(MEMORY_SANITIZER) 210 #if defined(OS_LINUX) || defined(OS_CHROMEOS)
211 #define MAYBE_Sanitization DISABLED_Sanitization 211 #define MAYBE_Sanitization DISABLED_Sanitization
212 #else 212 #else
213 #define MAYBE_Sanitization Sanitization 213 #define MAYBE_Sanitization Sanitization
214 #endif 214 #endif
215 // Tests that waiting for a user gesture works properly. 215 // Tests that waiting for a user gesture works properly.
216 TEST_F(GamepadProviderTest, MAYBE_Sanitization) { 216 TEST_F(GamepadProviderTest, MAYBE_Sanitization) {
217 WebGamepads active_data; 217 WebGamepads active_data;
218 active_data.items[0].connected = true; 218 active_data.items[0].connected = true;
219 active_data.items[0].timestamp = 0; 219 active_data.items[0].timestamp = 0;
220 active_data.items[0].buttonsLength = 1; 220 active_data.items[0].buttonsLength = 1;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 EXPECT_EQ(1u, output.items[0].buttonsLength); 286 EXPECT_EQ(1u, output.items[0].buttonsLength);
287 EXPECT_EQ(1.f, output.items[0].buttons[0].value); 287 EXPECT_EQ(1.f, output.items[0].buttons[0].value);
288 EXPECT_TRUE(output.items[0].buttons[0].pressed); 288 EXPECT_TRUE(output.items[0].buttons[0].pressed);
289 EXPECT_EQ(1u, output.items[0].axesLength); 289 EXPECT_EQ(1u, output.items[0].axesLength);
290 EXPECT_EQ(-1.f, output.items[0].axes[0]); 290 EXPECT_EQ(-1.f, output.items[0].axes[0]);
291 } 291 }
292 292
293 } // namespace 293 } // namespace
294 294
295 } // namespace device 295 } // namespace device
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