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

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 23882007: Explicit initialization of aura::Env for browser shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Using stricter ifdefs Created 7 years, 3 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/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 return handle_mouse_event_; 620 return handle_mouse_event_;
621 } 621 }
622 622
623 protected: 623 protected:
624 // testing::Test 624 // testing::Test
625 virtual void SetUp() { 625 virtual void SetUp() {
626 browser_context_.reset(new TestBrowserContext()); 626 browser_context_.reset(new TestBrowserContext());
627 delegate_.reset(new MockRenderWidgetHostDelegate()); 627 delegate_.reset(new MockRenderWidgetHostDelegate());
628 process_ = new RenderWidgetHostProcess(browser_context_.get()); 628 process_ = new RenderWidgetHostProcess(browser_context_.get());
629 #if defined(USE_AURA) 629 #if defined(USE_AURA)
630 aura::Env::CreateInstance();
630 screen_.reset(aura::TestScreen::Create()); 631 screen_.reset(aura::TestScreen::Create());
631 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 632 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
632 #endif 633 #endif
633 host_.reset( 634 host_.reset(
634 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE)); 635 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE));
635 view_.reset(new TestView(host_.get())); 636 view_.reset(new TestView(host_.get()));
636 host_->SetView(view_.get()); 637 host_->SetView(view_.get());
637 host_->Init(); 638 host_->Init();
638 } 639 }
639 virtual void TearDown() { 640 virtual void TearDown() {
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 2571
2571 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { 2572 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) {
2572 host_->SetupForInputRouterTest(); 2573 host_->SetupForInputRouterTest();
2573 2574
2574 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); 2575 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true));
2575 2576
2576 EXPECT_TRUE(host_->mock_input_router()->message_received_); 2577 EXPECT_TRUE(host_->mock_input_router()->message_received_);
2577 } 2578 }
2578 2579
2579 } // namespace content 2580 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698