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

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: Fix chrome_frame_net_tests Created 7 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 | 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 return handle_mouse_event_; 619 return handle_mouse_event_;
620 } 620 }
621 621
622 protected: 622 protected:
623 // testing::Test 623 // testing::Test
624 virtual void SetUp() { 624 virtual void SetUp() {
625 browser_context_.reset(new TestBrowserContext()); 625 browser_context_.reset(new TestBrowserContext());
626 delegate_.reset(new MockRenderWidgetHostDelegate()); 626 delegate_.reset(new MockRenderWidgetHostDelegate());
627 process_ = new RenderWidgetHostProcess(browser_context_.get()); 627 process_ = new RenderWidgetHostProcess(browser_context_.get());
628 #if defined(USE_AURA) 628 #if defined(USE_AURA)
629 aura::Env::CreateInstance();
629 screen_.reset(aura::TestScreen::Create()); 630 screen_.reset(aura::TestScreen::Create());
630 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 631 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
631 #endif 632 #endif
632 host_.reset( 633 host_.reset(
633 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE)); 634 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE));
634 view_.reset(new TestView(host_.get())); 635 view_.reset(new TestView(host_.get()));
635 host_->SetView(view_.get()); 636 host_->SetView(view_.get());
636 host_->Init(); 637 host_->Init();
637 } 638 }
638 virtual void TearDown() { 639 virtual void TearDown() {
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 2582
2582 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { 2583 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) {
2583 host_->SetupForInputRouterTest(); 2584 host_->SetupForInputRouterTest();
2584 2585
2585 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); 2586 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true));
2586 2587
2587 EXPECT_TRUE(host_->mock_input_router()->message_received_); 2588 EXPECT_TRUE(host_->mock_input_router()->message_received_);
2588 } 2589 }
2589 2590
2590 } // namespace content 2591 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698