| 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 "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/platform_thread.h" | 7 #include "base/platform_thread.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome/test/automation/tab_proxy.h" | 10 #include "chrome/test/automation/tab_proxy.h" |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 EXPECT_EQ(L"bot3", GetTabTitle()); | 476 EXPECT_EQ(L"bot3", GetTabTitle()); |
| 477 | 477 |
| 478 // TODO(creis): Test that JavaScript history navigations work across tab | 478 // TODO(creis): Test that JavaScript history navigations work across tab |
| 479 // types. For example, load about:network in a tab, then a real page, then | 479 // types. For example, load about:network in a tab, then a real page, then |
| 480 // try to go back and forward with JavaScript. Bug 1136715. | 480 // try to go back and forward with JavaScript. Bug 1136715. |
| 481 // (Hard to test right now, because pages like about:network cause the | 481 // (Hard to test right now, because pages like about:network cause the |
| 482 // TabProxy to hang. This is because they do not appear to use the | 482 // TabProxy to hang. This is because they do not appear to use the |
| 483 // NotificationService.) | 483 // NotificationService.) |
| 484 } | 484 } |
| 485 | 485 |
| 486 // This test is flaky and has been disabled. It looks like the server does not | 486 // This test is flaky. It looks like the server does not start fast enough, |
| 487 // start fast enough, and the navigation fails (with 404). See bug 8444. | 487 // and the navigation fails (with 404). See http://crbug.com/8444. |
| 488 TEST_F(SessionHistoryTest, DISABLED_LocationReplace) { | 488 TEST_F(SessionHistoryTest, FLAKY_LocationReplace) { |
| 489 // Test that using location.replace doesn't leave the title of the old page | 489 // Test that using location.replace doesn't leave the title of the old page |
| 490 // visible. | 490 // visible. |
| 491 scoped_refptr<HTTPTestServer> server = | 491 scoped_refptr<HTTPTestServer> server = |
| 492 HTTPTestServer::CreateServer(kDocRoot, NULL); | 492 HTTPTestServer::CreateServer(kDocRoot, NULL); |
| 493 ASSERT_TRUE(NULL != server.get()); | 493 ASSERT_TRUE(NULL != server.get()); |
| 494 | 494 |
| 495 ASSERT_TRUE(tab_->NavigateToURL(server->TestServerPage( | 495 ASSERT_TRUE(tab_->NavigateToURL(server->TestServerPage( |
| 496 "files/session_history/replace.html?no-title.html"))); | 496 "files/session_history/replace.html?no-title.html"))); |
| 497 EXPECT_EQ(L"", GetTabTitle()); | 497 EXPECT_EQ(L"", GetTabTitle()); |
| 498 } | 498 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 525 | 525 |
| 526 ASSERT_TRUE(tab_->NavigateToURL(GURL( | 526 ASSERT_TRUE(tab_->NavigateToURL(GURL( |
| 527 "javascript:void(frames[0].navigate())"))); | 527 "javascript:void(frames[0].navigate())"))); |
| 528 EXPECT_EQ(L"foo", GetTabTitle()); | 528 EXPECT_EQ(L"foo", GetTabTitle()); |
| 529 | 529 |
| 530 ASSERT_TRUE(tab_->GoBack()); | 530 ASSERT_TRUE(tab_->GoBack()); |
| 531 EXPECT_EQ(L"Default Title", GetTabTitle()); | 531 EXPECT_EQ(L"Default Title", GetTabTitle()); |
| 532 } | 532 } |
| 533 | 533 |
| 534 } // namespace | 534 } // namespace |
| OLD | NEW |