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

Side by Side Diff: content/browser/session_history_browsertest.cc

Issue 176843022: Move UTF16ToASCII, remove WideToASCII. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « components/wifi/wifi_test.cc ('k') | content/child/simple_webmimeregistry_impl.cc » ('j') | 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/strings/string_util.h" 5 #include "base/strings/string_util.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/public/browser/navigation_controller.h" 8 #include "content/public/browser/navigation_controller.h"
9 #include "content/public/browser/notification_service.h" 9 #include "content/public/browser/notification_service.h"
10 #include "content/public/browser/notification_types.h" 10 #include "content/public/browser/notification_types.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 NavigateToURL(shell(), url); 78 NavigateToURL(shell(), url);
79 } 79 }
80 80
81 // Navigate session history using history.go(distance). 81 // Navigate session history using history.go(distance).
82 void JavascriptGo(std::string distance) { 82 void JavascriptGo(std::string distance) {
83 GURL url("javascript:history.go('" + distance + "')"); 83 GURL url("javascript:history.go('" + distance + "')");
84 NavigateToURL(shell(), url); 84 NavigateToURL(shell(), url);
85 } 85 }
86 86
87 std::string GetTabTitle() { 87 std::string GetTabTitle() {
88 return UTF16ToASCII(shell()->web_contents()->GetTitle()); 88 return base::UTF16ToASCII(shell()->web_contents()->GetTitle());
89 } 89 }
90 90
91 GURL GetTabURL() { 91 GURL GetTabURL() {
92 return shell()->web_contents()->GetLastCommittedURL(); 92 return shell()->web_contents()->GetLastCommittedURL();
93 } 93 }
94 94
95 GURL GetURL(const std::string file) { 95 GURL GetURL(const std::string file) {
96 return embedded_test_server()->GetURL( 96 return embedded_test_server()->GetURL(
97 std::string("/session_history/") + file); 97 std::string("/session_history/") + file);
98 } 98 }
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 NavigateToURL(shell(), GetURL("title2.html")); 490 NavigateToURL(shell(), GetURL("title2.html"));
491 491
492 ASSERT_TRUE(ExecuteScriptAndExtractInt( 492 ASSERT_TRUE(ExecuteScriptAndExtractInt(
493 shell()->web_contents(), 493 shell()->web_contents(),
494 "domAutomationController.send(history.length)", 494 "domAutomationController.send(history.length)",
495 &length)); 495 &length));
496 EXPECT_EQ(2, length); 496 EXPECT_EQ(2, length);
497 } 497 }
498 498
499 } // namespace content 499 } // namespace content
OLDNEW
« no previous file with comments | « components/wifi/wifi_test.cc ('k') | content/child/simple_webmimeregistry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698