OLD | NEW |
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/logging.h" | 5 #include "base/logging.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "content/browser/renderer_host/render_view_host_impl.h" | 7 #include "content/browser/renderer_host/render_view_host_impl.h" |
8 #include "content/browser/renderer_host/test_render_view_host.h" | 8 #include "content/browser/renderer_host/test_render_view_host.h" |
9 #include "content/browser/site_instance_impl.h" | 9 #include "content/browser/site_instance_impl.h" |
10 #include "content/browser/web_contents/interstitial_page_impl.h" | 10 #include "content/browser/web_contents/interstitial_page_impl.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 io_thread_(BrowserThread::IO, &message_loop_) { | 246 io_thread_(BrowserThread::IO, &message_loop_) { |
247 } | 247 } |
248 | 248 |
249 virtual void SetUp() { | 249 virtual void SetUp() { |
250 RenderViewHostImplTestHarness::SetUp(); | 250 RenderViewHostImplTestHarness::SetUp(); |
251 WebUIControllerFactory::RegisterFactory(&factory_); | 251 WebUIControllerFactory::RegisterFactory(&factory_); |
252 } | 252 } |
253 | 253 |
254 virtual void TearDown() { | 254 virtual void TearDown() { |
255 RenderViewHostImplTestHarness::TearDown(); | 255 RenderViewHostImplTestHarness::TearDown(); |
256 WebUIControllerFactoryRegistry::UnregisterFactoryForTesting(&factory_); | 256 WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); |
257 } | 257 } |
258 | 258 |
259 private: | 259 private: |
260 WebContentsImplTestWebUIControllerFactory factory_; | 260 WebContentsImplTestWebUIControllerFactory factory_; |
261 TestBrowserThread ui_thread_; | 261 TestBrowserThread ui_thread_; |
262 TestBrowserThread file_user_blocking_thread_; | 262 TestBrowserThread file_user_blocking_thread_; |
263 TestBrowserThread io_thread_; | 263 TestBrowserThread io_thread_; |
264 }; | 264 }; |
265 | 265 |
266 class TestWebContentsObserver : public WebContentsObserver { | 266 class TestWebContentsObserver : public WebContentsObserver { |
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 other_contents->NavigateAndCommit(url_normalized); | 1977 other_contents->NavigateAndCommit(url_normalized); |
1978 | 1978 |
1979 // Check that an IPC with about:whatever is correctly normalized. | 1979 // Check that an IPC with about:whatever is correctly normalized. |
1980 other_contents->TestDidFailLoadWithError( | 1980 other_contents->TestDidFailLoadWithError( |
1981 1, url_from_ipc, true, 1, string16()); | 1981 1, url_from_ipc, true, 1, string16()); |
1982 EXPECT_EQ(url_normalized, other_observer.last_url()); | 1982 EXPECT_EQ(url_normalized, other_observer.last_url()); |
1983 } | 1983 } |
1984 | 1984 |
1985 | 1985 |
1986 } // namespace content | 1986 } // namespace content |
OLD | NEW |