diff options
Diffstat (limited to 'chrome/test/ui/ui_test.cc')
-rw-r--r-- | chrome/test/ui/ui_test.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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<TabProxy> 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); } |