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

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: Rebased no-op 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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 return handle_mouse_event_; 616 return handle_mouse_event_;
617 } 617 }
618 618
619 protected: 619 protected:
620 // testing::Test 620 // testing::Test
621 virtual void SetUp() { 621 virtual void SetUp() {
622 browser_context_.reset(new TestBrowserContext()); 622 browser_context_.reset(new TestBrowserContext());
623 delegate_.reset(new MockRenderWidgetHostDelegate()); 623 delegate_.reset(new MockRenderWidgetHostDelegate());
624 process_ = new RenderWidgetHostProcess(browser_context_.get()); 624 process_ = new RenderWidgetHostProcess(browser_context_.get());
625 #if defined(USE_AURA) 625 #if defined(USE_AURA)
626 aura::Env::CreateInstance();
626 screen_.reset(aura::TestScreen::Create()); 627 screen_.reset(aura::TestScreen::Create());
627 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 628 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
628 #endif 629 #endif
629 host_.reset( 630 host_.reset(
630 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE)); 631 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE));
631 view_.reset(new TestView(host_.get())); 632 view_.reset(new TestView(host_.get()));
632 host_->SetView(view_.get()); 633 host_->SetView(view_.get());
633 host_->Init(); 634 host_->Init();
634 } 635 }
635 virtual void TearDown() { 636 virtual void TearDown() {
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 2523
2523 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { 2524 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) {
2524 host_->SetupForInputRouterTest(); 2525 host_->SetupForInputRouterTest();
2525 2526
2526 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); 2527 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true));
2527 2528
2528 EXPECT_TRUE(host_->mock_input_router()->message_received_); 2529 EXPECT_TRUE(host_->mock_input_router()->message_received_);
2529 } 2530 }
2530 2531
2531 } // namespace content 2532 } // namespace content
OLDNEW
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.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