summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-12 18:44:36 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-12 18:44:36 +0000
commit580471240b93bb3db8b62bfb569e0b41277927b1 (patch)
treeef12aabfac70431ff9dd97767f83e2faab75b22d /chrome/browser/sessions
parenta1ec63a64fbb15d6ed20bc3fb856b48d3a5835e2 (diff)
downloadchromium_src-580471240b93bb3db8b62bfb569e0b41277927b1.zip
chromium_src-580471240b93bb3db8b62bfb569e0b41277927b1.tar.gz
chromium_src-580471240b93bb3db8b62bfb569e0b41277927b1.tar.bz2
A little cleanup in SessionRestoreUITest.
- don't reload tabs to ensure that a page loaded (it's handled in waiting for completion of IDC_NEW_TAB) - simplify the code, making it shorter and issuing less automation calls TEST=none BUG=none Review URL: http://codereview.chromium.org/385066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r--chrome/browser/sessions/session_restore_uitest.cc18
1 files changed, 3 insertions, 15 deletions
diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc
index 90eed2d..99ec382 100644
--- a/chrome/browser/sessions/session_restore_uitest.cc
+++ b/chrome/browser/sessions/session_restore_uitest.cc
@@ -427,28 +427,16 @@ TEST_F(SessionRestoreUITest, ShareProcessesOnRestore) {
// Create two new tabs.
ASSERT_TRUE(browser_proxy->RunCommand(IDC_NEW_TAB));
- int new_tab_count;
- ASSERT_TRUE(browser_proxy->GetTabCount(&new_tab_count));
- ASSERT_EQ(++tab_count, new_tab_count);
- scoped_refptr<TabProxy> last_tab(browser_proxy->GetTab(tab_count - 1));
- ASSERT_TRUE(last_tab.get() != NULL);
- // Do a reload to ensure new tab page has loaded.
- ASSERT_TRUE(last_tab->Reload());
-
ASSERT_TRUE(browser_proxy->RunCommand(IDC_NEW_TAB));
+ int new_tab_count;
ASSERT_TRUE(browser_proxy->GetTabCount(&new_tab_count));
- ASSERT_EQ(++tab_count, new_tab_count);
- last_tab = browser_proxy->GetTab(tab_count - 1);
- ASSERT_TRUE(last_tab.get() != NULL);
- // Do a reload to ensure new tab page has loaded.
- ASSERT_TRUE(last_tab->Reload());
+ ASSERT_EQ(tab_count + 2, new_tab_count);
int expected_process_count = GetBrowserProcessCount();
- int expected_tab_count = tab_count;
+ int expected_tab_count = new_tab_count;
// Restart.
browser_proxy = NULL;
- last_tab = NULL;
QuitBrowserAndRestore(3);
// Wait for each tab to finish being restored, then make sure the process