diff options
author | dominikg@chromium.org <dominikg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-06 15:15:26 +0000 |
---|---|---|
committer | dominikg@chromium.org <dominikg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-06 15:15:26 +0000 |
commit | b5034ea87707d2199f69c31ea424bd456072ecae (patch) | |
tree | 70a8925fb11eb01d76d6f2ce157490d251aacaab /tools/perf | |
parent | ec4c58393eb66d14f110da23d9bb14df59e32b64 (diff) | |
download | chromium_src-b5034ea87707d2199f69c31ea424bd456072ecae.zip chromium_src-b5034ea87707d2199f69c31ea424bd456072ecae.tar.gz chromium_src-b5034ea87707d2199f69c31ea424bd456072ecae.tar.bz2 |
Telemetry: Clean up tap and click_element gestures.
The tap and click_element page actions have a very similar purpose but use a very
different implementation. This patch renames click_element to javascript_click
to indicate that it is not using synthetic gestures as tap does. It also replaces
click_element with tap inside smoothness measurements, so we exercise the entire
input stack. In other places we keep click_element (now javascript_click) because
tap's functionality isn't always sufficient (click elements outside of the view;
clicking on very small elements causes Chrome to magnify the element first).
Further, tap now supports all ways to select an element that click_element
supported (by text, xpath etc).
This CL also removes the tap_element page action, which was only used inside
smoothness for the pica page set. This case is currently broken and adamk@ said
he'd re-implement it using synthetic gestures if needed.
BUG=339233
Review URL: https://codereview.chromium.org/181483002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255355 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/page_sets/browser_control_click.json | 4 | ||||
-rw-r--r-- | tools/perf/page_sets/calendar_forward_backward.json | 16 | ||||
-rw-r--r-- | tools/perf/page_sets/gmail_alt_threadlist_conversation.json | 4 | ||||
-rw-r--r-- | tools/perf/page_sets/gmail_alt_two_labels.json | 4 | ||||
-rw-r--r-- | tools/perf/page_sets/gmail_compose_discard.json | 2 | ||||
-rw-r--r-- | tools/perf/page_sets/gmail_expand_collapse_conversation.json | 8 | ||||
-rw-r--r-- | tools/perf/page_sets/indexeddb_offline.json | 4 | ||||
-rw-r--r-- | tools/perf/page_sets/key_mobile_sites.json | 2 | ||||
-rw-r--r-- | tools/perf/page_sets/key_silk_cases.json | 8 | ||||
-rw-r--r-- | tools/perf/page_sets/pica.json | 7 | ||||
-rw-r--r-- | tools/perf/page_sets/plus_alt_posts_photos.json | 4 | ||||
-rw-r--r-- | tools/perf/page_sets/top_25.json | 70 |
12 files changed, 64 insertions, 69 deletions
diff --git a/tools/perf/page_sets/browser_control_click.json b/tools/perf/page_sets/browser_control_click.json index 3e513e0..845ded6 100644 --- a/tools/perf/page_sets/browser_control_click.json +++ b/tools/perf/page_sets/browser_control_click.json @@ -11,9 +11,9 @@ { "action": "wait", "condition": "element", "xpath": "id(\"attach\")" } ], "endure": [ - { "action": "click_element", "xpath": "id(\"attach\")" }, + { "action": "javascript_click", "xpath": "id(\"attach\")" }, { "action": "wait", "seconds": 0.5 }, - { "action": "click_element", "xpath": "id(\"detach\")" }, + { "action": "javascript_click", "xpath": "id(\"detach\")" }, { "action": "wait", "seconds": 0.5 } ] } diff --git a/tools/perf/page_sets/calendar_forward_backward.json b/tools/perf/page_sets/calendar_forward_backward.json index b9d9b52..a3b48e1 100644 --- a/tools/perf/page_sets/calendar_forward_backward.json +++ b/tools/perf/page_sets/calendar_forward_backward.json @@ -16,28 +16,28 @@ { "action": "javascript", "expression": "(function() { var elem = document.createElement('meta');elem.name='viewport';elem.content='initial-scale=1';document.body.appendChild(elem); })();" } ], "endure": [ - { "action": "click_element", "selector": "div[class~=\"navForward\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navForward\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navForward\"]" }, - { "action": "click_element", "selector": "div[class~=\"navForward\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navForward\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navForward\"]" }, - { "action": "click_element", "selector": "div[class~=\"navForward\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navForward\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navForward\"]" }, - { "action": "click_element", "selector": "div[class~=\"navForward\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navForward\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" }, - { "action": "click_element", "selector": "div[class~=\"navBack\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navBack\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" }, - { "action": "click_element", "selector": "div[class~=\"navBack\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navBack\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" }, - { "action": "click_element", "selector": "div[class~=\"navBack\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navBack\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" }, - { "action": "click_element", "selector": "div[class~=\"navBack\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navBack\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navForward\"]" } ] diff --git a/tools/perf/page_sets/gmail_alt_threadlist_conversation.json b/tools/perf/page_sets/gmail_alt_threadlist_conversation.json index 969fef9..97150fe 100644 --- a/tools/perf/page_sets/gmail_alt_threadlist_conversation.json +++ b/tools/perf/page_sets/gmail_alt_threadlist_conversation.json @@ -15,13 +15,13 @@ ], "endure": [ { - "action": "click_element", + "action": "javascript_click", "xpath": "//span[@email]" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "seconds": 1 }, { - "action": "click_element", + "action": "javascript_click", "selector": "a[href=\"https://mail.google.com/mail/u/0/?shva=1#inbox\"]" }, { "action": "wait", "condition": "href_change" }, diff --git a/tools/perf/page_sets/gmail_alt_two_labels.json b/tools/perf/page_sets/gmail_alt_two_labels.json index 5a0bace..9cf376cc 100644 --- a/tools/perf/page_sets/gmail_alt_two_labels.json +++ b/tools/perf/page_sets/gmail_alt_two_labels.json @@ -15,13 +15,13 @@ ], "endure": [ { - "action": "click_element", + "action": "javascript_click", "selector": "a[href=\"https://mail.google.com/mail/u/0/?shva=1#sent\"]" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "seconds": 1 }, { - "action": "click_element", + "action": "javascript_click", "selector": "a[href=\"https://mail.google.com/mail/u/0/?shva=1#inbox\"]" }, { "action": "wait", "condition": "href_change" }, diff --git a/tools/perf/page_sets/gmail_compose_discard.json b/tools/perf/page_sets/gmail_compose_discard.json index 1d7edb9..7ac15ca 100644 --- a/tools/perf/page_sets/gmail_compose_discard.json +++ b/tools/perf/page_sets/gmail_compose_discard.json @@ -20,7 +20,7 @@ { "action": "compose_click" }, { "action": "wait", "seconds": 1 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"oh\"][data-tooltip=\"Discard draft\"]" }, - { "action": "click_element", "selector": "div[class~=\"oh\"][data-tooltip=\"Discard draft\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"oh\"][data-tooltip=\"Discard draft\"]" }, { "action": "wait", "seconds": 1 } ] } diff --git a/tools/perf/page_sets/gmail_expand_collapse_conversation.json b/tools/perf/page_sets/gmail_expand_collapse_conversation.json index ec92cea..bd49179 100644 --- a/tools/perf/page_sets/gmail_expand_collapse_conversation.json +++ b/tools/perf/page_sets/gmail_expand_collapse_conversation.json @@ -12,18 +12,18 @@ "navigate_steps": [ { "action": "navigate" }, { "action": "wait", "condition": "element", "selector": "img[alt=\"Expand all\"]" }, - { "action": "click_element", "selector": "img[alt=\"Expand all\"]" }, + { "action": "javascript_click", "selector": "img[alt=\"Expand all\"]" }, { "action": "wait", "seconds": 5 }, { "action": "wait", "condition": "element", "selector": "img[alt=\"Collapse all\"]" }, - { "action": "click_element", "selector": "img[alt=\"Collapse all\"]" }, + { "action": "javascript_click", "selector": "img[alt=\"Collapse all\"]" }, { "action": "wait", "seconds": 1 } ], "endure": [ { "action": "wait", "condition": "element", "selector": "img[alt=\"Expand all\"]" }, - { "action": "click_element", "selector": "img[alt=\"Expand all\"]" }, + { "action": "javascript_click", "selector": "img[alt=\"Expand all\"]" }, { "action": "wait", "seconds": 1 }, { "action": "wait", "condition": "element", "selector": "img[alt=\"Collapse all\"]" }, - { "action": "click_element", "selector": "img[alt=\"Collapse all\"]" }, + { "action": "javascript_click", "selector": "img[alt=\"Collapse all\"]" }, { "action": "wait", "seconds": 1 } ] } diff --git a/tools/perf/page_sets/indexeddb_offline.json b/tools/perf/page_sets/indexeddb_offline.json index b3a60a0..0c349ae 100644 --- a/tools/perf/page_sets/indexeddb_offline.json +++ b/tools/perf/page_sets/indexeddb_offline.json @@ -12,11 +12,11 @@ ], "endure": [ { "action": "wait", "condition": "element", "selector": "button[id=\"online\"]:not(disabled)" }, - { "action": "click_element", "selector": "button[id=\"online\"]:not(disabled)" }, + { "action": "javascript_click", "selector": "button[id=\"online\"]:not(disabled)" }, { "action": "wait", "condition": "element", "xpath": "id(\"state\")[text()=\"online\"]" }, { "action": "wait", "seconds": 1 }, { "action": "wait", "condition": "element", "selector": "button[id=\"offline\"]:not(disabled)" }, - { "action": "click_element", "selector": "button[id=\"offline\"]:not(disabled)" }, + { "action": "javascript_click", "selector": "button[id=\"offline\"]:not(disabled)" }, { "action": "wait", "condition": "element", "xpath": "id(\"state\")[text()=\"offline\"]" } ] } diff --git a/tools/perf/page_sets/key_mobile_sites.json b/tools/perf/page_sets/key_mobile_sites.json index 6435e8a..250aa59 100644 --- a/tools/perf/page_sets/key_mobile_sites.json +++ b/tools/perf/page_sets/key_mobile_sites.json @@ -152,7 +152,7 @@ "navigate_steps": [ { "action": "navigate" }, { "action": "wait", "condition": "element", "text": "Other Answers (1 - 20 of 149)" }, - { "action": "click_element", "text": "Other Answers (1 - 20 of 149)" } + { "action": "javascript_click", "text": "Other Answers (1 - 20 of 149)" } ] }, { diff --git a/tools/perf/page_sets/key_silk_cases.json b/tools/perf/page_sets/key_silk_cases.json index 1237207..d1c21fa 100644 --- a/tools/perf/page_sets/key_silk_cases.json +++ b/tools/perf/page_sets/key_silk_cases.json @@ -159,10 +159,10 @@ }, "toggle_drawer": [ { - "action": "click_element", - "selector": "#menu-button" - }, - { "action": "wait", "seconds": 1 } + "action": "tap", + "selector": "#menu-button", + "wait_after": { "seconds": 1 } + } ] }, { diff --git a/tools/perf/page_sets/pica.json b/tools/perf/page_sets/pica.json index aabcdf2..c44a497 100644 --- a/tools/perf/page_sets/pica.json +++ b/tools/perf/page_sets/pica.json @@ -8,12 +8,7 @@ "navigate_steps" : [ { "action": "navigate" }, { "action": "wait", "javascript": "window.__web_components_ready" } - ], - "smoothness": { - "action": "tap_element", - "find_element_expression": "document.querySelector('pi-app').$.Topics.$.topics.$.container.querySelector('.item > .card')", - "wait_for_event": "polymer-pages-animation-end" - } + ] } ] } diff --git a/tools/perf/page_sets/plus_alt_posts_photos.json b/tools/perf/page_sets/plus_alt_posts_photos.json index b1b8e07..a60cee0 100644 --- a/tools/perf/page_sets/plus_alt_posts_photos.json +++ b/tools/perf/page_sets/plus_alt_posts_photos.json @@ -15,10 +15,10 @@ { "action": "wait", "condition": "element", "selector": "span[guidedhelpid=\"posts_tab_profile\"][class*=\"s6U8x\"]" } ], "endure": [ - { "action": "click_element", "selector": "span[guidedhelpid=\"posts_tab_profile\"]" }, + { "action": "javascript_click", "selector": "span[guidedhelpid=\"posts_tab_profile\"]" }, { "action": "wait", "condition": "element", "selector": "span[guidedhelpid=\"posts_tab_profile\"][class*=\"s6U8x\"]" }, { "action": "wait", "seconds": 5 }, - { "action": "click_element", "selector": "span[guidedhelpid=\"photos_tab_profile\"]" }, + { "action": "javascript_click", "selector": "span[guidedhelpid=\"photos_tab_profile\"]" }, { "action": "wait", "condition": "element", "selector": "span[guidedhelpid=\"photos_tab_profile\"][class*=\"s6U8x\"]" }, { "action": "wait", "seconds": 5 } ] diff --git a/tools/perf/page_sets/top_25.json b/tools/perf/page_sets/top_25.json index d944def..bfda0b0 100644 --- a/tools/perf/page_sets/top_25.json +++ b/tools/perf/page_sets/top_25.json @@ -14,31 +14,31 @@ ], "stress_memory": [ { "action": "scroll" }, - { "action": "click_element", "text": "Next" }, + { "action": "javascript_click", "text": "Next" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "condition": "element", "text": "Next" }, { "action": "scroll" }, - { "action": "click_element", "text": "Next" }, + { "action": "javascript_click", "text": "Next" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "condition": "element", "text": "Next" }, { "action": "scroll" }, - { "action": "click_element", "text": "Next" }, + { "action": "javascript_click", "text": "Next" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "condition": "element", "text": "Previous" }, { "action": "scroll" }, - { "action": "click_element", "text": "Previous" }, + { "action": "javascript_click", "text": "Previous" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "condition": "element", "text": "Previous" }, { "action": "scroll" }, - { "action": "click_element", "text": "Previous" }, + { "action": "javascript_click", "text": "Previous" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "condition": "element", "text": "Previous" }, { "action": "scroll" }, - { "action": "click_element", "text": "Previous" }, + { "action": "javascript_click", "text": "Previous" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "condition": "element", "text": "Images" }, { "action": "scroll" }, - { "action": "click_element", "text": "Images" }, + { "action": "javascript_click", "text": "Images" }, { "action": "wait", "condition": "href_change" }, { "action": "wait", "condition": "element", "text": "Images" } ] @@ -56,9 +56,9 @@ "scrollable_element_function": "function(callback) { gmonkey.load('2.0', function(api) { callback(api.getScrollableElement()); }); }" }, "stress_memory": [ - { "action": "click_element", "selector": "a[href=\"https://mail.google.com/mail/u/0/?shva=1#starred\"]" }, + { "action": "javascript_click", "selector": "a[href=\"https://mail.google.com/mail/u/0/?shva=1#starred\"]" }, { "action": "wait", "condition": "href_change" }, - { "action": "click_element", "selector": "a[href=\"https://mail.google.com/mail/u/0/?shva=1#inbox\"]" }, + { "action": "javascript_click", "selector": "a[href=\"https://mail.google.com/mail/u/0/?shva=1#inbox\"]" }, { "action": "wait", "condition": "href_change" } ] }, @@ -78,28 +78,28 @@ "scrollable_element_function": "function(callback) { callback(document.getElementById('scrolltimedeventswk')); }" }, "stress_memory": [ - { "action": "click_element", "selector": "div[class~=\"navForward\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navForward\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navForward\"]" }, - { "action": "click_element", "selector": "div[class~=\"navForward\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navForward\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navForward\"]" }, - { "action": "click_element", "selector": "div[class~=\"navForward\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navForward\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navForward\"]" }, - { "action": "click_element", "selector": "div[class~=\"navForward\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navForward\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" }, - { "action": "click_element", "selector": "div[class~=\"navBack\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navBack\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" }, - { "action": "click_element", "selector": "div[class~=\"navBack\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navBack\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" }, - { "action": "click_element", "selector": "div[class~=\"navBack\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navBack\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" }, - { "action": "click_element", "selector": "div[class~=\"navBack\"]" }, + { "action": "javascript_click", "selector": "div[class~=\"navBack\"]" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "selector": "div[class~=\"navBack\"]" } ] @@ -137,19 +137,19 @@ "scroll_is_infinite": true }, "stress_memory": [ - { "action": "click_element", "text": "Home" }, + { "action": "javascript_click", "text": "Home" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "text": "Profile" }, - { "action": "click_element", "text": "Profile" }, + { "action": "javascript_click", "text": "Profile" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "text": "Explore" }, - { "action": "click_element", "text": "Explore" }, + { "action": "javascript_click", "text": "Explore" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "text": "Events" }, - { "action": "click_element", "text": "Events" }, + { "action": "javascript_click", "text": "Events" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "text": "Communities" }, - { "action": "click_element", "text": "Communities" }, + { "action": "javascript_click", "text": "Communities" }, { "action": "wait", "seconds": 2 }, { "action": "wait", "condition": "element", "text": "Home" } ] @@ -172,16 +172,16 @@ { "action": "wait", "condition": "element", "text": "accessibility" } ], "stress_memory": [ - { "action": "click_element", "text": "accessibility" }, + { "action": "javascript_click", "text": "accessibility" }, { "action": "wait", "condition": "navigate" }, { "action": "scroll" }, - { "action": "click_element", "text": "advanced" }, + { "action": "javascript_click", "text": "advanced" }, { "action": "wait", "condition": "navigate" }, { "action": "scroll" }, - { "action": "click_element", "text": "beginner" }, + { "action": "javascript_click", "text": "beginner" }, { "action": "wait", "condition": "navigate" }, { "action": "scroll" }, - { "action": "click_element", "text": "Home" }, + { "action": "javascript_click", "text": "Home" }, { "action": "wait", "condition": "navigate" } ] }, @@ -195,13 +195,13 @@ ], "stress_memory": [ { "action": "scroll" }, - { "action": "click_element", "selector": "a[href=\"http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sight/\"]" }, + { "action": "javascript_click", "selector": "a[href=\"http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sight/\"]" }, { "action": "wait", "condition": "navigate" }, { "action": "scroll" }, - { "action": "click_element", "text": "Features" }, + { "action": "javascript_click", "text": "Features" }, { "action": "wait", "condition": "navigate" }, { "action": "scroll" }, - { "action": "click_element", "text": "News" }, + { "action": "javascript_click", "text": "News" }, { "action": "wait", "condition": "navigate" }, { "action": "scroll" } ] @@ -220,17 +220,17 @@ "scroll_is_infinite": true }, "stress_memory": [ - { "action": "click_element", "text": "About" }, + { "action": "javascript_click", "text": "About" }, { "action": "wait", "condition": "navigate" }, - { "action": "click_element", "text": "The Audacity of Hope" }, + { "action": "javascript_click", "text": "The Audacity of Hope" }, { "action": "wait", "condition": "navigate" }, - { "action": "click_element", "text": "Back to Barack Obama's Timeline" }, + { "action": "javascript_click", "text": "Back to Barack Obama's Timeline" }, { "action": "wait", "condition": "navigate" }, - { "action": "click_element", "text": "About" }, + { "action": "javascript_click", "text": "About" }, { "action": "wait", "condition": "navigate" }, - { "action": "click_element", "text": "Elected to U.S. Senate" }, + { "action": "javascript_click", "text": "Elected to U.S. Senate" }, { "action": "wait", "condition": "navigate" }, - { "action": "click_element", "text": "Home" }, + { "action": "javascript_click", "text": "Home" }, { "action": "wait", "condition": "navigate" } ] }, |