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

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

Issue 679243002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 25 matching lines...) Expand all
36 : shift_pressed_(false), 36 : shift_pressed_(false),
37 mouse_pressed_(false), 37 mouse_pressed_(false),
38 ack_touches_synchronously_(true), 38 ack_touches_synchronously_(true),
39 last_mouse_x_(-1), 39 last_mouse_x_(-1),
40 last_mouse_y_(-1) { 40 last_mouse_y_(-1) {
41 last_event_time_seconds_ = 41 last_event_time_seconds_ =
42 (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF(); 42 (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF();
43 event_time_delta_seconds_ = 0.1; 43 event_time_delta_seconds_ = 0.1;
44 } 44 }
45 45
46 virtual ~TouchEmulatorTest() {} 46 ~TouchEmulatorTest() override {}
47 47
48 // testing::Test 48 // testing::Test
49 virtual void SetUp() override { 49 void SetUp() override {
50 #if defined(USE_AURA) 50 #if defined(USE_AURA)
51 aura::Env::CreateInstance(true); 51 aura::Env::CreateInstance(true);
52 screen_.reset(aura::TestScreen::Create(gfx::Size())); 52 screen_.reset(aura::TestScreen::Create(gfx::Size()));
53 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 53 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
54 #endif 54 #endif
55 55
56 emulator_.reset(new TouchEmulator(this)); 56 emulator_.reset(new TouchEmulator(this));
57 emulator_->Enable(); 57 emulator_->Enable();
58 } 58 }
59 59
60 virtual void TearDown() override { 60 void TearDown() override {
61 emulator_->Disable(); 61 emulator_->Disable();
62 EXPECT_EQ("", ExpectedEvents()); 62 EXPECT_EQ("", ExpectedEvents());
63 63
64 #if defined(USE_AURA) 64 #if defined(USE_AURA)
65 aura::Env::DeleteInstance(); 65 aura::Env::DeleteInstance();
66 screen_.reset(); 66 screen_.reset();
67 #endif 67 #endif
68 } 68 }
69 69
70 void ForwardGestureEvent(const blink::WebGestureEvent& event) override { 70 void ForwardGestureEvent(const blink::WebGestureEvent& event) override {
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 MouseDown(100, 200); 514 MouseDown(100, 200);
515 EXPECT_EQ("TouchStart GestureTapDown", ExpectedEvents()); 515 EXPECT_EQ("TouchStart GestureTapDown", ExpectedEvents());
516 MouseUp(200, 200); 516 MouseUp(200, 200);
517 EXPECT_EQ( 517 EXPECT_EQ(
518 "TouchMove GestureTapCancel GestureScrollBegin GestureScrollUpdate" 518 "TouchMove GestureTapCancel GestureScrollBegin GestureScrollUpdate"
519 " TouchEnd GestureScrollEnd", 519 " TouchEnd GestureScrollEnd",
520 ExpectedEvents()); 520 ExpectedEvents());
521 } 521 }
522 522
523 } // namespace content 523 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698