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

Side by Side Diff: content/browser/renderer_host/input/input_router_impl_unittest.cc

Issue 1398153002: Don't use base::MessageLoop::{Quit,QuitClosure} in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <math.h> 5 #include <math.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 326
327 size_t GetSentMessageCountAndResetSink() { 327 size_t GetSentMessageCountAndResetSink() {
328 size_t count = process_->sink().message_count(); 328 size_t count = process_->sink().message_count();
329 process_->sink().ClearMessages(); 329 process_->sink().ClearMessages();
330 return count; 330 return count;
331 } 331 }
332 332
333 static void RunTasksAndWait(base::TimeDelta delay) { 333 static void RunTasksAndWait(base::TimeDelta delay) {
334 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 334 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
335 FROM_HERE, base::MessageLoop::QuitClosure(), delay); 335 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(), delay);
336 base::MessageLoop::current()->Run(); 336 base::MessageLoop::current()->Run();
337 } 337 }
338 338
339 InputRouterImpl::Config config_; 339 InputRouterImpl::Config config_;
340 scoped_ptr<MockRenderProcessHost> process_; 340 scoped_ptr<MockRenderProcessHost> process_;
341 scoped_ptr<MockInputRouterClient> client_; 341 scoped_ptr<MockInputRouterClient> client_;
342 scoped_ptr<MockInputAckHandler> ack_handler_; 342 scoped_ptr<MockInputAckHandler> ack_handler_;
343 scoped_ptr<InputRouterImpl> input_router_; 343 scoped_ptr<InputRouterImpl> input_router_;
344 344
345 private: 345 private:
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 client_overscroll = client_->GetAndResetOverscroll(); 1829 client_overscroll = client_->GetAndResetOverscroll();
1830 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, 1830 EXPECT_EQ(wheel_overscroll.accumulated_overscroll,
1831 client_overscroll.accumulated_overscroll); 1831 client_overscroll.accumulated_overscroll);
1832 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, 1832 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta,
1833 client_overscroll.latest_overscroll_delta); 1833 client_overscroll.latest_overscroll_delta);
1834 EXPECT_EQ(wheel_overscroll.current_fling_velocity, 1834 EXPECT_EQ(wheel_overscroll.current_fling_velocity,
1835 client_overscroll.current_fling_velocity); 1835 client_overscroll.current_fling_velocity);
1836 } 1836 }
1837 1837
1838 } // namespace content 1838 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698