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

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

Issue 293093010: Rename RenderProcessHost::IsGuest to RenderProcessHost::IsIsolatedGuest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_isguest_chrome_callsites
Patch Set: Fixed interactive_ui_tests build Created 6 years, 6 months 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 1211
1212 const GURL url1("http://foo1"); 1212 const GURL url1("http://foo1");
1213 controller.LoadURL(url1, Referrer(), PAGE_TRANSITION_TYPED, std::string()); 1213 controller.LoadURL(url1, Referrer(), PAGE_TRANSITION_TYPED, std::string());
1214 main_test_rfh()->SendNavigate(0, url1); 1214 main_test_rfh()->SendNavigate(0, url1);
1215 ASSERT_TRUE(controller.GetVisibleEntry()); 1215 ASSERT_TRUE(controller.GetVisibleEntry());
1216 1216
1217 // Make the entry believe its RenderProcessHost is a guest. 1217 // Make the entry believe its RenderProcessHost is a guest.
1218 NavigationEntryImpl* entry1 = 1218 NavigationEntryImpl* entry1 =
1219 NavigationEntryImpl::FromNavigationEntry(controller.GetVisibleEntry()); 1219 NavigationEntryImpl::FromNavigationEntry(controller.GetVisibleEntry());
1220 reinterpret_cast<MockRenderProcessHost*>( 1220 reinterpret_cast<MockRenderProcessHost*>(
1221 entry1->site_instance()->GetProcess())->SetIsGuest(true); 1221 entry1->site_instance()->GetProcess())->set_is_isolated_guest(true);
1222 1222
1223 // And reload. 1223 // And reload.
1224 controller.Reload(true); 1224 controller.Reload(true);
1225 1225
1226 // The reload is pending. Check that the NavigationEntry didn't get replaced 1226 // The reload is pending. Check that the NavigationEntry didn't get replaced
1227 // because of having the wrong process. 1227 // because of having the wrong process.
1228 EXPECT_EQ(controller.GetEntryCount(), 1); 1228 EXPECT_EQ(controller.GetEntryCount(), 1);
1229 EXPECT_EQ(controller.GetLastCommittedEntryIndex(), 0); 1229 EXPECT_EQ(controller.GetLastCommittedEntryIndex(), 0);
1230 EXPECT_EQ(controller.GetPendingEntryIndex(), 0); 1230 EXPECT_EQ(controller.GetPendingEntryIndex(), 0);
1231 1231
(...skipping 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after
4218 EXPECT_EQ(1, controller.GetEntryCount()); 4218 EXPECT_EQ(1, controller.GetEntryCount());
4219 EXPECT_EQ(0, controller.GetCurrentEntryIndex()); 4219 EXPECT_EQ(0, controller.GetCurrentEntryIndex());
4220 EXPECT_EQ(0, controller.GetLastCommittedEntryIndex()); 4220 EXPECT_EQ(0, controller.GetLastCommittedEntryIndex());
4221 EXPECT_EQ(-1, controller.GetPendingEntryIndex()); 4221 EXPECT_EQ(-1, controller.GetPendingEntryIndex());
4222 EXPECT_FALSE(controller.CanGoBack()); 4222 EXPECT_FALSE(controller.CanGoBack());
4223 EXPECT_FALSE(controller.CanGoForward()); 4223 EXPECT_FALSE(controller.CanGoForward());
4224 EXPECT_EQ(url4, controller.GetVisibleEntry()->GetURL()); 4224 EXPECT_EQ(url4, controller.GetVisibleEntry()->GetURL());
4225 } 4225 }
4226 4226
4227 } // namespace content 4227 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698