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

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

Issue 10492009: Move test headers from content\test to content\public\test. This way we can enforce that internal c… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 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 | 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.h" 8 #include "base/message_loop.h"
9 #include "content/browser/renderer_host/render_widget_host_delegate.h" 9 #include "content/browser/renderer_host/render_widget_host_delegate.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
11 #include "content/public/browser/render_widget_host_view.h" 11 #include "content/public/browser/render_widget_host_view.h"
12 #include "content/public/test/mock_render_process_host.h" 12 #include "content/public/test/mock_render_process_host.h"
13 #include "content/test/test_browser_context.h" 13 #include "content/public/test/test_browser_context.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "ui/aura/client/aura_constants.h" 15 #include "ui/aura/client/aura_constants.h"
16 #include "ui/aura/env.h" 16 #include "ui/aura/env.h"
17 #include "ui/aura/test/aura_test_helper.h" 17 #include "ui/aura/test/aura_test_helper.h"
18 #include "ui/aura/test/test_window_delegate.h" 18 #include "ui/aura/test/test_window_delegate.h"
19 #include "ui/aura/window.h" 19 #include "ui/aura/window.h"
20 #include "ui/aura/window_observer.h" 20 #include "ui/aura/window_observer.h"
21 #include "ui/base/ui_base_types.h" 21 #include "ui/base/ui_base_types.h"
22 22
23 class MockRenderWidgetHostDelegate : public content::RenderWidgetHostDelegate { 23 class MockRenderWidgetHostDelegate : public content::RenderWidgetHostDelegate {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 }; 58 };
59 59
60 class RenderWidgetHostViewAuraTest : public testing::Test { 60 class RenderWidgetHostViewAuraTest : public testing::Test {
61 public: 61 public:
62 RenderWidgetHostViewAuraTest() {} 62 RenderWidgetHostViewAuraTest() {}
63 63
64 virtual void SetUp() { 64 virtual void SetUp() {
65 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); 65 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
66 aura_test_helper_->SetUp(); 66 aura_test_helper_->SetUp();
67 67
68 browser_context_.reset(new TestBrowserContext); 68 browser_context_.reset(new content::TestBrowserContext);
69 content::MockRenderProcessHost* process_host = 69 content::MockRenderProcessHost* process_host =
70 new content::MockRenderProcessHost(browser_context_.get()); 70 new content::MockRenderProcessHost(browser_context_.get());
71 widget_host_ = new content::RenderWidgetHostImpl( 71 widget_host_ = new content::RenderWidgetHostImpl(
72 &delegate_, process_host, MSG_ROUTING_NONE); 72 &delegate_, process_host, MSG_ROUTING_NONE);
73 view_ = static_cast<RenderWidgetHostViewAura*>( 73 view_ = static_cast<RenderWidgetHostViewAura*>(
74 content::RenderWidgetHostView::CreateViewForWidget(widget_host_)); 74 content::RenderWidgetHostView::CreateViewForWidget(widget_host_));
75 } 75 }
76 76
77 virtual void TearDown() { 77 virtual void TearDown() {
78 if (view_) 78 if (view_)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 sibling->Init(ui::LAYER_TEXTURED); 133 sibling->Init(ui::LAYER_TEXTURED);
134 sibling->Show(); 134 sibling->Show();
135 window->parent()->AddChild(sibling.get()); 135 window->parent()->AddChild(sibling.get());
136 sibling->Focus(); 136 sibling->Focus();
137 ASSERT_TRUE(sibling->HasFocus()); 137 ASSERT_TRUE(sibling->HasFocus());
138 ASSERT_TRUE(observer.destroyed()); 138 ASSERT_TRUE(observer.destroyed());
139 139
140 widget_host_ = NULL; 140 widget_host_ = NULL;
141 view_ = NULL; 141 view_ = NULL;
142 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698