| OLD | NEW |
| 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/string_util.h" | 6 #include "base/string_util.h" |
| 7 #include "chrome/app/chrome_dll_resource.h" | 7 #include "chrome/app/chrome_dll_resource.h" |
| 8 #include "chrome/common/chrome_constants.h" | 8 #include "chrome/common/chrome_constants.h" |
| 9 #include "chrome/common/l10n_util.h" | 9 #include "chrome/common/l10n_util.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 ASSERT_TRUE(window->ActivateTab(start_index)); | 223 ASSERT_TRUE(window->ActivateTab(start_index)); |
| 224 ASSERT_TRUE( | 224 ASSERT_TRUE( |
| 225 javascript_tab->NavigateToURLAsync(GURL("javascript:alert('Alert!')"))); | 225 javascript_tab->NavigateToURLAsync(GURL("javascript:alert('Alert!')"))); |
| 226 ASSERT_TRUE(window->WaitForTabToBecomeActive(javascript_tab_index, | 226 ASSERT_TRUE(window->WaitForTabToBecomeActive(javascript_tab_index, |
| 227 kWaitForActionMaxMsec)); | 227 kWaitForActionMaxMsec)); |
| 228 } | 228 } |
| 229 | 229 |
| 230 TEST_F(BrowserTest, DuplicateTab) { | 230 TEST_F(BrowserTest, DuplicateTab) { |
| 231 std::wstring path_prefix = test_data_directory_; | 231 std::wstring path_prefix = test_data_directory_; |
| 232 file_util::AppendToPath(&path_prefix, L"session_history"); | 232 file_util::AppendToPath(&path_prefix, L"session_history"); |
| 233 path_prefix += file_util::kPathSeparator; | 233 path_prefix += FilePath::kSeparators[0]; |
| 234 GURL url1 = net::FilePathToFileURL(path_prefix + L"bot1.html"); | 234 GURL url1 = net::FilePathToFileURL(path_prefix + L"bot1.html"); |
| 235 GURL url2 = net::FilePathToFileURL(path_prefix + L"bot2.html"); | 235 GURL url2 = net::FilePathToFileURL(path_prefix + L"bot2.html"); |
| 236 GURL url3 = GURL("about:blank"); | 236 GURL url3 = GURL("about:blank"); |
| 237 | 237 |
| 238 scoped_ptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); | 238 scoped_ptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); |
| 239 | 239 |
| 240 // Navigate to the three urls, then go back. | 240 // Navigate to the three urls, then go back. |
| 241 scoped_ptr<TabProxy> tab_proxy(browser_proxy->GetTab(0)); | 241 scoped_ptr<TabProxy> tab_proxy(browser_proxy->GetTab(0)); |
| 242 tab_proxy->NavigateToURL(url1); | 242 tab_proxy->NavigateToURL(url1); |
| 243 tab_proxy->NavigateToURL(url2); | 243 tab_proxy->NavigateToURL(url2); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 if (title == L"PASSED") { | 375 if (title == L"PASSED") { |
| 376 // Success, bail out. | 376 // Success, bail out. |
| 377 break; | 377 break; |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 | 380 |
| 381 if (i == 10) | 381 if (i == 10) |
| 382 FAIL() << "failed to get error page title"; | 382 FAIL() << "failed to get error page title"; |
| 383 } | 383 } |
| 384 | 384 |
| OLD | NEW |