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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
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 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 contents()->GetMainFrame()->OnMessageReceived( 1823 contents()->GetMainFrame()->OnMessageReceived(
1824 FrameHostMsg_BeforeUnload_ACK(0, false, now, now)); 1824 FrameHostMsg_BeforeUnload_ACK(0, false, now, now));
1825 EXPECT_FALSE(contents()->cross_navigation_pending()); 1825 EXPECT_FALSE(contents()->cross_navigation_pending());
1826 EXPECT_FALSE(rfh_deleted_observer.deleted()); 1826 EXPECT_FALSE(rfh_deleted_observer.deleted());
1827 } 1827 }
1828 } 1828 }
1829 1829
1830 // Test that a pending RenderFrameHost in a non-root frame tree node is properly 1830 // Test that a pending RenderFrameHost in a non-root frame tree node is properly
1831 // deleted when the node is detached. Motivated by http://crbug.com/441357 1831 // deleted when the node is detached. Motivated by http://crbug.com/441357
1832 TEST_F(RenderFrameHostManagerTest, DetachPendingChild) { 1832 TEST_F(RenderFrameHostManagerTest, DetachPendingChild) {
1833 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kSitePerProcess); 1833 base::CommandLine::ForCurrentProcess()->AppendSwitch(
1834 switches::kSitePerProcess);
1834 1835
1835 const GURL kUrl1("http://www.google.com/"); 1836 const GURL kUrl1("http://www.google.com/");
1836 const GURL kUrl2("http://webkit.org/"); 1837 const GURL kUrl2("http://webkit.org/");
1837 1838
1838 RenderFrameHostImpl* host = NULL; 1839 RenderFrameHostImpl* host = NULL;
1839 1840
1840 contents()->NavigateAndCommit(kUrl1); 1841 contents()->NavigateAndCommit(kUrl1);
1841 contents()->GetMainFrame()->OnCreateChildFrame( 1842 contents()->GetMainFrame()->OnCreateChildFrame(
1842 contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(), 1843 contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(),
1843 std::string("frame_name")); 1844 std::string("frame_name"));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 #if 0 1903 #if 0
1903 // TODO(nick): Currently a proxy to the removed frame lingers in the parent. 1904 // TODO(nick): Currently a proxy to the removed frame lingers in the parent.
1904 // Enable this assert below once the proxies to the subframe are correctly 1905 // Enable this assert below once the proxies to the subframe are correctly
1905 // cleaned up after detach. 1906 // cleaned up after detach.
1906 ASSERT_TRUE(site_instance->HasOneRef()) 1907 ASSERT_TRUE(site_instance->HasOneRef())
1907 << "This SiteInstance should be destroyable now."; 1908 << "This SiteInstance should be destroyable now.";
1908 #endif 1909 #endif
1909 } 1910 }
1910 1911
1911 } // namespace content 1912 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698