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

Side by Side Diff: ui/events/ozone/evdev/touch_noise/touch_noise_finder_unittest.cc

Issue 1210203002: ozone: evdev: Fix printf format string issues on 32-bit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « ui/events/ozone/evdev/event_device_test_util.cc ('k') | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/events/ozone/evdev/touch_noise/touch_noise_finder.h" 5 #include "ui/events/ozone/evdev/touch_noise/touch_noise_finder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 if (i == count - 1 || entry.time_ms != entries[i + 1].time_ms) { 47 if (i == count - 1 || entry.time_ms != entries[i + 1].time_ms) {
48 touch_noise_finder_->HandleTouches( 48 touch_noise_finder_->HandleTouches(
49 touches, base::TimeDelta::FromMilliseconds(entry.time_ms)); 49 touches, base::TimeDelta::FromMilliseconds(entry.time_ms));
50 50
51 for (size_t j = 0; j < touches.size(); ++j) { 51 for (size_t j = 0; j < touches.size(); ++j) {
52 bool expect_noise = entries[j + start_index].expect_noise; 52 bool expect_noise = entries[j + start_index].expect_noise;
53 size_t slot = touches[j].slot; 53 size_t slot = touches[j].slot;
54 if (touch_noise_finder_->SlotHasNoise(slot) != expect_noise) { 54 if (touch_noise_finder_->SlotHasNoise(slot) != expect_noise) {
55 LOG(ERROR) << base::StringPrintf( 55 LOG(ERROR) << base::StringPrintf(
56 "Incorrect filtering at %dms for slot %lu", entry.time_ms, 56 "Incorrect filtering at %dms for slot %zu", entry.time_ms,
57 slot); 57 slot);
58 return false; 58 return false;
59 } 59 }
60 } 60 }
61 61
62 start_index = i + 1; 62 start_index = i + 1;
63 touches.clear(); 63 touches.clear();
64 } 64 }
65 65
66 was_touching.set(entry.slot, entry.touching); 66 was_touching.set(entry.slot, entry.touching);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 {1000, 1, true, gfx::PointF(10, 10), false}, 145 {1000, 1, true, gfx::PointF(10, 10), false},
146 {2000, 1, true, gfx::PointF(10, 11), false}, 146 {2000, 1, true, gfx::PointF(10, 11), false},
147 {3000, 1, true, gfx::PointF(10, 10), false}, 147 {3000, 1, true, gfx::PointF(10, 10), false},
148 {4000, 1, true, gfx::PointF(10, 11), true}, 148 {4000, 1, true, gfx::PointF(10, 11), true},
149 {5000, 1, true, gfx::PointF(10, 10), true}, 149 {5000, 1, true, gfx::PointF(10, 10), true},
150 {6000, 1, true, gfx::PointF(10, 11), true}}; 150 {6000, 1, true, gfx::PointF(10, 11), true}};
151 EXPECT_TRUE(FilterAndCheck(kTestData, arraysize(kTestData))); 151 EXPECT_TRUE(FilterAndCheck(kTestData, arraysize(kTestData)));
152 } 152 }
153 153
154 } // namespace ui 154 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_device_test_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698