summaryrefslogtreecommitdiffstats
path: root/chrome/browser/session_history_uitest.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 22:13:32 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 22:13:32 +0000
commit44bf8fbfa2786685070e90b6b12dac24da4b10d7 (patch)
treebb44e26037a64e3c06d80bb70da8f3eb4f2eee09 /chrome/browser/session_history_uitest.cc
parent224e861a69b6731ef51fdf978af22f51674cbdd8 (diff)
downloadchromium_src-44bf8fbfa2786685070e90b6b12dac24da4b10d7.zip
chromium_src-44bf8fbfa2786685070e90b6b12dac24da4b10d7.tar.gz
chromium_src-44bf8fbfa2786685070e90b6b12dac24da4b10d7.tar.bz2
ui_tests: use proper API for getting tab title
To get the title actually shown by a tab, call the function that we use for computing the tab text. (Sometimes it returns title() and sometimes it computes something more complex.) This is identical to r76841 but for a different testing framework. :\ BUG=this actually fixes the ancient Google-internal bug 634097(!) Review URL: http://codereview.chromium.org/6632006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/session_history_uitest.cc')
-rw-r--r--chrome/browser/session_history_uitest.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/session_history_uitest.cc b/chrome/browser/session_history_uitest.cc
index b65c90c..e4bb779 100644
--- a/chrome/browser/session_history_uitest.cc
+++ b/chrome/browser/session_history_uitest.cc
@@ -91,7 +91,7 @@ TEST_F(SessionHistoryTest, MAYBE_BasicBackForward) {
// about:blank should be loaded first.
ASSERT_FALSE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
ASSERT_TRUE(tab_->NavigateToURL(
test_server_.GetURL("files/session_history/bot1.html")));
@@ -132,10 +132,10 @@ TEST_F(SessionHistoryTest, MAYBE_BasicBackForward) {
EXPECT_EQ(L"bot1", GetTabTitle());
ASSERT_TRUE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
ASSERT_FALSE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
ASSERT_TRUE(tab_->GoForward());
EXPECT_EQ(L"bot1", GetTabTitle());
@@ -158,7 +158,7 @@ TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) {
// about:blank should be loaded first.
GURL home(homepage());
ASSERT_FALSE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
EXPECT_EQ(home, GetTabURL());
GURL frames(test_server_.GetURL("files/session_history/frames.html"));
@@ -185,7 +185,7 @@ TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) {
EXPECT_EQ(frames, GetTabURL());
ASSERT_TRUE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
EXPECT_EQ(home, GetTabURL());
ASSERT_TRUE(tab_->GoForward());
@@ -334,7 +334,7 @@ TEST_F(SessionHistoryTest, MAYBE_FragmentBackForward) {
// about:blank should be loaded first.
ASSERT_FALSE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
GURL fragment(test_server_.GetURL("files/session_history/fragment.html"));
ASSERT_TRUE(tab_->NavigateToURL(fragment));
@@ -405,7 +405,7 @@ TEST_F(SessionHistoryTest, FLAKY_JavascriptHistory) {
// about:blank should be loaded first.
ASSERT_FALSE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
ASSERT_TRUE(tab_->NavigateToURL(
test_server_.GetURL("files/session_history/bot1.html")));
@@ -439,10 +439,10 @@ TEST_F(SessionHistoryTest, FLAKY_JavascriptHistory) {
// history is [blank, bot1, bot2, *bot3]
JavascriptGo("-3");
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
ASSERT_FALSE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
JavascriptGo("1");
EXPECT_EQ(L"bot1", GetTabTitle());
@@ -460,10 +460,10 @@ TEST_F(SessionHistoryTest, FLAKY_JavascriptHistory) {
EXPECT_EQ(L"bot1", GetTabTitle());
JavascriptGo("-1");
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
ASSERT_FALSE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
JavascriptGo("1");
EXPECT_EQ(L"bot1", GetTabTitle());
@@ -494,7 +494,7 @@ TEST_F(SessionHistoryTest, FAILS_LocationReplace) {
TEST_F(SessionHistoryTest, FLAKY_HistorySearchXSS) {
// about:blank should be loaded first.
ASSERT_FALSE(tab_->GoBack());
- EXPECT_EQ(L"", GetTabTitle());
+ EXPECT_EQ(L"about:blank", GetTabTitle());
GURL url(std::string(chrome::kChromeUIHistoryURL) +
"#q=%3Cimg%20src%3Dx%3Ax%20onerror%3D%22document.title%3D'XSS'%22%3E");