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

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

Issue 262883011: Makes PlatformEventSource creation in Env conditional (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 28 matching lines...) Expand all
39 last_event_time_seconds_ = 39 last_event_time_seconds_ =
40 (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF(); 40 (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF();
41 event_time_delta_seconds_ = 0.1; 41 event_time_delta_seconds_ = 0.1;
42 } 42 }
43 43
44 virtual ~TouchEmulatorTest() {} 44 virtual ~TouchEmulatorTest() {}
45 45
46 // testing::Test 46 // testing::Test
47 virtual void SetUp() OVERRIDE { 47 virtual void SetUp() OVERRIDE {
48 #if defined(USE_AURA) 48 #if defined(USE_AURA)
49 aura::Env::CreateInstance(); 49 aura::Env::CreateInstance(true);
50 screen_.reset(aura::TestScreen::Create()); 50 screen_.reset(aura::TestScreen::Create());
51 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 51 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
52 #endif 52 #endif
53 53
54 emulator_.reset(new TouchEmulator(this)); 54 emulator_.reset(new TouchEmulator(this));
55 emulator_->Enable(true /* allow_pinch */); 55 emulator_->Enable(true /* allow_pinch */);
56 } 56 }
57 57
58 virtual void TearDown() OVERRIDE { 58 virtual void TearDown() OVERRIDE {
59 emulator_->Disable(); 59 emulator_->Disable();
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 EXPECT_EQ( 311 EXPECT_EQ(
312 "TouchMove GestureScrollUpdate", 312 "TouchMove GestureScrollUpdate",
313 ExpectedEvents()); 313 ExpectedEvents());
314 MouseUp(400, 200); 314 MouseUp(400, 200);
315 EXPECT_EQ( 315 EXPECT_EQ(
316 "TouchEnd GestureScrollEnd", 316 "TouchEnd GestureScrollEnd",
317 ExpectedEvents()); 317 ExpectedEvents());
318 } 318 }
319 319
320 } // namespace content 320 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698