| Index: tools/perf/page_sets/indexeddb_offline.py
|
| diff --git a/tools/perf/page_sets/indexeddb_offline.py b/tools/perf/page_sets/indexeddb_offline.py
|
| index aef9af953b3d85d1be420aef5816b9a3363c74b8..38f786510db95f8eebb4f4cbc6685992b7d687b3 100644
|
| --- a/tools/perf/page_sets/indexeddb_offline.py
|
| +++ b/tools/perf/page_sets/indexeddb_offline.py
|
| @@ -11,9 +11,12 @@ from telemetry.page import page_set as page_set_module
|
|
|
|
|
| def _CreateXpathFunction(xpath):
|
| - return ('document.evaluate(%s, document, null, '
|
| - 'XPathResult.FIRST_ORDERED_NODE_TYPE, null)'
|
| - '.singleNodeEvaluate') % re.escape(xpath)
|
| + return ('document.evaluate("%s",'
|
| + 'document,'
|
| + 'null,'
|
| + 'XPathResult.FIRST_ORDERED_NODE_TYPE,'
|
| + 'null)'
|
| + '.singleNodeValue' % re.escape(xpath))
|
|
|
|
|
| class IndexeddbOfflinePage(page_module.Page):
|
| @@ -33,18 +36,12 @@ class IndexeddbOfflinePage(page_module.Page):
|
|
|
| def RunEndure(self, action_runner):
|
| action_runner.WaitForElement('button[id="online"]:not(disabled)')
|
| - action_runner.RunAction(ClickElementAction(
|
| - {
|
| - 'selector': 'button[id="online"]:not(disabled)'
|
| - }))
|
| + action_runner.ClickElement('button[id="online"]:not(disabled)')
|
| action_runner.WaitForElement(
|
| element_function=_CreateXpathFunction('id("state")[text()="online"]'))
|
| action_runner.Wait(1)
|
| action_runner.WaitForElement('button[id="offline"]:not(disabled)')
|
| - action_runner.RunAction(ClickElementAction(
|
| - {
|
| - 'selector': 'button[id="offline"]:not(disabled)'
|
| - }))
|
| + action_runner.ClickElement('button[id="offline"]:not(disabled)')
|
| action_runner.WaitForElement(
|
| element_function=_CreateXpathFunction('id("state")[text()="offline"]'))
|
|
|
|
|