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

Side by Side Diff: chrome/browser/ui/browser_focus_uitest.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 }; 165 };
166 166
167 class TestInterstitialPage : public content::InterstitialPageDelegate { 167 class TestInterstitialPage : public content::InterstitialPageDelegate {
168 public: 168 public:
169 TestInterstitialPage(WebContents* tab, bool new_navigation, const GURL& url) { 169 TestInterstitialPage(WebContents* tab, bool new_navigation, const GURL& url) {
170 base::FilePath file_path; 170 base::FilePath file_path;
171 bool r = PathService::Get(chrome::DIR_TEST_DATA, &file_path); 171 bool r = PathService::Get(chrome::DIR_TEST_DATA, &file_path);
172 EXPECT_TRUE(r); 172 EXPECT_TRUE(r);
173 file_path = file_path.AppendASCII("focus"); 173 file_path = file_path.AppendASCII("focus");
174 file_path = file_path.AppendASCII(kTypicalPageName); 174 file_path = file_path.AppendASCII(kTypicalPageName);
175 r = file_util::ReadFileToString(file_path, &html_contents_); 175 r = base::ReadFileToString(file_path, &html_contents_);
176 EXPECT_TRUE(r); 176 EXPECT_TRUE(r);
177 interstitial_page_ = InterstitialPage::Create( 177 interstitial_page_ = InterstitialPage::Create(
178 tab, new_navigation, url , this); 178 tab, new_navigation, url , this);
179 interstitial_page_->Show(); 179 interstitial_page_->Show();
180 } 180 }
181 181
182 virtual std::string GetHTMLContents() OVERRIDE { 182 virtual std::string GetHTMLContents() OVERRIDE {
183 return html_contents_; 183 return html_contents_;
184 } 184 }
185 185
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 940 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
941 content::NotificationService::AllSources()); 941 content::NotificationService::AllSources());
942 chrome::GoForward(browser(), CURRENT_TAB); 942 chrome::GoForward(browser(), CURRENT_TAB);
943 forward_nav_observer.Wait(); 943 forward_nav_observer.Wait();
944 } 944 }
945 945
946 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX)); 946 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX));
947 } 947 }
948 948
949 } // namespace 949 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698