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

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

Issue 23129015: Initialize RenderWidget(Host)(View)s with correct visibility state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 "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/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/renderer_host/render_widget_host_delegate.h" 10 #include "content/browser/renderer_host/render_widget_host_delegate.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); 77 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
78 aura_test_helper_->SetUp(); 78 aura_test_helper_->SetUp();
79 79
80 browser_context_.reset(new TestBrowserContext); 80 browser_context_.reset(new TestBrowserContext);
81 MockRenderProcessHost* process_host = 81 MockRenderProcessHost* process_host =
82 new MockRenderProcessHost(browser_context_.get()); 82 new MockRenderProcessHost(browser_context_.get());
83 83
84 sink_ = &process_host->sink(); 84 sink_ = &process_host->sink();
85 85
86 parent_host_ = new RenderWidgetHostImpl( 86 parent_host_ = new RenderWidgetHostImpl(
87 &delegate_, process_host, MSG_ROUTING_NONE); 87 &delegate_, process_host, MSG_ROUTING_NONE, false);
88 parent_view_ = static_cast<RenderWidgetHostViewAura*>( 88 parent_view_ = static_cast<RenderWidgetHostViewAura*>(
89 RenderWidgetHostView::CreateViewForWidget(parent_host_)); 89 RenderWidgetHostView::CreateViewForWidget(parent_host_));
90 parent_view_->InitAsChild(NULL); 90 parent_view_->InitAsChild(NULL);
91 parent_view_->GetNativeView()->SetDefaultParentByRootWindow( 91 parent_view_->GetNativeView()->SetDefaultParentByRootWindow(
92 aura_test_helper_->root_window(), gfx::Rect()); 92 aura_test_helper_->root_window(), gfx::Rect());
93 93
94 widget_host_ = new RenderWidgetHostImpl( 94 widget_host_ = new RenderWidgetHostImpl(
95 &delegate_, process_host, MSG_ROUTING_NONE); 95 &delegate_, process_host, MSG_ROUTING_NONE, false);
96 widget_host_->Init(); 96 widget_host_->Init();
97 view_ = static_cast<RenderWidgetHostViewAura*>( 97 view_ = static_cast<RenderWidgetHostViewAura*>(
98 RenderWidgetHostView::CreateViewForWidget(widget_host_)); 98 RenderWidgetHostView::CreateViewForWidget(widget_host_));
99 } 99 }
100 100
101 virtual void TearDown() { 101 virtual void TearDown() {
102 sink_ = NULL; 102 sink_ = NULL;
103 if (view_) 103 if (view_)
104 view_->Destroy(); 104 view_->Destroy();
105 delete widget_host_; 105 delete widget_host_;
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 EXPECT_EQ(ViewMsg_Resize::ID, msg->type()); 578 EXPECT_EQ(ViewMsg_Resize::ID, msg->type());
579 ViewMsg_Resize::Param params; 579 ViewMsg_Resize::Param params;
580 ViewMsg_Resize::Read(msg, &params); 580 ViewMsg_Resize::Read(msg, &params);
581 EXPECT_EQ("0,0 1600x1200", 581 EXPECT_EQ("0,0 1600x1200",
582 gfx::Rect(params.a.screen_info.availableRect).ToString()); 582 gfx::Rect(params.a.screen_info.availableRect).ToString());
583 EXPECT_EQ("1600x1200", params.a.new_size.ToString()); 583 EXPECT_EQ("1600x1200", params.a.new_size.ToString());
584 } 584 }
585 } 585 }
586 586
587 } // namespace content 587 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698