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

Side by Side Diff: chrome/browser/session_history_uitest.cc

Issue 12893: Get rid of kPathSeparator on windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/win_util.h" 6 #include "base/win_util.h"
7 #include "chrome/common/l10n_util.h" 7 #include "chrome/common/l10n_util.h"
8 #include "chrome/test/automation/tab_proxy.h" 8 #include "chrome/test/automation/tab_proxy.h"
9 #include "chrome/test/automation/browser_proxy.h" 9 #include "chrome/test/automation/browser_proxy.h"
10 #include "chrome/test/ui/ui_test.h" 10 #include "chrome/test/ui/ui_test.h"
11 #include "net/base/net_util.h" 11 #include "net/base/net_util.h"
12 #include "net/url_request/url_request_unittest.h" 12 #include "net/url_request/url_request_unittest.h"
13 13
14 #include "generated_resources.h" 14 #include "generated_resources.h"
15 15
16 using std::wstring; 16 using std::wstring;
17 17
18 namespace { 18 namespace {
19 19
20 const wchar_t kDocRoot[] = L"chrome/test/data"; 20 const wchar_t kDocRoot[] = L"chrome/test/data";
21 21
22 class SessionHistoryTest : public UITest { 22 class SessionHistoryTest : public UITest {
23 protected: 23 protected:
24 SessionHistoryTest() : UITest() { 24 SessionHistoryTest() : UITest() {
25 wstring path_prefix = test_data_directory_; 25 FilePath path = FilePath::FromWStringHack(test_data_directory_);
26 file_util::AppendToPath(&path_prefix, L"session_history"); 26 path = path.Append(FILE_PATH_LITERAL("session_history"))
27 path_prefix += file_util::kPathSeparator; 27 .Append(FilePath::StringType(&FilePath::kSeparators[0], 1));
28 28
29 url_prefix_ = UTF8ToWide(net::FilePathToFileURL(path_prefix).spec()); 29 url_prefix_ = UTF8ToWide(net::FilePathToFileURL(path).spec());
30 } 30 }
31 31
32 virtual void SetUp() { 32 virtual void SetUp() {
33 UITest::SetUp(); 33 UITest::SetUp();
34 34
35 window_.reset(automation()->GetBrowserWindow(0)); 35 window_.reset(automation()->GetBrowserWindow(0));
36 ASSERT_TRUE(window_.get()); 36 ASSERT_TRUE(window_.get());
37 37
38 int active_tab_index = -1; 38 int active_tab_index = -1;
39 ASSERT_TRUE(window_->GetActiveTabIndex(&active_tab_index)); 39 ASSERT_TRUE(window_->GetActiveTabIndex(&active_tab_index));
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 TEST_F(SessionHistoryTest, LocationReplace) { 489 TEST_F(SessionHistoryTest, LocationReplace) {
490 // Test that using location.replace doesn't leave the title of the old page 490 // Test that using location.replace doesn't leave the title of the old page
491 // visible. 491 // visible.
492 TestServer server(kDocRoot); 492 TestServer server(kDocRoot);
493 493
494 ASSERT_TRUE(tab_->NavigateToURL( 494 ASSERT_TRUE(tab_->NavigateToURL(
495 server.TestServerPage("files/session_history/replace.html?no-title.html")) ); 495 server.TestServerPage("files/session_history/replace.html?no-title.html")) );
496 EXPECT_EQ(L"", GetTabTitle()); 496 EXPECT_EQ(L"", GetTabTitle());
497 } 497 }
498 498
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/database_perftest.cc ('k') | chrome/browser/session_restore_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698