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

Unified Diff: content/browser/gamepad/gamepad_service_unittest.cc

Issue 1586663006: Refactoring gamepad polling to support dynamically added sources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gamepad/gamepad_service_unittest.cc
diff --git a/content/browser/gamepad/gamepad_service_unittest.cc b/content/browser/gamepad/gamepad_service_unittest.cc
index 5b9d1c28e189bdbe3b0014c6321313d85c5d9a2f..ecd6a62caea31b71fea403d43c2e228a852256b9 100644
--- a/content/browser/gamepad/gamepad_service_unittest.cc
+++ b/content/browser/gamepad/gamepad_service_unittest.cc
@@ -80,7 +80,7 @@ GamepadServiceTest::GamepadServiceTest()
: browser_thread_(TestBrowserThreadBundle::IO_MAINLOOP) {
memset(&test_data_, 0, sizeof(test_data_));
- // Set it so that we have user gesture.
+ // Must be set to zero initially to pass sanitiation
scottmg 2016/01/18 22:54:51 Zero? But .value = 1.f?
test_data_.items[0].buttonsLength = 1;
test_data_.items[0].buttons[0].value = 1.f;
test_data_.items[0].buttons[0].pressed = true;
@@ -93,6 +93,7 @@ GamepadServiceTest::~GamepadServiceTest() {
void GamepadServiceTest::SetUp() {
fetcher_ = new MockGamepadDataFetcher(test_data_);
service_ = new GamepadService(scoped_ptr<GamepadDataFetcher>(fetcher_));
+ service_->provider()->SetSanitizationEnabled(false);
connection_listener_.reset((new ConnectionListener));
service_->ConsumerBecameActive(connection_listener_.get());
}

Powered by Google App Engine
This is Rietveld 408576698