OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/renderer_host/test/test_render_view_host.h" | 5 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
6 | 6 |
7 #include "base/gfx/rect.h" | 7 #include "base/gfx/rect.h" |
8 #include "chrome/browser/renderer_host/backing_store.h" | 8 #include "chrome/browser/renderer_host/backing_store.h" |
9 #include "chrome/browser/tab_contents/test_tab_contents.h" | 9 #include "chrome/browser/tab_contents/test_tab_contents.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 | 97 |
98 void RenderViewHostTestHarness::SetUp() { | 98 void RenderViewHostTestHarness::SetUp() { |
99 // See comment above profile_ decl for why we check for NULL here. | 99 // See comment above profile_ decl for why we check for NULL here. |
100 if (!profile_.get()) | 100 if (!profile_.get()) |
101 profile_.reset(new TestingProfile()); | 101 profile_.reset(new TestingProfile()); |
102 | 102 |
103 // This will be deleted when the TabContents goes away. | 103 // This will be deleted when the TabContents goes away. |
104 SiteInstance* instance = SiteInstance::CreateSiteInstance(profile_.get()); | 104 SiteInstance* instance = SiteInstance::CreateSiteInstance(profile_.get()); |
105 | 105 |
106 contents_.reset(new TestTabContents(profile_.get(), instance)); | 106 contents_.reset(new TestTabContents(profile_.get(), instance)); |
107 | |
108 user_data_manager_.reset(UserDataManager::Create()); | |
tony
2009/10/28 20:27:33
Is this supposed to be in this change?
jam
2009/10/28 20:31:08
Yeah, this is needed because of the change to new_
| |
107 } | 109 } |
108 | 110 |
109 void RenderViewHostTestHarness::TearDown() { | 111 void RenderViewHostTestHarness::TearDown() { |
110 contents_.reset(); | 112 contents_.reset(); |
111 | 113 |
112 // Make sure that we flush any messages related to TabContents destruction | 114 // Make sure that we flush any messages related to TabContents destruction |
113 // before we destroy the profile. | 115 // before we destroy the profile. |
114 MessageLoop::current()->RunAllPending(); | 116 MessageLoop::current()->RunAllPending(); |
115 } | 117 } |
OLD | NEW |