OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/browser/frame_host/cross_site_transferring_request.h" | 10 #include "content/browser/frame_host/cross_site_transferring_request.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } | 290 } |
291 std::set<std::pair<int, int> > live_routes_; | 291 std::set<std::pair<int, int> > live_routes_; |
292 std::set<std::pair<int, int> > deleted_routes_; | 292 std::set<std::pair<int, int> > deleted_routes_; |
293 }; | 293 }; |
294 | 294 |
295 } // namespace | 295 } // namespace |
296 | 296 |
297 class RenderFrameHostManagerTest | 297 class RenderFrameHostManagerTest |
298 : public RenderViewHostImplTestHarness { | 298 : public RenderViewHostImplTestHarness { |
299 public: | 299 public: |
300 virtual void SetUp() override { | 300 void SetUp() override { |
301 RenderViewHostImplTestHarness::SetUp(); | 301 RenderViewHostImplTestHarness::SetUp(); |
302 WebUIControllerFactory::RegisterFactory(&factory_); | 302 WebUIControllerFactory::RegisterFactory(&factory_); |
303 lifetime_checker_.reset(new FrameLifetimeConsistencyChecker(contents())); | 303 lifetime_checker_.reset(new FrameLifetimeConsistencyChecker(contents())); |
304 } | 304 } |
305 | 305 |
306 virtual void TearDown() override { | 306 void TearDown() override { |
307 lifetime_checker_.reset(); | 307 lifetime_checker_.reset(); |
308 RenderViewHostImplTestHarness::TearDown(); | 308 RenderViewHostImplTestHarness::TearDown(); |
309 WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); | 309 WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); |
310 } | 310 } |
311 | 311 |
312 void set_should_create_webui(bool should_create_webui) { | 312 void set_should_create_webui(bool should_create_webui) { |
313 factory_.set_should_create_webui(should_create_webui); | 313 factory_.set_should_create_webui(should_create_webui); |
314 } | 314 } |
315 | 315 |
316 void NavigateActiveAndCommit(const GURL& url) { | 316 void NavigateActiveAndCommit(const GURL& url) { |
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 pending_rfh->GetSiteInstance()->increment_active_frame_count(); | 1796 pending_rfh->GetSiteInstance()->increment_active_frame_count(); |
1797 | 1797 |
1798 contents()->GetMainFrame()->OnMessageReceived( | 1798 contents()->GetMainFrame()->OnMessageReceived( |
1799 FrameHostMsg_BeforeUnload_ACK(0, false, now, now)); | 1799 FrameHostMsg_BeforeUnload_ACK(0, false, now, now)); |
1800 EXPECT_FALSE(contents()->cross_navigation_pending()); | 1800 EXPECT_FALSE(contents()->cross_navigation_pending()); |
1801 EXPECT_FALSE(rfh_deleted_observer.deleted()); | 1801 EXPECT_FALSE(rfh_deleted_observer.deleted()); |
1802 } | 1802 } |
1803 } | 1803 } |
1804 | 1804 |
1805 } // namespace content | 1805 } // namespace content |
OLD | NEW |