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

Side by Side Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 23272005: Fix missing const-reference on function parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); 162 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible));
163 EXPECT_TRUE(fully_visible); 163 EXPECT_TRUE(fully_visible);
164 164
165 // If the Find box has moved then we are done. 165 // If the Find box has moved then we are done.
166 if (position.x() != start_x_position) 166 if (position.x() != start_x_position)
167 return position.x(); 167 return position.x();
168 } 168 }
169 return start_x_position; 169 return start_x_position;
170 } 170 }
171 171
172 GURL GetURL(const std::string filename) { 172 GURL GetURL(const std::string& filename) {
173 return ui_test_utils::GetTestUrl( 173 return ui_test_utils::GetTestUrl(
174 base::FilePath().AppendASCII("find_in_page"), 174 base::FilePath().AppendASCII("find_in_page"),
175 base::FilePath().AppendASCII(filename)); 175 base::FilePath().AppendASCII(filename));
176 } 176 }
177 177
178 void FlushHistoryService() { 178 void FlushHistoryService() {
179 HistoryServiceFactory::GetForProfile( 179 HistoryServiceFactory::GetForProfile(
180 browser()->profile(), Profile::IMPLICIT_ACCESS)->FlushForTest( 180 browser()->profile(), Profile::IMPLICIT_ACCESS)->FlushForTest(
181 base::Bind(&base::MessageLoop::Quit, 181 base::Bind(&base::MessageLoop::Quit,
182 base::Unretained(base::MessageLoop::current()->current()))); 182 base::Unretained(base::MessageLoop::current()->current())));
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 1594
1595 EXPECT_TRUE(chrome::ExecuteCommand(browser_incognito, IDC_FIND_NEXT)); 1595 EXPECT_TRUE(chrome::ExecuteCommand(browser_incognito, IDC_FIND_NEXT));
1596 WebContents* web_contents_incognito = 1596 WebContents* web_contents_incognito =
1597 browser_incognito->tab_strip_model()->GetActiveWebContents(); 1597 browser_incognito->tab_strip_model()->GetActiveWebContents();
1598 ui_test_utils::FindInPageNotificationObserver observer( 1598 ui_test_utils::FindInPageNotificationObserver observer(
1599 web_contents_incognito); 1599 web_contents_incognito);
1600 observer.Wait(); 1600 observer.Wait();
1601 EXPECT_EQ(ASCIIToUTF16("bar"), 1601 EXPECT_EQ(ASCIIToUTF16("bar"),
1602 GetFindBarTextForBrowser(browser_incognito)); 1602 GetFindBarTextForBrowser(browser_incognito));
1603 } 1603 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698