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

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

Issue 10823392: Let ui_test_utils::FindInPage optionally return the selection rect. This will be used in a future c… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // Close the tab. 502 // Close the tab.
503 CloseTab(1); 503 CloseTab(1);
504 504
505 // Restore the closed tab. 505 // Restore the closed tab.
506 ASSERT_NO_FATAL_FAILURE(RestoreTab(0, 1)); 506 ASSERT_NO_FATAL_FAILURE(RestoreTab(0, 1));
507 TabContents* tab = chrome::GetTabContentsAt(browser(), 1); 507 TabContents* tab = chrome::GetTabContentsAt(browser(), 1);
508 EnsureTabFinishedRestoring(tab->web_contents()); 508 EnsureTabFinishedRestoring(tab->web_contents());
509 509
510 // See if content is as expected. 510 // See if content is as expected.
511 EXPECT_GT( 511 EXPECT_GT(
512 ui_test_utils::FindInPage(tab, ASCIIToUTF16("webkit"), true, false, NULL), 512 ui_test_utils::FindInPage(tab, ASCIIToUTF16("webkit"), true, false, NULL,
513 NULL),
513 0); 514 0);
514 } 515 }
515 516
516 // Restore tab with special URL in its navigation history, go back to that 517 // Restore tab with special URL in its navigation history, go back to that
517 // entry and see that it loads properly. See http://crbug.com/31905 518 // entry and see that it loads properly. See http://crbug.com/31905
518 IN_PROC_BROWSER_TEST_F(TabRestoreTest, RestoreTabWithSpecialURLOnBack) { 519 IN_PROC_BROWSER_TEST_F(TabRestoreTest, RestoreTabWithSpecialURLOnBack) {
519 ASSERT_TRUE(test_server()->Start()); 520 ASSERT_TRUE(test_server()->Start());
520 521
521 const GURL http_url(test_server()->GetURL("files/title1.html")); 522 const GURL http_url(test_server()->GetURL("files/title1.html"));
522 523
(...skipping 10 matching lines...) Expand all
533 534
534 // Restore the closed tab. 535 // Restore the closed tab.
535 ASSERT_NO_FATAL_FAILURE(RestoreTab(0, 1)); 536 ASSERT_NO_FATAL_FAILURE(RestoreTab(0, 1));
536 TabContents* tab = chrome::GetTabContentsAt(browser(), 1); 537 TabContents* tab = chrome::GetTabContentsAt(browser(), 1);
537 EnsureTabFinishedRestoring(tab->web_contents()); 538 EnsureTabFinishedRestoring(tab->web_contents());
538 ASSERT_EQ(http_url, tab->web_contents()->GetURL()); 539 ASSERT_EQ(http_url, tab->web_contents()->GetURL());
539 540
540 // Go back, and see if content is as expected. 541 // Go back, and see if content is as expected.
541 GoBack(browser()); 542 GoBack(browser());
542 EXPECT_GT( 543 EXPECT_GT(
543 ui_test_utils::FindInPage(tab, ASCIIToUTF16("webkit"), true, false, NULL), 544 ui_test_utils::FindInPage(tab, ASCIIToUTF16("webkit"), true, false, NULL,
545 NULL),
544 0); 546 0);
545 } 547 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history_browsertest.cc ('k') | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698