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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 io_thread_(BrowserThread::IO, &message_loop_) { | 239 io_thread_(BrowserThread::IO, &message_loop_) { |
240 } | 240 } |
241 | 241 |
242 virtual void SetUp() { | 242 virtual void SetUp() { |
243 RenderViewHostImplTestHarness::SetUp(); | 243 RenderViewHostImplTestHarness::SetUp(); |
244 WebUIControllerFactory::RegisterFactory(&factory_); | 244 WebUIControllerFactory::RegisterFactory(&factory_); |
245 } | 245 } |
246 | 246 |
247 virtual void TearDown() { | 247 virtual void TearDown() { |
248 RenderViewHostImplTestHarness::TearDown(); | 248 RenderViewHostImplTestHarness::TearDown(); |
249 WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); | 249 WebUIControllerFactoryRegistry::UnregisterFactoryForTesting(&factory_); |
250 } | 250 } |
251 | 251 |
252 private: | 252 private: |
253 WebContentsImplTestWebUIControllerFactory factory_; | 253 WebContentsImplTestWebUIControllerFactory factory_; |
254 TestBrowserThread ui_thread_; | 254 TestBrowserThread ui_thread_; |
255 TestBrowserThread file_user_blocking_thread_; | 255 TestBrowserThread file_user_blocking_thread_; |
256 TestBrowserThread io_thread_; | 256 TestBrowserThread io_thread_; |
257 }; | 257 }; |
258 | 258 |
259 class TestWebContentsObserver : public WebContentsObserver { | 259 class TestWebContentsObserver : public WebContentsObserver { |
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1970 other_contents->NavigateAndCommit(url_normalized); | 1970 other_contents->NavigateAndCommit(url_normalized); |
1971 | 1971 |
1972 // Check that an IPC with about:whatever is correctly normalized. | 1972 // Check that an IPC with about:whatever is correctly normalized. |
1973 other_contents->TestDidFailLoadWithError( | 1973 other_contents->TestDidFailLoadWithError( |
1974 1, url_from_ipc, true, 1, string16()); | 1974 1, url_from_ipc, true, 1, string16()); |
1975 EXPECT_EQ(url_normalized, other_observer.last_url()); | 1975 EXPECT_EQ(url_normalized, other_observer.last_url()); |
1976 } | 1976 } |
1977 | 1977 |
1978 | 1978 |
1979 } // namespace content | 1979 } // namespace content |
OLD | NEW |