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

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

Issue 1159183002: Improve process crash handling in RenderViewHost & mock RenderProcessHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for WebViewInteractiveUiTest.TextInputClientIsUpToDate Created 5 years, 6 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
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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 ImageTransportFactory::InitializeForUnitTests( 378 ImageTransportFactory::InitializeForUnitTests(
379 scoped_ptr<ImageTransportFactory>( 379 scoped_ptr<ImageTransportFactory>(
380 new NoTransportImageTransportFactory)); 380 new NoTransportImageTransportFactory));
381 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); 381 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
382 aura_test_helper_->SetUp( 382 aura_test_helper_->SetUp(
383 ImageTransportFactory::GetInstance()->GetContextFactory()); 383 ImageTransportFactory::GetInstance()->GetContextFactory());
384 new wm::DefaultActivationClient(aura_test_helper_->root_window()); 384 new wm::DefaultActivationClient(aura_test_helper_->root_window());
385 385
386 browser_context_.reset(new TestBrowserContext); 386 browser_context_.reset(new TestBrowserContext);
387 process_host_ = new MockRenderProcessHost(browser_context_.get()); 387 process_host_ = new MockRenderProcessHost(browser_context_.get());
388 process_host_->Init();
388 389
389 sink_ = &process_host_->sink(); 390 sink_ = &process_host_->sink();
390 391
391 parent_host_ = new RenderWidgetHostImpl( 392 parent_host_ = new RenderWidgetHostImpl(
392 &delegate_, process_host_, MSG_ROUTING_NONE, false); 393 &delegate_, process_host_, MSG_ROUTING_NONE, false);
393 parent_view_ = new RenderWidgetHostViewAura(parent_host_, 394 parent_view_ = new RenderWidgetHostViewAura(parent_host_,
394 is_guest_view_hack_); 395 is_guest_view_hack_);
395 parent_view_->InitAsChild(NULL); 396 parent_view_->InitAsChild(NULL);
396 aura::client::ParentWindowWithContext(parent_view_->GetNativeView(), 397 aura::client::ParentWindowWithContext(parent_view_->GetNativeView(),
397 aura_test_helper_->root_window(), 398 aura_test_helper_->root_window(),
(...skipping 3099 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 ViewMsg_SetSurfaceIdNamespace::Read(msg, &params); 3498 ViewMsg_SetSurfaceIdNamespace::Read(msg, &params);
3498 view_->InitAsChild(NULL); 3499 view_->InitAsChild(NULL);
3499 view_->Show(); 3500 view_->Show();
3500 view_->SetSize(size); 3501 view_->SetSize(size);
3501 view_->OnSwapCompositorFrame(0, 3502 view_->OnSwapCompositorFrame(0,
3502 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); 3503 MakeDelegatedFrame(1.f, size, gfx::Rect(size)));
3503 EXPECT_EQ(view_->GetSurfaceIdNamespace(), get<0>(params)); 3504 EXPECT_EQ(view_->GetSurfaceIdNamespace(), get<0>(params));
3504 } 3505 }
3505 3506
3506 } // namespace content 3507 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698