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

Side by Side Diff: content/browser/renderer_host/render_widget_host_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 virtual void SetUp() { 600 virtual void SetUp() {
601 CommandLine* command_line = CommandLine::ForCurrentProcess(); 601 CommandLine* command_line = CommandLine::ForCurrentProcess();
602 command_line->AppendSwitch(switches::kValidateInputEventStream); 602 command_line->AppendSwitch(switches::kValidateInputEventStream);
603 603
604 browser_context_.reset(new TestBrowserContext()); 604 browser_context_.reset(new TestBrowserContext());
605 delegate_.reset(new MockRenderWidgetHostDelegate()); 605 delegate_.reset(new MockRenderWidgetHostDelegate());
606 process_ = new RenderWidgetHostProcess(browser_context_.get()); 606 process_ = new RenderWidgetHostProcess(browser_context_.get());
607 #if defined(USE_AURA) 607 #if defined(USE_AURA)
608 ImageTransportFactory::InitializeForUnitTests( 608 ImageTransportFactory::InitializeForUnitTests(
609 scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory)); 609 scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory));
610 aura::Env::CreateInstance(); 610 aura::Env::CreateInstance(true);
611 screen_.reset(aura::TestScreen::Create()); 611 screen_.reset(aura::TestScreen::Create());
612 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 612 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
613 #endif 613 #endif
614 host_.reset( 614 host_.reset(
615 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE)); 615 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE));
616 view_.reset(new TestView(host_.get())); 616 view_.reset(new TestView(host_.get()));
617 host_->SetView(view_.get()); 617 host_->SetView(view_.get());
618 host_->Init(); 618 host_->Init();
619 } 619 }
620 virtual void TearDown() { 620 virtual void TearDown() {
(...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 2675
2676 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). 2676 // Tests RWHI::ForwardTouchEventWithLatencyInfo().
2677 PressTouchPoint(0, 1); 2677 PressTouchPoint(0, 1);
2678 SendTouchEvent(); 2678 SendTouchEvent();
2679 CheckLatencyInfoComponentInMessage( 2679 CheckLatencyInfoComponentInMessage(
2680 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); 2680 process_, GetLatencyComponentId(), WebInputEvent::TouchStart);
2681 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); 2681 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED);
2682 } 2682 }
2683 2683
2684 } // namespace content 2684 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/touch_emulator_unittest.cc ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698