Commit 8c8309aa authored by Yuheng Huang's avatar Yuheng Huang Committed by Commit Bot

Tab Search benchmark: Turn back on smoke unittest

The CL also makes finding tab search target more robust by comparing
url scheme

Bug: 1099917
Change-Id: Idb0497176c1b3f5cb700362905932d029b6d6ad5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2547425Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Yuheng Huang <yuhengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828985}
parent 795ff25e
......@@ -103,7 +103,6 @@ _BLACK_LIST_TEST_NAMES = [
'memory.long_running_idle_gmail_background_tbmv2',
'tab_switching.typical_25',
'UNSCHEDULED_oortonline_tbmv2',
'UNSCHEDULED_tab_search', # crbug.com/1146335
'webrtc', # crbug.com/932036
'v8.runtime_stats.top_25' # Fails in Windows, crbug.com/1043048
]
......
......@@ -60,6 +60,8 @@ TOP_URL = [
'whatsapp.com',
]
TAB_SEARCH_URL = 'chrome://tab-search/'
class TabSearchStory(page.Page):
"""Base class for tab search stories"""
......@@ -87,16 +89,16 @@ class TabSearchStory(page.Page):
def RunPageInteractions(self, action_runner):
tabs = action_runner.tab.browser.tabs
tabs_len = len(tabs)
# Open Tab Search bubble.
action_runner.tab.browser.supports_inspecting_webui = True
action_runner.tab.browser.ExecuteBrowserCommand('openTabSearch')
# Wait for Tab Search bubble to be inspectable.
py_utils.WaitFor(lambda: len(tabs) > tabs_len, 10)
py_utils.WaitFor(
lambda: any([True for tab in tabs if tab.url == TAB_SEARCH_URL]), 10)
# Wait for Tab Search bubble to load.
tab = tabs[-1]
tab = next(iter([tab for tab in tabs if tab.url == TAB_SEARCH_URL]))
action_runner = ActionRunner(
tab) # Recreate action_runner for Tab Search bubble.
tab.WaitForDocumentReadyStateToBeComplete()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment