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

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

Issue 3073009: Mark SessionHistoryTest.JavascriptHistory as flaky. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | « no previous file | no next file » | 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) 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_path.h" 5 #include "base/file_path.h"
6 #include "base/platform_thread.h" 6 #include "base/platform_thread.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 #include "chrome/test/automation/tab_proxy.h" 9 #include "chrome/test/automation/tab_proxy.h"
10 #include "chrome/test/automation/browser_proxy.h" 10 #include "chrome/test/automation/browser_proxy.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 ASSERT_TRUE(tab_->GoBack()); 379 ASSERT_TRUE(tab_->GoBack());
380 EXPECT_EQ(fragment, GetTabURL()); 380 EXPECT_EQ(fragment, GetTabURL());
381 } 381 }
382 382
383 // Test that the javascript window.history object works. 383 // Test that the javascript window.history object works.
384 // NOTE: history.go(N) does not do anything if N is outside the bounds of the 384 // NOTE: history.go(N) does not do anything if N is outside the bounds of the
385 // back/forward list (such as trigger our start/stop loading events). This 385 // back/forward list (such as trigger our start/stop loading events). This
386 // means the test will hang if it attempts to navigate too far forward or back, 386 // means the test will hang if it attempts to navigate too far forward or back,
387 // since we'll be waiting forever for a load stop event. 387 // since we'll be waiting forever for a load stop event.
388 TEST_F(SessionHistoryTest, JavascriptHistory) { 388 //
389 // TODO(brettw) bug 50648: fix flakyness. This test seems like it was failing
390 // about 1/4 of the time on Vista by failing to execute JavascriptGo (see bug).
391 TEST_F(SessionHistoryTest, FLAKY_JavascriptHistory) {
389 scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); 392 scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
390 ASSERT_TRUE(NULL != server.get()); 393 ASSERT_TRUE(NULL != server.get());
391 394
392 // about:blank should be loaded first. 395 // about:blank should be loaded first.
393 ASSERT_FALSE(tab_->GoBack()); 396 ASSERT_FALSE(tab_->GoBack());
394 EXPECT_EQ(L"", GetTabTitle()); 397 EXPECT_EQ(L"", GetTabTitle());
395 398
396 ASSERT_TRUE(tab_->NavigateToURL( 399 ASSERT_TRUE(tab_->NavigateToURL(
397 server->TestServerPage("files/session_history/bot1.html"))); 400 server->TestServerPage("files/session_history/bot1.html")));
398 EXPECT_EQ(L"bot1", GetTabTitle()); 401 EXPECT_EQ(L"bot1", GetTabTitle());
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 ASSERT_TRUE(tab_->GoBack()); 546 ASSERT_TRUE(tab_->GoBack());
544 547
545 // Ensure history.length is properly truncated. 548 // Ensure history.length is properly truncated.
546 ASSERT_TRUE(tab_->NavigateToURL(server->TestServerPage("files/title2.html"))); 549 ASSERT_TRUE(tab_->NavigateToURL(server->TestServerPage("files/title2.html")));
547 ASSERT_TRUE(tab_->ExecuteAndExtractInt( 550 ASSERT_TRUE(tab_->ExecuteAndExtractInt(
548 L"", L"domAutomationController.send(history.length)", &length)); 551 L"", L"domAutomationController.send(history.length)", &length));
549 EXPECT_EQ(2, length); 552 EXPECT_EQ(2, length);
550 } 553 }
551 554
552 } // namespace 555 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698