From 77bc673bf31c32bfdcb1bf139c3a58eace23e3ea Mon Sep 17 00:00:00 2001 From: "pam@chromium.org" Date: Mon, 20 Apr 2009 22:01:03 +0000 Subject: When restoring a closed tab using either ctrl-shift-T or the context menu, put it back into the window it came from, at the tabstrip index it occupied before, and activate (select) both the window and the tab. Restoring a tab from the New Tab Page replaces the NTP, as before. If the window the tab was in no longer exists, put the tab at the end of the current window's tabstrip. This behavior may change in a later patch. BUG=5278 TEST=Open two windows, with >1 tabs each. Close a tab, not the one at the end, in one of the windows. Switch to the other window and choose "Undo Closed Tab" from the tabstrip context menu, or type ctrl-shift-T. The tab should be restored where it was, and activated (selected and brought to the front). Review URL: http://codereview.chromium.org/69015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14062 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/ui/ui_test.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'chrome/test/ui/ui_test.cc') diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index ddea594..620637e 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -566,6 +566,16 @@ std::wstring UITest::GetActiveTabTitle() { return title; } +int UITest::GetActiveTabIndex() { + scoped_ptr tab_proxy(GetActiveTab()); + if (!tab_proxy.get()) + return -1; + + int index; + EXPECT_TRUE(tab_proxy->GetTabIndex(&index)); + return index; +} + bool UITest::IsBrowserRunning() { return CrashAwareSleep(0); } -- cgit v1.1