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

Side by Side Diff: chrome/browser/tabs/tab_strip_model_unittest.cc

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/tabs/tab_strip_model.h" 5 #include "chrome/browser/tabs/tab_strip_model.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 tab_contents->render_view_host()->site_instance(), MSG_ROUTING_NONE, 162 tab_contents->render_view_host()->site_instance(), MSG_ROUTING_NONE,
163 NULL, NULL); 163 NULL, NULL);
164 EXPECT_EQ(retval->tab_contents()->GetRenderProcessHost(), 164 EXPECT_EQ(retval->tab_contents()->GetRenderProcessHost(),
165 tab_contents->GetRenderProcessHost()); 165 tab_contents->GetRenderProcessHost());
166 return retval; 166 return retval;
167 } 167 }
168 168
169 // Forwards a URL "load" request through to our dummy TabContents 169 // Forwards a URL "load" request through to our dummy TabContents
170 // implementation. 170 // implementation.
171 void LoadURL(TabContents* con, const std::wstring& url) { 171 void LoadURL(TabContents* con, const std::wstring& url) {
172 controller().LoadURL(GURL(WideToUTF16(url)), GURL(), 172 controller().LoadURL(GURL(WideToUTF16(url)), content::Referrer(),
173 content::PAGE_TRANSITION_LINK, std::string()); 173 content::PAGE_TRANSITION_LINK, std::string());
174 } 174 }
175 175
176 void GoBack(TabContents* contents) { 176 void GoBack(TabContents* contents) {
177 controller().GoBack(); 177 controller().GoBack();
178 } 178 }
179 179
180 void GoForward(TabContents* contents) { 180 void GoForward(TabContents* contents) {
181 controller().GoForward(); 181 controller().GoForward();
182 } 182 }
(...skipping 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 ASSERT_EQ(1, observer.GetStateCount()); 2375 ASSERT_EQ(1, observer.GetStateCount());
2376 MockTabStripModelObserver::State s( 2376 MockTabStripModelObserver::State s(
2377 contents2, 1, MockTabStripModelObserver::SELECT); 2377 contents2, 1, MockTabStripModelObserver::SELECT);
2378 s.src_contents = contents2; 2378 s.src_contents = contents2;
2379 s.src_index = 1; 2379 s.src_index = 1;
2380 s.user_gesture = false; 2380 s.user_gesture = false;
2381 EXPECT_TRUE(observer.StateEquals(0, s)); 2381 EXPECT_TRUE(observer.StateEquals(0, s));
2382 strip.RemoveObserver(&observer); 2382 strip.RemoveObserver(&observer);
2383 strip.CloseAllTabs(); 2383 strip.CloseAllTabs();
2384 } 2384 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_contents_unittest.cc ('k') | chrome/browser/translate/translate_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698