From dc89ca56e6f33790cda2cd93ad772ca61497346b Mon Sep 17 00:00:00 2001 From: borenet Date: Fri, 17 Oct 2014 07:37:05 -0700 Subject: Add recreate_skps script BUG=skia:3008 Review URL: https://codereview.chromium.org/655313003 --- .gitignore | 2 + DEPS | 2 +- tools/skp/page_sets/data/README | 2 + .../page_sets/other/DOWN-skia_br337_desktop.json | 13 + .../page_sets/other/FAILING-skia_cnn_nexus10.json | 17 + .../other/FAILING-skia_wordpress_desktop.json | 17 + .../other/LAYERS-skia_yahoonews_desktop.json | 13 + .../skp/page_sets/other/OLD-skia_desktop_set.json | 132 ++++++ .../page_sets/other/OLD-skia_galaxynexus_set.json | 13 + .../skp/page_sets/other/OLD-skia_nexus10_set.json | 172 ++++++++ .../other/TIMINGOUT-skia_transformice_nexus10.json | 13 + .../skp/page_sets/other/skia_maybe_later_set.json | 12 + .../page_sets/other/skia_onlinewsj_nexus10.json | 18 + tools/skp/page_sets/skia_amazon_desktop.py | 45 ++ tools/skp/page_sets/skia_androidpolice_nexus10.py | 46 +++ tools/skp/page_sets/skia_baidu_desktop.py | 45 ++ tools/skp/page_sets/skia_blogger_desktop.py | 46 +++ tools/skp/page_sets/skia_booking_desktop.py | 44 ++ tools/skp/page_sets/skia_carsvg_desktop.py | 44 ++ tools/skp/page_sets/skia_chalkboard_desktop.py | 45 ++ tools/skp/page_sets/skia_cnet_nexus10.py | 44 ++ tools/skp/page_sets/skia_css3gradients_desktop.py | 44 ++ .../page_sets/skia_culturalsolutions_nexus10.py | 44 ++ tools/skp/page_sets/skia_cuteoverload_nexus10.py | 44 ++ tools/skp/page_sets/skia_deviantart_nexus10.py | 44 ++ tools/skp/page_sets/skia_digg_nexus10.py | 44 ++ tools/skp/page_sets/skia_ebay_desktop.py | 46 +++ tools/skp/page_sets/skia_engadget_nexus10.py | 44 ++ tools/skp/page_sets/skia_espn_desktop.py | 44 ++ tools/skp/page_sets/skia_facebook_desktop.py | 46 +++ tools/skp/page_sets/skia_fontwipe_desktop.py | 45 ++ tools/skp/page_sets/skia_forecastio_desktop.py | 44 ++ tools/skp/page_sets/skia_frantzen_nexus10.py | 44 ++ tools/skp/page_sets/skia_gamedeksiam_nexus10.py | 44 ++ tools/skp/page_sets/skia_gmail_nexus10.py | 45 ++ tools/skp/page_sets/skia_gmailthread_desktop.py | 45 ++ tools/skp/page_sets/skia_googleblog_nexus10.py | 44 ++ tools/skp/page_sets/skia_googlecalendar_nexus10.py | 45 ++ tools/skp/page_sets/skia_googlehome_desktop.py | 44 ++ tools/skp/page_sets/skia_googleplus_desktop.py | 44 ++ .../skia_googlespreadsheetdashed_desktop.py | 46 +++ tools/skp/page_sets/skia_gspro_nexus10.py | 44 ++ tools/skp/page_sets/skia_gws_desktop.py | 44 ++ tools/skp/page_sets/skia_hsfi_nexus10.py | 44 ++ tools/skp/page_sets/skia_jsfiddlebigcar_desktop.py | 44 ++ .../page_sets/skia_jsfiddlehumperclip_desktop.py | 44 ++ tools/skp/page_sets/skia_linkedin_desktop.py | 44 ++ tools/skp/page_sets/skia_mapsvg_desktop.py | 45 ++ tools/skp/page_sets/skia_mercurynews_nexus10.py | 44 ++ tools/skp/page_sets/skia_mlb_nexus10.py | 44 ++ tools/skp/page_sets/skia_mobilenews_desktop.py | 44 ++ tools/skp/page_sets/skia_mozilla_nexus10.py | 44 ++ tools/skp/page_sets/skia_nofolo_nexus10.py | 44 ++ tools/skp/page_sets/skia_nytimes_nexus10.py | 44 ++ tools/skp/page_sets/skia_oldinboxapp_desktop.py | 45 ++ tools/skp/page_sets/skia_pinterest_desktop.py | 44 ++ tools/skp/page_sets/skia_pokemonwiki_desktop.py | 44 ++ tools/skp/page_sets/skia_pravda_nexus10.py | 44 ++ .../page_sets/skia_rectangletransition_desktop.py | 45 ++ tools/skp/page_sets/skia_sahadan_nexus10.py | 44 ++ tools/skp/page_sets/skia_samoasvg_desktop.py | 45 ++ tools/skp/page_sets/skia_sfgate_desktop.py | 44 ++ tools/skp/page_sets/skia_slashdot_nexus10.py | 44 ++ tools/skp/page_sets/skia_techmeme_nexus10.py | 44 ++ tools/skp/page_sets/skia_tigersvg_desktop.py | 45 ++ tools/skp/page_sets/skia_twitter_desktop.py | 44 ++ tools/skp/page_sets/skia_ukwsj_nexus10.py | 44 ++ tools/skp/page_sets/skia_vnexpress_nexus10.py | 44 ++ tools/skp/page_sets/skia_weather_desktop.py | 44 ++ tools/skp/page_sets/skia_wikipedia_galaxynexus.py | 44 ++ tools/skp/page_sets/skia_worldjournal_nexus10.py | 44 ++ tools/skp/page_sets/skia_wowwiki_desktop.py | 44 ++ tools/skp/page_sets/skia_yahooanswers_desktop.py | 44 ++ tools/skp/page_sets/skia_youtube_desktop.py | 44 ++ tools/skp/page_sets/skia_youtubetvvideo_desktop.py | 44 ++ tools/skp/recreate_skps.py | 92 +++++ tools/skp/webpages_playback.py | 455 +++++++++++++++++++++ 77 files changed, 3722 insertions(+), 1 deletion(-) create mode 100644 tools/skp/page_sets/data/README create mode 100644 tools/skp/page_sets/other/DOWN-skia_br337_desktop.json create mode 100644 tools/skp/page_sets/other/FAILING-skia_cnn_nexus10.json create mode 100644 tools/skp/page_sets/other/FAILING-skia_wordpress_desktop.json create mode 100644 tools/skp/page_sets/other/LAYERS-skia_yahoonews_desktop.json create mode 100644 tools/skp/page_sets/other/OLD-skia_desktop_set.json create mode 100644 tools/skp/page_sets/other/OLD-skia_galaxynexus_set.json create mode 100644 tools/skp/page_sets/other/OLD-skia_nexus10_set.json create mode 100644 tools/skp/page_sets/other/TIMINGOUT-skia_transformice_nexus10.json create mode 100644 tools/skp/page_sets/other/skia_maybe_later_set.json create mode 100644 tools/skp/page_sets/other/skia_onlinewsj_nexus10.json create mode 100644 tools/skp/page_sets/skia_amazon_desktop.py create mode 100644 tools/skp/page_sets/skia_androidpolice_nexus10.py create mode 100644 tools/skp/page_sets/skia_baidu_desktop.py create mode 100644 tools/skp/page_sets/skia_blogger_desktop.py create mode 100644 tools/skp/page_sets/skia_booking_desktop.py create mode 100644 tools/skp/page_sets/skia_carsvg_desktop.py create mode 100644 tools/skp/page_sets/skia_chalkboard_desktop.py create mode 100644 tools/skp/page_sets/skia_cnet_nexus10.py create mode 100644 tools/skp/page_sets/skia_css3gradients_desktop.py create mode 100644 tools/skp/page_sets/skia_culturalsolutions_nexus10.py create mode 100644 tools/skp/page_sets/skia_cuteoverload_nexus10.py create mode 100644 tools/skp/page_sets/skia_deviantart_nexus10.py create mode 100644 tools/skp/page_sets/skia_digg_nexus10.py create mode 100644 tools/skp/page_sets/skia_ebay_desktop.py create mode 100644 tools/skp/page_sets/skia_engadget_nexus10.py create mode 100644 tools/skp/page_sets/skia_espn_desktop.py create mode 100644 tools/skp/page_sets/skia_facebook_desktop.py create mode 100644 tools/skp/page_sets/skia_fontwipe_desktop.py create mode 100644 tools/skp/page_sets/skia_forecastio_desktop.py create mode 100644 tools/skp/page_sets/skia_frantzen_nexus10.py create mode 100644 tools/skp/page_sets/skia_gamedeksiam_nexus10.py create mode 100644 tools/skp/page_sets/skia_gmail_nexus10.py create mode 100644 tools/skp/page_sets/skia_gmailthread_desktop.py create mode 100644 tools/skp/page_sets/skia_googleblog_nexus10.py create mode 100644 tools/skp/page_sets/skia_googlecalendar_nexus10.py create mode 100644 tools/skp/page_sets/skia_googlehome_desktop.py create mode 100644 tools/skp/page_sets/skia_googleplus_desktop.py create mode 100644 tools/skp/page_sets/skia_googlespreadsheetdashed_desktop.py create mode 100644 tools/skp/page_sets/skia_gspro_nexus10.py create mode 100644 tools/skp/page_sets/skia_gws_desktop.py create mode 100644 tools/skp/page_sets/skia_hsfi_nexus10.py create mode 100644 tools/skp/page_sets/skia_jsfiddlebigcar_desktop.py create mode 100644 tools/skp/page_sets/skia_jsfiddlehumperclip_desktop.py create mode 100644 tools/skp/page_sets/skia_linkedin_desktop.py create mode 100644 tools/skp/page_sets/skia_mapsvg_desktop.py create mode 100644 tools/skp/page_sets/skia_mercurynews_nexus10.py create mode 100644 tools/skp/page_sets/skia_mlb_nexus10.py create mode 100644 tools/skp/page_sets/skia_mobilenews_desktop.py create mode 100644 tools/skp/page_sets/skia_mozilla_nexus10.py create mode 100644 tools/skp/page_sets/skia_nofolo_nexus10.py create mode 100644 tools/skp/page_sets/skia_nytimes_nexus10.py create mode 100644 tools/skp/page_sets/skia_oldinboxapp_desktop.py create mode 100644 tools/skp/page_sets/skia_pinterest_desktop.py create mode 100644 tools/skp/page_sets/skia_pokemonwiki_desktop.py create mode 100644 tools/skp/page_sets/skia_pravda_nexus10.py create mode 100644 tools/skp/page_sets/skia_rectangletransition_desktop.py create mode 100644 tools/skp/page_sets/skia_sahadan_nexus10.py create mode 100644 tools/skp/page_sets/skia_samoasvg_desktop.py create mode 100644 tools/skp/page_sets/skia_sfgate_desktop.py create mode 100644 tools/skp/page_sets/skia_slashdot_nexus10.py create mode 100644 tools/skp/page_sets/skia_techmeme_nexus10.py create mode 100644 tools/skp/page_sets/skia_tigersvg_desktop.py create mode 100644 tools/skp/page_sets/skia_twitter_desktop.py create mode 100644 tools/skp/page_sets/skia_ukwsj_nexus10.py create mode 100644 tools/skp/page_sets/skia_vnexpress_nexus10.py create mode 100644 tools/skp/page_sets/skia_weather_desktop.py create mode 100644 tools/skp/page_sets/skia_wikipedia_galaxynexus.py create mode 100644 tools/skp/page_sets/skia_worldjournal_nexus10.py create mode 100644 tools/skp/page_sets/skia_wowwiki_desktop.py create mode 100644 tools/skp/page_sets/skia_yahooanswers_desktop.py create mode 100644 tools/skp/page_sets/skia_youtube_desktop.py create mode 100644 tools/skp/page_sets/skia_youtubetvvideo_desktop.py create mode 100644 tools/skp/recreate_skps.py create mode 100644 tools/skp/webpages_playback.py diff --git a/.gitignore b/.gitignore index b8d31f3c84..4b2564c9d1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,6 @@ platform_tools/chromeos/third_party/externals platform_tools/chromeos/toolchain third_party/externals tools/bug_chomper/oauth_client_secret.json +tools/skp/page_sets/data/*.json +tools/skp/page_sets/data/*.wpr xcodebuild diff --git a/DEPS b/DEPS index 03479b7328..66bf798896 100644 --- a/DEPS +++ b/DEPS @@ -3,7 +3,7 @@ use_relative_paths = True # Dependencies on outside packages. # deps = { - "common": "https://skia.googlesource.com/common.git@af1de867422c42855ae54ed3838c62ea445ea6b4", + "common": "https://skia.googlesource.com/common.git@5eee100abacd0c2fc89121418627cf55ca2eda31", "third_party/externals/angle2" : "https://chromium.googlesource.com/angle/angle.git@23a8a433529d9db23882c702a29d5e594841563d", "third_party/externals/freetype" : "https://skia.googlesource.com/third_party/freetype2.git@VER-2-5-0-1", diff --git a/tools/skp/page_sets/data/README b/tools/skp/page_sets/data/README new file mode 100644 index 0000000000..b98644ee17 --- /dev/null +++ b/tools/skp/page_sets/data/README @@ -0,0 +1,2 @@ +This directory is used by the webpages_playback.py script to copy over artifacts +from Google Storage. diff --git a/tools/skp/page_sets/other/DOWN-skia_br337_desktop.json b/tools/skp/page_sets/other/DOWN-skia_br337_desktop.json new file mode 100644 index 0000000000..103a64be10 --- /dev/null +++ b/tools/skp/page_sets/other/DOWN-skia_br337_desktop.json @@ -0,0 +1,13 @@ +{ + "description": "br.337 for Skia for Desktop.", + "archive_data_file": "data/skia_br337_desktop.json", + "credentials_path": "data/credentials.json", + "smoothness": { "action": "scroll" }, + "pages": [ + { + "url": "http://br.337.com/pages/196/DDTank", + "wait_seconds": 15.0, + "why": "from Tom W's list" + } + ] +} diff --git a/tools/skp/page_sets/other/FAILING-skia_cnn_nexus10.json b/tools/skp/page_sets/other/FAILING-skia_cnn_nexus10.json new file mode 100644 index 0000000000..77b2851f96 --- /dev/null +++ b/tools/skp/page_sets/other/FAILING-skia_cnn_nexus10.json @@ -0,0 +1,17 @@ +{ + "description": "CNN for Skia for Nexus10.", + "archive_data_file": "data/skia_cnn_nexus10.json", + "credentials_path": "data/credentials.json", + "user_agent_type": "tablet", + "smoothness": { "action": "scroll" }, + "pages": [ + { + "url": "http://www.cnn.com/2012/10/03/politics/michelle-obama-debate/index.html", + "why": "#2 news worldwide", + "navigate_steps" : [ + { "action": "navigate" }, + { "action": "wait", "seconds": 15 } + ] + } + ] +} diff --git a/tools/skp/page_sets/other/FAILING-skia_wordpress_desktop.json b/tools/skp/page_sets/other/FAILING-skia_wordpress_desktop.json new file mode 100644 index 0000000000..a671a5932b --- /dev/null +++ b/tools/skp/page_sets/other/FAILING-skia_wordpress_desktop.json @@ -0,0 +1,17 @@ +{ + "description": "Wordpress for Skia Desktop.", + "archive_data_file": "data/skia_wordpress_desktop.json", + "credentials_path": "data/credentials.json", + "smoothness": { "action": "scroll" }, + "pages": [ + { + "name": "Wordpress", + "url": "http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks-for-august-2012/", + "why": "#18 (Alexa global), Picked an interesting post", + "navigate_steps" : [ + { "action": "navigate" }, + { "action": "wait", "seconds": 5 } + ] + } + ] +} diff --git a/tools/skp/page_sets/other/LAYERS-skia_yahoonews_desktop.json b/tools/skp/page_sets/other/LAYERS-skia_yahoonews_desktop.json new file mode 100644 index 0000000000..82d260dee6 --- /dev/null +++ b/tools/skp/page_sets/other/LAYERS-skia_yahoonews_desktop.json @@ -0,0 +1,13 @@ +{ + "description": "Yahoo News for Skia Desktop.", + "archive_data_file": "data/skia_yahoonews_desktop.json", + "credentials_path": "data/credentials.json", + "smoothness": { "action": "scroll" }, + "pages": [ + { + "url": "http://news.yahoo.com", + "wait_seconds": 15.0, + "why": "#1 news worldwide (Alexa global)" + } + ] +} diff --git a/tools/skp/page_sets/other/OLD-skia_desktop_set.json b/tools/skp/page_sets/other/OLD-skia_desktop_set.json new file mode 100644 index 0000000000..8ec91c4fd1 --- /dev/null +++ b/tools/skp/page_sets/other/OLD-skia_desktop_set.json @@ -0,0 +1,132 @@ +{ + "description": "Pages hand-picked for Skia Desktop.", + "archive_path": "data/skia_desktop_set.wpr", + "credentials_path": "data/credentials.json", + "pages": [ + { + "url": "http://ie.microsoft.com/testdrive/Performance/Chalkboard/Images/Chalkboard.svg", + "wait_time_after_navigate": 15.0, + "why": "from fmalita" + }, + { + "url": "https://www.google.com/#hl=en&q=barack+obama", + "wait_time_after_navigate": 5.0, + "why": "top google property; a google tab is often open" + }, + { + "url": "https://plus.google.com/110031535020051778989/posts", + "why": "social; top google property; Public profile; infinite scrolls", + "wait_time_after_navigate": 5.0, + "scroll_is_infinite": true + }, + { + "name": "Blogger", + "url": "http://googlewebmastercentral.blogspot.com/", + "wait_time_after_navigate": 5.0, + "why": "#11 (Alexa global), google property; some blogger layouts have infinite scroll but more interesting" + }, + { + "name": "Wordpress", + "url": "http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks-for-august-2012/", + "wait_time_after_navigate": 5.0, + "why": "#18 (Alexa global), Picked an interesting post" + }, + { + "name": "Facebook", + "url": "http://www.facebook.com/barackobama", + "wait_time_after_navigate": 5.0, + "why": "top social,Public profile", + "credentials": "facebook", + "scroll_is_infinite": true, + "stress_memory": { + "action": "compound_interaction", + "actions": [ + { + "action": "click_to_navigate_interaction", + "selector": "a[href=\"http://www.facebook.com/WomenforObama\"]" + }, + { + "action": "click_to_navigate_interaction", + "selector": "a[href=\"http://www.facebook.com/WomenforObama/info\"]" + }, + { + "action": "click_to_navigate_interaction", + "selector": "a[href=\"http://www.facebook.com/?ref=tn_tnmn\"]" + } + ] + } + }, + { + "name": "LinkedIn", + "url": "http://www.linkedin.com/in/linustorvalds", + "wait_time_after_navigate": 5.0, + "why": "#12 (Alexa global),Public profile" + }, + { + "name": "Twitter", + "url": "http://twitter.com/katyperry", + "why": "#8 (Alexa global),Picked an interesting page", + "wait_time_after_navigate": 5.0, + "scroll_is_infinite": true + }, + { + "name": "Pinterest", + "url": "http://pinterest.com", + "why": "#37 (Alexa global)", + "wait_time_after_navigate": 5.0, + "scroll_is_infinite": true + }, + { + "name": "ESPN", + "url": "http://espn.go.com", + "wait_time_after_navigate": 5.0, + "why": "#1 sports" + }, + { + "url": "http://news.yahoo.com", + "wait_time_after_navigate": 5.0, + "why": "#1 news worldwide (Alexa global)" + }, + { + "name": "Weather.com", + "url": "http://www.weather.com/weather/right-now/Mountain+View+CA+94043", + "wait_time_after_navigate": 5.0, + "why": "#7 (Alexa news); #27 total time spent,Picked interesting page" + }, + { + "url": "http://www.amazon.com", + "wait_time_after_navigate": 5.0, + "why": "#1 world commerce website by visits; #3 commerce in the US by time spent" + }, + { + "url": "http://games.yahoo.com", + "wait_time_after_navigate": 5.0, + "why": "#1 games according to Alexa (with actual games in it)" + }, + { + "url": "http://booking.com", + "wait_time_after_navigate": 5.0, + "why": "#1 Alexa recreation" + }, + { + "url": "http://answers.yahoo.com", + "wait_time_after_navigate": 5.0, + "why": "#1 Alexa reference" + }, + { + "url": "http://sports.yahoo.com/", + "wait_time_after_navigate": 5.0, + "why": "#1 Alexa sports" + }, + { + "url": "http://techcrunch.com", + "wait_time_after_navigate": 5.0, + "why": "top tech blog" + }, + { + "url": "http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920", + "wait_time_after_navigate": 5.0, + "why": "#5 (Alexa) most visited worldwide" + } + ] +} diff --git a/tools/skp/page_sets/other/OLD-skia_galaxynexus_set.json b/tools/skp/page_sets/other/OLD-skia_galaxynexus_set.json new file mode 100644 index 0000000000..018260f374 --- /dev/null +++ b/tools/skp/page_sets/other/OLD-skia_galaxynexus_set.json @@ -0,0 +1,13 @@ +{ + "description": "Pages hand-picked for Skia for Galaxy Nexus.", + "archive_path": "data/skia_galaxynexus_set.wpr", + "credentials_path": "data/credentials.json", + "user_agent_type": "mobile", + "pages": [ + { + "url": "http://en.m.wikipedia.org/wiki/List_of_The_X-Files_episodes#section_2", + "wait_time_after_navigate": 5.0, + "why": "#6 (Alexa) most visited worldwide; from robertphillips" + } + ] +} diff --git a/tools/skp/page_sets/other/OLD-skia_nexus10_set.json b/tools/skp/page_sets/other/OLD-skia_nexus10_set.json new file mode 100644 index 0000000000..66f824153d --- /dev/null +++ b/tools/skp/page_sets/other/OLD-skia_nexus10_set.json @@ -0,0 +1,172 @@ +{ + "description": "Pages hand-picked for Skia for Nexus10.", + "archive_path": "data/skia_nexus10_set.wpr", + "credentials_path": "data/credentials.json", + "user_agent_type": "nexus10", + "pages": [ + { + "url": "http://game.deksiam.in.th/", + "wait_time_after_navigate": 30.0, + "why": "from Tom W's list" + }, + { + "url": "http://www.sahadan.com/default.aspx", + "wait_time_after_navigate": 15.0, + "why": "from Tom W's list" + }, + { + "url": "http://techmeme.com/", + "wait_time_after_navigate": 5.0, + "why": "from klobag" + }, + { + "url": "http://www.cnet.com/", + "wait_time_after_navigate": 5.0, + "why": "from klobag" + }, + { + "url": "http://www.androidpolice.com/2012/10/03/rumor-evidence-mounts-that-an-lg-optimus-g-nexus-is-coming-along-with-a-nexus-phone-certification-program/", + "wait_time_after_navigate": 5.0, + "why": "for Clank CY" + }, + { + "url": "http://br.337.com/pages/196/DDTank", + "wait_time_after_navigate": 5.0, + "why": "from Tom W's list" + }, + { + "url": "http://www.cnn.com/2012/10/03/politics/michelle-obama-debate/index.html", + "wait_time_after_navigate": 15.0, + "why": "#2 news worldwide" + }, + { + "url": "http://culturalsolutions.co.uk/", + "wait_time_after_navigate": 5.0, + "why": "from parallax scrolling thread" + }, + { + "url": "http://cuteoverload.com/", + "wait_time_after_navigate": 5.0, + "why": "for Clank CY" + }, + { + "url": "http://digg.com/", + "wait_time_after_navigate": 5.0, + "why": "for Clank CY" + }, + { + "url": "http://www.frantzen-lindeberg.com/se/", + "wait_time_after_navigate": 15.0, + "why": "http://code.google.com/p/chromium/issues/detail?id=136555" + }, + { + "url": "https://mail.google.com/mail/", + "wait_time_after_navigate": 30.0, + "why": "productivity, top google properties", + "credentials": "google", + "scrollable_element_function": "function(callback) { gmonkey.load('2.0', function(api) { callback(api.getScrollableElement()); }); }" + }, + { + "url": "https://www.google.com/calendar/", + "wait_time_after_navigate": 5.0, + "why": "productivity, top google properties", + "credentials": "google", + "scrollable_element_function": "function(callback) { callback(document.getElementById('scrolltimedeventswk')); }" + }, + { + "url": "http://googleblog.blogspot.co.uk/", + "wait_time_after_navigate": 5.0, + "why": "for Clank CY" + }, + { + "url": "http://www.gsp.ro/click-less-think-more", + "wait_time_after_navigate": 5.0, + "why": "for Clank CY" + }, + { + "url": "http://www.hs.fi/", + "wait_time_after_navigate": 5.0, + "why": "for Clank CY" + }, + { + "url": "http://mlb.mlb.com/index.jsp", + "wait_time_after_navigate": 5.0, + "why": "from Arrow scrolling thread" + }, + { + "url": "http://nofolo.com/", + "wait_time_after_navigate": 5.0, + "why": "http://code.google.com/p/chromium/issues/detail?id=136555" + }, + { + "url": "http://www.nytimes.com/", + "wait_time_after_navigate": 5.0, + "why": "for Clank CY" + }, + { + "url": "http://planet.mozilla.org/", + "wait_time_after_navigate": 5.0, + "why": "" + }, + { + "url": "http://www.pravda.ru/", + "wait_time_after_navigate": 5.0, + "why": "cyrillic font test case" + }, + { + "url": "http://www.sfgate.com/", + "wait_time_after_navigate": 5.0, + "why": "from Arrow scrolling thread" + }, + { + "url": "http://slashdot.org/", + "wait_time_after_navigate": 5.0, + "why": "" + }, + { + "url": "http://www.theverge.com/", + "wait_time_after_navigate": 30.0, + "why": "for Clank CY" + }, + { + "url": "http://www.transformice.com/", + "wait_time_after_navigate": 5.0, + "why": "from Tom W's list" + }, + { + "url": "http://uk.wsj.com/home-page", + "wait_time_after_navigate": 5.0, + "why": "for Clank CY" + }, + { + "url": "http://vnexpress.net/", + "wait_time_after_navigate": 5.0, + "why": "from Tom W's list" + }, + { + "url": "http://worldjournal.com/", + "wait_time_after_navigate": 5.0, + "why": "Chinese font test case" + }, + { + "url": "http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria", + "wait_time_after_navigate": 5.0, + "why": "http://code.google.com/p/chromium/issues/detail?id=136555" + }, + { + "url": "http://online.wsj.com/home-page", + "wait_time_after_navigate": 5.0, + "why": "" + }, + { + "url": "http://www.youtube.com/watch?v=PC57z-oDPLs", + "wait_time_after_navigate": 5.0, + "why": "#3 (Alexa global)" + }, + { + "url": "http://www.deviantart.com/", + "wait_time_after_navigate": 5.0, + "why": "from caryclark" + } + ] +} diff --git a/tools/skp/page_sets/other/TIMINGOUT-skia_transformice_nexus10.json b/tools/skp/page_sets/other/TIMINGOUT-skia_transformice_nexus10.json new file mode 100644 index 0000000000..4f292606bf --- /dev/null +++ b/tools/skp/page_sets/other/TIMINGOUT-skia_transformice_nexus10.json @@ -0,0 +1,13 @@ +{ + "description": "Transformice for Skia for Nexus10.", + "archive_path": "data/skia_transformice_nexus10.wpr", + "credentials_path": "data/credentials.json", + "user_agent_type": "nexus10", + "pages": [ + { + "url": "http://www.transformice.com/", + "wait_time_after_navigate": 30.0, + "why": "from Tom W's list" + } + ] +} diff --git a/tools/skp/page_sets/other/skia_maybe_later_set.json b/tools/skp/page_sets/other/skia_maybe_later_set.json new file mode 100644 index 0000000000..9c04ff0a33 --- /dev/null +++ b/tools/skp/page_sets/other/skia_maybe_later_set.json @@ -0,0 +1,12 @@ +{ + "description": "Pages we may add to the skia sets later.", + "archive_path": "data/skia_maybe_later_set.wpr", + "credentials_path": "data/credentials.json", + "pages": [ + { + "url": "http://habrahabr.ru/post/149892/#habracut", + "wait_time_after_navigate": 5.0, + "why": "from chrome's list of profiled sites" + } + ] +} diff --git a/tools/skp/page_sets/other/skia_onlinewsj_nexus10.json b/tools/skp/page_sets/other/skia_onlinewsj_nexus10.json new file mode 100644 index 0000000000..3b5e8e83d2 --- /dev/null +++ b/tools/skp/page_sets/other/skia_onlinewsj_nexus10.json @@ -0,0 +1,18 @@ +{ + "description": "onlinewsj for Skia for Nexus10.", + "archive_data_file": "data/skia_onlinewsj_nexus10.json", + "credentials_path": "data/credentials.json", + "user_agent_type": "tablet", + "smoothness": { "action": "scroll" }, + "pages": [ + { + "url": "http://online.wsj.com/home-page", + "why": "", + "navigate_steps" : [ + { "action": "navigate" }, + { "action": "navigate" }, + { "action": "wait", "seconds": 60 } + ] + } + ] +} diff --git a/tools/skp/page_sets/skia_amazon_desktop.py b/tools/skp/page_sets/skia_amazon_desktop.py new file mode 100644 index 0000000000..961ea66881 --- /dev/null +++ b/tools/skp/page_sets/skia_amazon_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path = 'data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_amazon_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_amazon_desktop.json') + + urls_list = [ + # Why: #1 world commerce website by visits; #3 commerce in the US by time + # spent. + 'http://www.amazon.com', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_androidpolice_nexus10.py b/tools/skp/page_sets/skia_androidpolice_nexus10.py new file mode 100644 index 0000000000..207bf7a732 --- /dev/null +++ b/tools/skp/page_sets/skia_androidpolice_nexus10.py @@ -0,0 +1,46 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_androidpolice_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_androidpolice_nexus10.json') + + urls_list = [ + # Why: for Clank CY. + ('http://www.androidpolice.com/2012/10/03/rumor-evidence-mounts-that-an-' + 'lg-optimus-g-nexus-is-coming-along-with-a-nexus-phone-certification-' + 'program/'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_baidu_desktop.py b/tools/skp/page_sets/skia_baidu_desktop.py new file mode 100644 index 0000000000..946d5a74a8 --- /dev/null +++ b/tools/skp/page_sets/skia_baidu_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_baidu_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_baidu_desktop.json') + + urls_list = [ + # Why: #5 (Alexa) most visited worldwide. + ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' + 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_blogger_desktop.py b/tools/skp/page_sets/skia_blogger_desktop.py new file mode 100644 index 0000000000..801cf0d7f6 --- /dev/null +++ b/tools/skp/page_sets/skia_blogger_desktop.py @@ -0,0 +1,46 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_blogger_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.NavigateToPage(self) + action_runner.Wait(60) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_blogger_desktop.json') + + urls_list = [ + # Why: #11 (Alexa global), google property; some blogger layouts have + # infinite scroll but more interesting + 'http://googlewebmastercentral.blogspot.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_booking_desktop.py b/tools/skp/page_sets/skia_booking_desktop.py new file mode 100644 index 0000000000..8ab54750da --- /dev/null +++ b/tools/skp/page_sets/skia_booking_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_booking_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_booking_desktop.json') + + urls_list = [ + # Why: #1 Alexa recreation. + 'http://booking.com', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_carsvg_desktop.py b/tools/skp/page_sets/skia_carsvg_desktop.py new file mode 100644 index 0000000000..13550f516b --- /dev/null +++ b/tools/skp/page_sets/skia_carsvg_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_carsvg_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_carsvg_desktop.json') + + urls_list = [ + # Why: from fmalita + 'http://codinginparadise.org/projects/svgweb/samples/svg-files/car.svg', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_chalkboard_desktop.py b/tools/skp/page_sets/skia_chalkboard_desktop.py new file mode 100644 index 0000000000..fab91f6206 --- /dev/null +++ b/tools/skp/page_sets/skia_chalkboard_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_chalkboard_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_chalkboard_desktop.json') + + urls_list = [ + # Why: from fmalita + ('http://ie.microsoft.com/testdrive/Performance/Chalkboard/Images/' + 'Chalkboard.svg'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_cnet_nexus10.py b/tools/skp/page_sets/skia_cnet_nexus10.py new file mode 100644 index 0000000000..6672a69335 --- /dev/null +++ b/tools/skp/page_sets/skia_cnet_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_cnet_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_cnet_nexus10.json') + + urls_list = [ + # Why: from klobag. + 'http://www.cnet.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_css3gradients_desktop.py b/tools/skp/page_sets/skia_css3gradients_desktop.py new file mode 100644 index 0000000000..ef80f5cea9 --- /dev/null +++ b/tools/skp/page_sets/skia_css3gradients_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_css3gradients_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_css3gradients_desktop.json') + + urls_list = [ + # Why: http://code.google.com/p/chromium/issues/detail?id=168448 + 'https://www.webkit.org/blog/1424/css3-gradients/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_culturalsolutions_nexus10.py b/tools/skp/page_sets/skia_culturalsolutions_nexus10.py new file mode 100644 index 0000000000..4157faaa2d --- /dev/null +++ b/tools/skp/page_sets/skia_culturalsolutions_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_culturalsolutions_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_culturalsolutions_nexus10.json') + + urls_list = [ + # Why: from parallax scrolling thread. + 'http://culturalsolutions.co.uk/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_cuteoverload_nexus10.py b/tools/skp/page_sets/skia_cuteoverload_nexus10.py new file mode 100644 index 0000000000..cc43e858c7 --- /dev/null +++ b/tools/skp/page_sets/skia_cuteoverload_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_cuteoverload_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_cuteoverload_nexus10.json') + + urls_list = [ + # Why: for Clank CY. + 'http://cuteoverload.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_deviantart_nexus10.py b/tools/skp/page_sets/skia_deviantart_nexus10.py new file mode 100644 index 0000000000..5e5c29a268 --- /dev/null +++ b/tools/skp/page_sets/skia_deviantart_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_deviantart_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_deviantart_nexus10.json') + + urls_list = [ + # Why: from caryclark + 'http://www.deviantart.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_digg_nexus10.py b/tools/skp/page_sets/skia_digg_nexus10.py new file mode 100644 index 0000000000..dd764b03dd --- /dev/null +++ b/tools/skp/page_sets/skia_digg_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_digg_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_digg_nexus10.json') + + urls_list = [ + # Why: from Clank CY. + 'http://digg.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_ebay_desktop.py b/tools/skp/page_sets/skia_ebay_desktop.py new file mode 100644 index 0000000000..4f5adb67fb --- /dev/null +++ b/tools/skp/page_sets/skia_ebay_desktop.py @@ -0,0 +1,46 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_ebay_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_ebay_desktop.json') + + urls_list = [ + # Why: #1 commerce website by time spent by users in US. + ('http://www.ebay.com/ctg/Harry-Potter-and-Deathly-Hallows-Year-7-J-K-' + 'Rowling-2007-Cassette-Unabridged-/123341182?_dmpt=US_Childrens_Books' + '&_pcategid=279&_pcatid=4&_refkw=harry+potter+and+the+deathly+hallows'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_engadget_nexus10.py b/tools/skp/page_sets/skia_engadget_nexus10.py new file mode 100644 index 0000000000..65ea2c18ae --- /dev/null +++ b/tools/skp/page_sets/skia_engadget_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_engadget_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_engadget_nexus10.json') + + urls_list = [ + # Why: from klobag. + 'http://www.engadget.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_espn_desktop.py b/tools/skp/page_sets/skia_espn_desktop.py new file mode 100644 index 0000000000..5061c55f35 --- /dev/null +++ b/tools/skp/page_sets/skia_espn_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_espn_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_espn_desktop.json') + + urls_list = [ + # Why: #1 sports. + 'http://espn.go.com', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_facebook_desktop.py b/tools/skp/page_sets/skia_facebook_desktop.py new file mode 100644 index 0000000000..167c37ebb1 --- /dev/null +++ b/tools/skp/page_sets/skia_facebook_desktop.py @@ -0,0 +1,46 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json' + ) + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_facebook_desktop.json' + self.credentials = 'facebook' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_facebook_desktop.json') + + urls_list = [ + # Why: Top social, public profile. + 'http://www.facebook.com/barackobama', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_fontwipe_desktop.py b/tools/skp/page_sets/skia_fontwipe_desktop.py new file mode 100644 index 0000000000..381a831986 --- /dev/null +++ b/tools/skp/page_sets/skia_fontwipe_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_fontwipe_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_fontwipe_desktop.json') + + urls_list = [ + # Why: Page from Chromium's silk test cases. + ('http://src.chromium.org/chrome/trunk/src/tools/perf/page_sets/' + 'key_silk_cases/font_wipe.html'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_forecastio_desktop.py b/tools/skp/page_sets/skia_forecastio_desktop.py new file mode 100644 index 0000000000..8c4d39c684 --- /dev/null +++ b/tools/skp/page_sets/skia_forecastio_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_forecastio_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(20) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_forecastio_desktop.json') + + urls_list = [ + # Why: Page from Chromium's silk test cases + 'http://forecast.io?tap', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_frantzen_nexus10.py b/tools/skp/page_sets/skia_frantzen_nexus10.py new file mode 100644 index 0000000000..4017e25b16 --- /dev/null +++ b/tools/skp/page_sets/skia_frantzen_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_frantzen_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_frantzen_nexus10.json') + + urls_list = [ + # Why: http://code.google.com/p/chromium/issues/detail?id=136555 + 'http://www.frantzen-lindeberg.com/se/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_gamedeksiam_nexus10.py b/tools/skp/page_sets/skia_gamedeksiam_nexus10.py new file mode 100644 index 0000000000..5e1c52ae95 --- /dev/null +++ b/tools/skp/page_sets/skia_gamedeksiam_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_gamedeksiam_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_gamedeksiam_nexus10.json') + + urls_list = [ + # Why: from Tom W's list. + 'http://game.deksiam.in.th/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_gmail_nexus10.py b/tools/skp/page_sets/skia_gmail_nexus10.py new file mode 100644 index 0000000000..2f5f090f5c --- /dev/null +++ b/tools/skp/page_sets/skia_gmail_nexus10.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_gmail_nexus10.json' + self.credentials = 'google' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(10) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_gmail_nexus10.json') + + urls_list = [ + # Why: productivity, top google properties + 'https://mail.google.com/mail/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_gmailthread_desktop.py b/tools/skp/page_sets/skia_gmailthread_desktop.py new file mode 100644 index 0000000000..03409b8287 --- /dev/null +++ b/tools/skp/page_sets/skia_gmailthread_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_gmailthread_desktop.json' + self.credentials = 'google' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(60) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_gmailthread_desktop.json') + + urls_list = [ + # Why: productivity, top google properties, long email thread. + 'https://mail.google.com/mail/?shva=1#inbox/13ba91194d0b8a2e', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_googleblog_nexus10.py b/tools/skp/page_sets/skia_googleblog_nexus10.py new file mode 100644 index 0000000000..4e358c23be --- /dev/null +++ b/tools/skp/page_sets/skia_googleblog_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_googleblog_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_googleblog_nexus10.json') + + urls_list = [ + # Why: for Clank CY + 'http://googleblog.blogspot.co.uk/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_googlecalendar_nexus10.py b/tools/skp/page_sets/skia_googlecalendar_nexus10.py new file mode 100644 index 0000000000..41224e332d --- /dev/null +++ b/tools/skp/page_sets/skia_googlecalendar_nexus10.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_googlecalendar_nexus10.json' + self.credentials = 'google' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_googlecalendar_nexus10.json') + + urls_list = [ + # Why: productivity, top google properties + 'https://www.google.com/calendar/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_googlehome_desktop.py b/tools/skp/page_sets/skia_googlehome_desktop.py new file mode 100644 index 0000000000..35857b3502 --- /dev/null +++ b/tools/skp/page_sets/skia_googlehome_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_googlehome_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_googlehome_desktop.json') + + urls_list = [ + # Why: top google property; a google tab is often open + 'http://www.google.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_googleplus_desktop.py b/tools/skp/page_sets/skia_googleplus_desktop.py new file mode 100644 index 0000000000..c95166ccc5 --- /dev/null +++ b/tools/skp/page_sets/skia_googleplus_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_googleplus_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_googleplus_desktop.json') + + urls_list = [ + # Why: social; top google property; Public profile; infinite scrolls + 'https://plus.google.com/110031535020051778989/posts', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_googlespreadsheetdashed_desktop.py b/tools/skp/page_sets/skia_googlespreadsheetdashed_desktop.py new file mode 100644 index 0000000000..079caff771 --- /dev/null +++ b/tools/skp/page_sets/skia_googlespreadsheetdashed_desktop.py @@ -0,0 +1,46 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_googlespreadsheetdashed_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.NavigateToPage(self) + action_runner.Wait(10) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_googlespreadsheetdashed_desktop.json') + + urls_list = [ + # Why: from Tom W's list. + ('https://docs.google.com/spreadsheet/ccc?' + 'key=0ApnDjttF0gt9dGpRM0labXFaT3ExSFhWZWstR3dQSWc#gid=0'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_gspro_nexus10.py b/tools/skp/page_sets/skia_gspro_nexus10.py new file mode 100644 index 0000000000..f385d8aa63 --- /dev/null +++ b/tools/skp/page_sets/skia_gspro_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_gspro_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_gspro_nexus10.json') + + urls_list = [ + # Why: for Clank CY + 'http://www.gsp.ro/click-less-think-more', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_gws_desktop.py b/tools/skp/page_sets/skia_gws_desktop.py new file mode 100644 index 0000000000..195ede9d13 --- /dev/null +++ b/tools/skp/page_sets/skia_gws_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_gws_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_gws_desktop.json') + + urls_list = [ + # Why: top google property; a google tab is often open + 'https://www.google.com/#hl=en&q=barack+obama', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_hsfi_nexus10.py b/tools/skp/page_sets/skia_hsfi_nexus10.py new file mode 100644 index 0000000000..e2510365bf --- /dev/null +++ b/tools/skp/page_sets/skia_hsfi_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_hsfi_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_hsfi_nexus10.json') + + urls_list = [ + # Why: for Clank CY + 'http://www.hs.fi/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_jsfiddlebigcar_desktop.py b/tools/skp/page_sets/skia_jsfiddlebigcar_desktop.py new file mode 100644 index 0000000000..c9c337bf7d --- /dev/null +++ b/tools/skp/page_sets/skia_jsfiddlebigcar_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_jsfiddlebigcar_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(10) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_jsfiddlebigcar_desktop.json') + + urls_list = [ + # Why: Page from Chromium's silk test cases + 'http://jsfiddle.net/vBQHH/3/embedded/result/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_jsfiddlehumperclip_desktop.py b/tools/skp/page_sets/skia_jsfiddlehumperclip_desktop.py new file mode 100644 index 0000000000..b26c5f07a5 --- /dev/null +++ b/tools/skp/page_sets/skia_jsfiddlehumperclip_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_jsfiddlehumperclip_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(10) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_jsfiddlehumperclip_desktop.json') + + urls_list = [ + # Why: Page from Chromium's silk test cases. + 'http://jsfiddle.net/humper/cKB9D/3/embedded/result/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_linkedin_desktop.py b/tools/skp/page_sets/skia_linkedin_desktop.py new file mode 100644 index 0000000000..f8449cac63 --- /dev/null +++ b/tools/skp/page_sets/skia_linkedin_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_linkedin_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_linkedin_desktop.json') + + urls_list = [ + # Why: #12 (Alexa global), public profile + 'http://www.linkedin.com/in/linustorvalds', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_mapsvg_desktop.py b/tools/skp/page_sets/skia_mapsvg_desktop.py new file mode 100644 index 0000000000..57130f7ed2 --- /dev/null +++ b/tools/skp/page_sets/skia_mapsvg_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_mapsvg_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(10) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_mapsvg_desktop.json') + + urls_list = [ + # Why: from fmalita + ('http://upload.wikimedia.org/wikipedia/commons/6/63/' + 'A_large_blank_world_map_with_oceans_marked_in_blue.svg'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_mercurynews_nexus10.py b/tools/skp/page_sets/skia_mercurynews_nexus10.py new file mode 100644 index 0000000000..c161036feb --- /dev/null +++ b/tools/skp/page_sets/skia_mercurynews_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_mercurynews_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_mercurynews_nexus10.json') + + urls_list = [ + # Why: from klobag + 'http://www.mercurynews.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_mlb_nexus10.py b/tools/skp/page_sets/skia_mlb_nexus10.py new file mode 100644 index 0000000000..d6326c3663 --- /dev/null +++ b/tools/skp/page_sets/skia_mlb_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_mlb_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_mlb_nexus10.json') + + urls_list = [ + # Why: from Arrow scrolling thread + 'http://mlb.mlb.com/index.jsp', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_mobilenews_desktop.py b/tools/skp/page_sets/skia_mobilenews_desktop.py new file mode 100644 index 0000000000..dc7e176bf8 --- /dev/null +++ b/tools/skp/page_sets/skia_mobilenews_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_mobilenews_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(10) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_mobilenews_desktop.json') + + urls_list = [ + # Why: Page from Chromium's silk test cases. + 'http://mobile-news.sandbox.google.com/news', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_mozilla_nexus10.py b/tools/skp/page_sets/skia_mozilla_nexus10.py new file mode 100644 index 0000000000..f1a39dd836 --- /dev/null +++ b/tools/skp/page_sets/skia_mozilla_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_mozilla_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_mozilla_nexus10.json') + + urls_list = [ + # Why: + 'http://planet.mozilla.org/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_nofolo_nexus10.py b/tools/skp/page_sets/skia_nofolo_nexus10.py new file mode 100644 index 0000000000..986ed371f6 --- /dev/null +++ b/tools/skp/page_sets/skia_nofolo_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_nofolo_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_nofolo_nexus10.json') + + urls_list = [ + # Why: http://code.google.com/p/chromium/issues/detail?id=136555 + 'http://nofolo.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_nytimes_nexus10.py b/tools/skp/page_sets/skia_nytimes_nexus10.py new file mode 100644 index 0000000000..8d9850375c --- /dev/null +++ b/tools/skp/page_sets/skia_nytimes_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_nytimes_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_nytimes_nexus10.json') + + urls_list = [ + # Why: for Clank CY + 'http://www.nytimes.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_oldinboxapp_desktop.py b/tools/skp/page_sets/skia_oldinboxapp_desktop.py new file mode 100644 index 0000000000..798a6c869d --- /dev/null +++ b/tools/skp/page_sets/skia_oldinboxapp_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_oldinboxapp_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_oldinboxapp_desktop.json') + + urls_list = [ + # Why: Page from Chromium's silk test cases + ('http://src.chromium.org/chrome/trunk/src/tools/perf/page_sets/' + 'key_silk_cases/old_inbox_app.html'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_pinterest_desktop.py b/tools/skp/page_sets/skia_pinterest_desktop.py new file mode 100644 index 0000000000..218ccab62f --- /dev/null +++ b/tools/skp/page_sets/skia_pinterest_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_pinterest_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_pinterest_desktop.json') + + urls_list = [ + # Why: #37 Alexa global + 'http://pinterest.com', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_pokemonwiki_desktop.py b/tools/skp/page_sets/skia_pokemonwiki_desktop.py new file mode 100644 index 0000000000..5d32731a8b --- /dev/null +++ b/tools/skp/page_sets/skia_pokemonwiki_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_pokemonwiki_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_pokemonwiki_desktop.json') + + urls_list = [ + # Why: http://code.google.com/p/chromium/issues/detail?id=136555 + 'http://en.wikipedia.org/wiki/List_of_Pok%C3%A9mon', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_pravda_nexus10.py b/tools/skp/page_sets/skia_pravda_nexus10.py new file mode 100644 index 0000000000..a7792b1725 --- /dev/null +++ b/tools/skp/page_sets/skia_pravda_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_pravda_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(10) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_pravda_nexus10.json') + + urls_list = [ + # Why: cyrillic font test case + 'http://www.pravda.ru/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_rectangletransition_desktop.py b/tools/skp/page_sets/skia_rectangletransition_desktop.py new file mode 100644 index 0000000000..1783117608 --- /dev/null +++ b/tools/skp/page_sets/skia_rectangletransition_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_rectangletransition_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_rectangletransition_desktop.json') + + urls_list = [ + # Why: Page from Chromium's silk test cases + ('http://src.chromium.org/chrome/trunk/src/tools/perf/page_sets/' + 'key_silk_cases/rectangle_transition.html'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_sahadan_nexus10.py b/tools/skp/page_sets/skia_sahadan_nexus10.py new file mode 100644 index 0000000000..c6c4dcbe98 --- /dev/null +++ b/tools/skp/page_sets/skia_sahadan_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_sahadan_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_sahadan_nexus10.json') + + urls_list = [ + # Why: from Tom W's list + 'http://www.sahadan.com/canli_sonuclar/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_samoasvg_desktop.py b/tools/skp/page_sets/skia_samoasvg_desktop.py new file mode 100644 index 0000000000..8242872d0b --- /dev/null +++ b/tools/skp/page_sets/skia_samoasvg_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_samoasvg_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_samoasvg_desktop.json') + + urls_list = [ + # Why: from fmalita + ('http://upload.wikimedia.org/wikipedia/commons/d/df/' + 'Seal_of_American_Samoa.svg'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_sfgate_desktop.py b/tools/skp/page_sets/skia_sfgate_desktop.py new file mode 100644 index 0000000000..892d46794c --- /dev/null +++ b/tools/skp/page_sets/skia_sfgate_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_sfgate_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_sfgate_desktop.json') + + urls_list = [ + # Why: from Arrow scrolling thread + 'http://www.sfgate.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_slashdot_nexus10.py b/tools/skp/page_sets/skia_slashdot_nexus10.py new file mode 100644 index 0000000000..1c1a58b2fe --- /dev/null +++ b/tools/skp/page_sets/skia_slashdot_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_slashdot_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_slashdot_nexus10.json') + + urls_list = [ + # Why: + 'http://slashdot.org/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_techmeme_nexus10.py b/tools/skp/page_sets/skia_techmeme_nexus10.py new file mode 100644 index 0000000000..905bd718db --- /dev/null +++ b/tools/skp/page_sets/skia_techmeme_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_techmeme_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_techmeme_nexus10.json') + + urls_list = [ + # Why: from klobag + 'http://techmeme.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_tigersvg_desktop.py b/tools/skp/page_sets/skia_tigersvg_desktop.py new file mode 100644 index 0000000000..fede7404e6 --- /dev/null +++ b/tools/skp/page_sets/skia_tigersvg_desktop.py @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_tigersvg_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_tigersvg_desktop.json') + + urls_list = [ + # Why: from fmalita + ('http://upload.wikimedia.org/wikipedia/commons/f/fd/' + 'Ghostscript_Tiger.svg'), + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_twitter_desktop.py b/tools/skp/page_sets/skia_twitter_desktop.py new file mode 100644 index 0000000000..8500137893 --- /dev/null +++ b/tools/skp/page_sets/skia_twitter_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_twitter_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_twitter_desktop.json') + + urls_list = [ + # Why: #8 (Alexa global), picked an interesting page + 'http://twitter.com/katyperry', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_ukwsj_nexus10.py b/tools/skp/page_sets/skia_ukwsj_nexus10.py new file mode 100644 index 0000000000..abc0b3a120 --- /dev/null +++ b/tools/skp/page_sets/skia_ukwsj_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_ukwsj_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_ukwsj_nexus10.json') + + urls_list = [ + # Why: for Clank CY + 'http://uk.wsj.com/home-page', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_vnexpress_nexus10.py b/tools/skp/page_sets/skia_vnexpress_nexus10.py new file mode 100644 index 0000000000..781e24a543 --- /dev/null +++ b/tools/skp/page_sets/skia_vnexpress_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_vnexpress_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_vnexpress_nexus10.json') + + urls_list = [ + # Why: from Tom W's list + 'http://vnexpress.net/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_weather_desktop.py b/tools/skp/page_sets/skia_weather_desktop.py new file mode 100644 index 0000000000..13d838938a --- /dev/null +++ b/tools/skp/page_sets/skia_weather_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_weather_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_weather_desktop.json') + + urls_list = [ + # Why: #7 Alexa news; #27 total time spent, picked interesting page + 'http://www.weather.com/weather/right-now/Mountain+View+CA+94043', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_wikipedia_galaxynexus.py b/tools/skp/page_sets/skia_wikipedia_galaxynexus.py new file mode 100644 index 0000000000..d799de9657 --- /dev/null +++ b/tools/skp/page_sets/skia_wikipedia_galaxynexus.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'mobile' + self.archive_data_file = 'data/skia_wikipedia_galaxynexus.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='mobile', + archive_data_file='data/skia_wikipedia_galaxynexus.json') + + urls_list = [ + # Why: #6 Alexa most visited worldwide; from robertphillips + 'http://en.m.wikipedia.org/wiki/List_of_The_X-Files_episodes#section_2', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_worldjournal_nexus10.py b/tools/skp/page_sets/skia_worldjournal_nexus10.py new file mode 100644 index 0000000000..333eed49e7 --- /dev/null +++ b/tools/skp/page_sets/skia_worldjournal_nexus10.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'tablet' + self.archive_data_file = 'data/skia_worldjournal_nexus10.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='tablet', + archive_data_file='data/skia_worldjournal_nexus10.json') + + urls_list = [ + # Why: Chinese font test case + 'http://worldjournal.com/', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_wowwiki_desktop.py b/tools/skp/page_sets/skia_wowwiki_desktop.py new file mode 100644 index 0000000000..55e1714eb4 --- /dev/null +++ b/tools/skp/page_sets/skia_wowwiki_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_wowwiki_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_wowwiki_desktop.json') + + urls_list = [ + # Why: http://code.google.com/p/chromium/issues/detail?id=136555 + 'http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_yahooanswers_desktop.py b/tools/skp/page_sets/skia_yahooanswers_desktop.py new file mode 100644 index 0000000000..10c7952d61 --- /dev/null +++ b/tools/skp/page_sets/skia_yahooanswers_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_yahooanswers_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(5) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_yahooanswers_desktop.json') + + urls_list = [ + # Why: #1 Alexa reference + 'http://answers.yahoo.com', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_youtube_desktop.py b/tools/skp/page_sets/skia_youtube_desktop.py new file mode 100644 index 0000000000..fc9872d315 --- /dev/null +++ b/tools/skp/page_sets/skia_youtube_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_youtube_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(15) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='desktop', + archive_data_file='data/skia_youtube_desktop.json') + + urls_list = [ + # Why: #3 (Alexa global) + 'http://www.youtube.com/watch?v=PC57z-oDPLs', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/page_sets/skia_youtubetvvideo_desktop.py b/tools/skp/page_sets/skia_youtubetvvideo_desktop.py new file mode 100644 index 0000000000..0636347e46 --- /dev/null +++ b/tools/skp/page_sets/skia_youtubetvvideo_desktop.py @@ -0,0 +1,44 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# pylint: disable=W0401,W0614 + + +from telemetry.page import page as page_module +from telemetry.page import page_set as page_set_module + + +class SkiaBuildbotDesktopPage(page_module.Page): + + def __init__(self, url, page_set): + super(SkiaBuildbotDesktopPage, self).__init__( + url=url, + page_set=page_set, + credentials_path='data/credentials.json') + self.user_agent_type = 'desktop' + self.archive_data_file = 'data/skia_youtubetvvideo_desktop.json' + + def RunSmoothness(self, action_runner): + action_runner.ScrollElement() + + def RunNavigateSteps(self, action_runner): + action_runner.NavigateToPage(self) + action_runner.Wait(10) + + +class SkiaBuildbotPageSet(page_set_module.PageSet): + + """ Pages designed to represent the median, not highly optimized web """ + + def __init__(self): + super(SkiaBuildbotPageSet, self).__init__( + user_agent_type='', + archive_data_file='data/skia_youtubetvvideo_desktop.json') + + urls_list = [ + # Why: from bsalomon + 'https://www.youtube.com/tv#/watch?v=046MuD1pYJg&mode=transport', + ] + + for url in urls_list: + self.AddPage(SkiaBuildbotDesktopPage(url, self)) diff --git a/tools/skp/recreate_skps.py b/tools/skp/recreate_skps.py new file mode 100644 index 0000000000..78863183cb --- /dev/null +++ b/tools/skp/recreate_skps.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python +# Copyright (c) 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +"""Run the webpages_playback automation script.""" + + +import os +import subprocess +import sys + +sys.path.insert(0, os.getcwd()) + +from common.py.utils import gs_utils +from common.py.utils import shell_utils + + +SKP_VERSION_FILE = 'SKP_VERSION' + + +def _get_skp_version(): + """Find an unused SKP version.""" + current_skp_version = None + with open(SKP_VERSION_FILE) as f: + current_skp_version = int(f.read().rstrip()) + + # Find the first SKP version which has no uploaded SKPs. + new_version = current_skp_version + 1 + while True: + gs_path = 'playback_%d/skps' % new_version + if not gs_utils.GSUtils().does_storage_object_exist('chromium-skia-gm', + gs_path): + return new_version + new_version += 1 + + +def main(chrome_src_path, browser_executable): + browser_executable = os.path.realpath(browser_executable) + skp_version = _get_skp_version() + print 'SKP_VERSION=%d' % skp_version + + if os.environ.get('CHROME_HEADLESS'): + # Start Xvfb if running on a bot. + try: + shell_utils.run('sudo Xvfb :0 -screen 0 1280x1024x24 &', shell=True) + except Exception: + # It is ok if the above command fails, it just means that DISPLAY=:0 + # is already up. + pass + + upload_dir = 'playback_%d' % skp_version + webpages_playback_cmd = [ + 'python', os.path.join(os.path.dirname(os.path.realpath(__file__)), + 'webpages_playback.py'), + '--page_sets', 'all', + '--browser_executable', browser_executable, + '--non-interactive', + '--upload_to_gs', + '--alternate_upload_dir', upload_dir, + '--chrome_src_path', chrome_src_path, + ] + + try: + shell_utils.run(webpages_playback_cmd) + finally: + # Clean up any leftover browser instances. This can happen if there are + # telemetry crashes, processes are not always cleaned up appropriately by + # the webpagereplay and telemetry frameworks. + procs = subprocess.check_output(['ps', 'ax']) + for line in procs.splitlines(): + if browser_executable in line: + pid = line.strip().split(' ')[0] + if pid != str(os.getpid()): + try: + shell_utils.run(['kill', '-9', pid]) + except shell_utils.CommandFailedException as e: + print e + else: + print 'Refusing to kill self.' + + print 'writing %s: %s' % (SKP_VERSION_FILE, skp_version) + with open(SKP_VERSION_FILE, 'w') as f: + f.write(str(skp_version)) + + +if '__main__' == __name__: + if len(sys.argv) != 3: + print >> sys.stderr, 'USAGE: %s ' + sys.exit(1) + main(*sys.argv[1:]) diff --git a/tools/skp/webpages_playback.py b/tools/skp/webpages_playback.py new file mode 100644 index 0000000000..50d8932713 --- /dev/null +++ b/tools/skp/webpages_playback.py @@ -0,0 +1,455 @@ +#!/usr/bin/env python +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Archives or replays webpages and creates SKPs in a Google Storage location. + +To archive webpages and store SKP files (archives should be rarely updated): + +cd ../buildbot/slave/skia_slave_scripts +python webpages_playback.py --dest_gsbase=gs://rmistry --record \ +--page_sets=all --skia_tools=/home/default/trunk/out/Debug/ \ +--browser_executable=/tmp/chromium/out/Release/chrome + + +To replay archived webpages and re-generate SKP files (should be run whenever +SkPicture.PICTURE_VERSION changes): + +cd ../buildbot/slave/skia_slave_scripts +python webpages_playback.py --dest_gsbase=gs://rmistry \ +--page_sets=all --skia_tools=/home/default/trunk/out/Debug/ \ +--browser_executable=/tmp/chromium/out/Release/chrome + + +Specify the --page_sets flag (default value is 'all') to pick a list of which +webpages should be archived and/or replayed. Eg: + +--page_sets=page_sets/skia_yahooanswers_desktop.json,\ +page_sets/skia_wikipedia_galaxynexus.json + +The --browser_executable flag should point to the browser binary you want to use +to capture archives and/or capture SKP files. Majority of the time it should be +a newly built chrome binary. + +The --upload_to_gs flag controls whether generated artifacts will be uploaded +to Google Storage (default value is False if not specified). + +The --non-interactive flag controls whether the script will prompt the user +(default value is False if not specified). + +The --skia_tools flag if specified will allow this script to run +debugger, render_pictures, and render_pdfs on the captured +SKP(s). The tools are run after all SKPs are succesfully captured to make sure +they can be added to the buildbots with no breakages. +To preview the captured SKP before proceeding to the next page_set specify both +--skia_tools and --view_debugger_output. +""" + +import glob +import optparse +import os +import posixpath +import shutil +import subprocess +import sys +import tempfile +import time +import traceback + +sys.path.insert(0, os.getcwd()) + +from common.py.utils import gs_utils +from common.py.utils import shell_utils + +ROOT_PLAYBACK_DIR_NAME = 'playback' +SKPICTURES_DIR_NAME = 'skps' + + +# Local archive and SKP directories. +LOCAL_PLAYBACK_ROOT_DIR = os.path.join( + tempfile.gettempdir(), ROOT_PLAYBACK_DIR_NAME) +LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR = os.path.join( + os.path.abspath(os.path.dirname(__file__)), 'page_sets', 'data') +TMP_SKP_DIR = tempfile.mkdtemp() + +# Stdout that signifies that a recording has failed. +RECORD_FAILURE_MSG = 'The recording has not been updated for these pages.' + +# Name of the SKP benchmark +SKP_BENCHMARK = 'skpicture_printer' + +# The max base name length of Skp files. +MAX_SKP_BASE_NAME_LEN = 31 + +# Dictionary of device to platform prefixes for SKP files. +DEVICE_TO_PLATFORM_PREFIX = { + 'desktop': 'desk', + 'galaxynexus': 'mobi', + 'nexus10': 'tabl' +} + +# How many times the record_wpr binary should be retried. +RETRY_RECORD_WPR_COUNT = 5 +# How many times the run_measurement binary should be retried. +RETRY_RUN_MEASUREMENT_COUNT = 5 + +X11_DISPLAY = os.getenv('DISPLAY', ':0') + +GS_PREDEFINED_ACL = gs_utils.GSUtils.PredefinedACL.PRIVATE +GS_FINE_GRAINED_ACL_LIST = [ + (gs_utils.GSUtils.IdType.GROUP_BY_DOMAIN, 'google.com', + gs_utils.GSUtils.Permission.READ), +] + + +class SkPicturePlayback(object): + """Class that archives or replays webpages and creates SKPs.""" + + def __init__(self, parse_options): + """Constructs a SkPicturePlayback BuildStep instance.""" + assert parse_options.browser_executable, 'Must specify --browser_executable' + self._browser_executable = parse_options.browser_executable + + self._all_page_sets_specified = parse_options.page_sets == 'all' + self._page_sets = self._ParsePageSets(parse_options.page_sets) + + self._dest_gsbase = parse_options.dest_gsbase + self._record = parse_options.record + self._skia_tools = parse_options.skia_tools + self._non_interactive = parse_options.non_interactive + self._upload_to_gs = parse_options.upload_to_gs + self._alternate_upload_dir = parse_options.alternate_upload_dir + self._skip_all_gs_access = parse_options.skip_all_gs_access + self._telemetry_binaries_dir = os.path.join(parse_options.chrome_src_path, + 'tools', 'perf') + + self._local_skp_dir = os.path.join( + parse_options.output_dir, ROOT_PLAYBACK_DIR_NAME, SKPICTURES_DIR_NAME) + self._local_record_webpages_archive_dir = os.path.join( + parse_options.output_dir, ROOT_PLAYBACK_DIR_NAME, 'webpages_archive') + + # List of SKP files generated by this script. + self._skp_files = [] + + def _ParsePageSets(self, page_sets): + if not page_sets: + raise ValueError('Must specify at least one page_set!') + elif self._all_page_sets_specified: + # Get everything from the page_sets directory. + page_sets_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), + 'page_sets') + ps = [os.path.join(page_sets_dir, page_set) + for page_set in os.listdir(page_sets_dir) + if not os.path.isdir(os.path.join(page_sets_dir, page_set)) and + page_set.endswith('.py')] + elif '*' in page_sets: + # Explode and return the glob. + ps = glob.glob(page_sets) + else: + ps = page_sets.split(',') + ps.sort() + return ps + + def Run(self): + """Run the SkPicturePlayback BuildStep.""" + + # Delete any left over data files in the data directory. + for archive_file in glob.glob( + os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, 'skia_*')): + os.remove(archive_file) + + # Delete the local root directory if it already exists. + if os.path.exists(LOCAL_PLAYBACK_ROOT_DIR): + shutil.rmtree(LOCAL_PLAYBACK_ROOT_DIR) + + # Create the required local storage directories. + self._CreateLocalStorageDirs() + + # Start the timer. + start_time = time.time() + + # Loop through all page_sets. + for page_set in self._page_sets: + + page_set_basename = os.path.basename(page_set).split('.')[0] + '.json' + wpr_data_file = page_set.split(os.path.sep)[-1].split('.')[0] + '_000.wpr' + + if self._record: + # Create an archive of the specified webpages if '--record=True' is + # specified. + record_wpr_cmd = ( + 'DISPLAY=%s' % X11_DISPLAY, + os.path.join(self._telemetry_binaries_dir, 'record_wpr'), + '--extra-browser-args=--disable-setuid-sandbox', + '--browser=exact', + '--browser-executable=%s' % self._browser_executable, + page_set + ) + for _ in range(RETRY_RECORD_WPR_COUNT): + output = shell_utils.run(' '.join(record_wpr_cmd), shell=True) + if RECORD_FAILURE_MSG in output: + print output + else: + # Break out of the retry loop since there were no errors. + break + else: + # If we get here then record_wpr did not succeed and thus did not + # break out of the loop. + raise Exception('record_wpr failed for page_set: %s' % page_set) + + else: + if not self._skip_all_gs_access: + # Get the webpages archive so that it can be replayed. + self._DownloadWebpagesArchive(wpr_data_file, page_set_basename) + + page_set_name = os.path.basename(page_set).split('.')[0] + run_measurement_cmd = ( + 'DISPLAY=%s' % X11_DISPLAY, + 'timeout', '300', + os.path.join(self._telemetry_binaries_dir, 'run_measurement'), + '--extra-browser-args=--disable-setuid-sandbox', + '--browser=exact', + '--browser-executable=%s' % self._browser_executable, + SKP_BENCHMARK, + page_set_name, + '-o', + '/tmp/test.skp', + '--skp-outdir=%s' % TMP_SKP_DIR + ) + page_set_dst = os.path.join(self._telemetry_binaries_dir, 'page_sets', + os.path.basename(page_set)) + wpr_dst = os.path.join(self._telemetry_binaries_dir, 'page_sets', 'data', + wpr_data_file) + json_dst = os.path.join(self._telemetry_binaries_dir, 'page_sets', 'data', + page_set_basename) + copied_page_set = False + if not os.path.exists(page_set_dst): + print 'Copying %s to %s' % (page_set, page_set_dst) + shutil.copyfile(page_set, page_set_dst) + wpr_src = os.path.join(os.path.dirname(page_set), 'data', + wpr_data_file) + print 'Copying %s to %s' % (wpr_src, wpr_dst) + shutil.copyfile(wpr_src, wpr_dst) + json_src = os.path.join(os.path.dirname(page_set), 'data', + page_set_basename) + print 'Copying %s to %s' % (json_src, json_dst) + shutil.copyfile(json_src, json_dst) + copied_page_set = True + + for _ in range(RETRY_RUN_MEASUREMENT_COUNT): + try: + print '\n\n=======Capturing SKP of %s=======\n\n' % page_set + shell_utils.run(' '.join(run_measurement_cmd), shell=True) + except shell_utils.CommandFailedException: + # skpicture_printer sometimes fails with AssertionError but the + # captured SKP is still valid. This is a known issue. + pass + + if self._record: + # Move over the created archive into the local webpages archive + # directory. + shutil.move( + os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, wpr_data_file), + self._local_record_webpages_archive_dir) + shutil.move( + os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, + page_set_basename), + self._local_record_webpages_archive_dir) + + # Rename generated SKP files into more descriptive names. + try: + self._RenameSkpFiles(page_set) + # Break out of the retry loop since there were no errors. + break + except Exception: + # There was a failure continue with the loop. + traceback.print_exc() + print '\n\n=======Retrying %s=======\n\n' % page_set + time.sleep(10) + else: + if copied_page_set: + os.remove(page_set_dst) + os.remove(wpr_dst) + os.remove(json_dst) + # If we get here then run_measurement did not succeed and thus did not + # break out of the loop. + raise Exception('run_measurement failed for page_set: %s' % page_set) + + if copied_page_set: + os.remove(page_set_dst) + os.remove(wpr_dst) + os.remove(json_dst) + + print '\n\n=======Capturing SKP files took %s seconds=======\n\n' % ( + time.time() - start_time) + + if self._skia_tools: + render_pictures_cmd = [ + os.path.join(self._skia_tools, 'render_pictures'), + '-r', self._local_skp_dir + ] + render_pdfs_cmd = [ + os.path.join(self._skia_tools, 'render_pdfs'), + self._local_skp_dir + ] + + for tools_cmd in (render_pictures_cmd, render_pdfs_cmd): + print '\n\n=======Running %s=======' % ' '.join(tools_cmd) + proc = subprocess.Popen(tools_cmd) + (code, output) = shell_utils.log_process_after_completion(proc, + echo=False) + if code != 0: + raise Exception('%s failed!' % ' '.join(tools_cmd)) + + if not self._non_interactive: + print '\n\n=======Running debugger=======' + os.system('%s %s' % (os.path.join(self._skia_tools, 'debugger'), + os.path.join(self._local_skp_dir, '*'))) + + print '\n\n' + + if not self._skip_all_gs_access and self._upload_to_gs: + print '\n\n=======Uploading to Google Storage=======\n\n' + # Copy the directory structure in the root directory into Google Storage. + dest_dir_name = ROOT_PLAYBACK_DIR_NAME + if self._alternate_upload_dir: + dest_dir_name = self._alternate_upload_dir + + gs_bucket = self._dest_gsbase.lstrip(gs_utils.GS_PREFIX) + gs_utils.GSUtils().upload_dir_contents( + LOCAL_PLAYBACK_ROOT_DIR, gs_bucket, dest_dir_name, + upload_if=gs_utils.GSUtils.UploadIf.IF_MODIFIED, + predefined_acl=GS_PREDEFINED_ACL, + fine_grained_acl_list=GS_FINE_GRAINED_ACL_LIST) + + print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % ( + posixpath.join(self._dest_gsbase, dest_dir_name, SKPICTURES_DIR_NAME)) + else: + print '\n\n=======Not Uploading to Google Storage=======\n\n' + print 'Generated resources are available in %s\n\n' % ( + LOCAL_PLAYBACK_ROOT_DIR) + + return 0 + + def _RenameSkpFiles(self, page_set): + """Rename generated SKP files into more descriptive names. + + Look into the subdirectory of TMP_SKP_DIR and find the most interesting + .skp in there to be this page_set's representative .skp. + """ + # Here's where we're assuming there's one page per pageset. + # If there were more than one, we'd overwrite filename below. + + # /path/to/skia_yahooanswers_desktop.json -> skia_yahooanswers_desktop.json + _, ps_filename = os.path.split(page_set) + # skia_yahooanswers_desktop.json -> skia_yahooanswers_desktop + ps_basename, _ = os.path.splitext(ps_filename) + # skia_yahooanswers_desktop -> skia, yahooanswers, desktop + _, page_name, device = ps_basename.split('_') + + basename = '%s_%s' % (DEVICE_TO_PLATFORM_PREFIX[device], page_name) + filename = basename[:MAX_SKP_BASE_NAME_LEN] + '.skp' + + subdirs = glob.glob(os.path.join(TMP_SKP_DIR, '*')) + assert len(subdirs) == 1 + for site in subdirs: + # We choose the largest .skp as the most likely to be interesting. + largest_skp = max(glob.glob(os.path.join(site, '*.skp')), + key=lambda path: os.stat(path).st_size) + dest = os.path.join(self._local_skp_dir, filename) + print 'Moving', largest_skp, 'to', dest + shutil.move(largest_skp, dest) + self._skp_files.append(filename) + shutil.rmtree(site) + + def _CreateLocalStorageDirs(self): + """Creates required local storage directories for this script.""" + for d in (self._local_record_webpages_archive_dir, + self._local_skp_dir): + if os.path.exists(d): + shutil.rmtree(d) + os.makedirs(d) + + def _DownloadWebpagesArchive(self, wpr_data_file, page_set_basename): + """Downloads the webpages archive and its required page set from GS.""" + wpr_source = posixpath.join(ROOT_PLAYBACK_DIR_NAME, 'webpages_archive', + wpr_data_file) + page_set_source = posixpath.join(ROOT_PLAYBACK_DIR_NAME, + 'webpages_archive', + page_set_basename) + gs = gs_utils.GSUtils() + gs_bucket = self._dest_gsbase.lstrip(gs_utils.GS_PREFIX) + if (gs.does_storage_object_exist(gs_bucket, wpr_source) and + gs.does_storage_object_exist(gs_bucket, page_set_source)): + gs.download_file(gs_bucket, wpr_source, + os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, + wpr_data_file)) + gs.download_file(gs_bucket, page_set_source, + os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, + page_set_basename)) + else: + raise Exception('%s and %s do not exist in Google Storage!' % ( + wpr_source, page_set_source)) + + +if '__main__' == __name__: + option_parser = optparse.OptionParser() + option_parser.add_option( + '', '--page_sets', + help='Specifies the page sets to use to archive. Supports globs.', + default='all') + option_parser.add_option( + '', '--skip_all_gs_access', action='store_true', + help='All Google Storage interactions will be skipped if this flag is ' + 'specified. This is useful for cases where the user does not have ' + 'the required .boto file but would like to generate webpage ' + 'archives and SKPs from the Skia page sets.', + default=False) + option_parser.add_option( + '', '--record', action='store_true', + help='Specifies whether a new website archive should be created.', + default=False) + option_parser.add_option( + '', '--dest_gsbase', + help='gs:// bucket_name, the bucket to upload the file to.', + default='gs://chromium-skia-gm') + option_parser.add_option( + '', '--skia_tools', + help=('Path to compiled Skia executable tools. ' + 'render_pictures/render_pdfs is run on the set ' + 'after all SKPs are captured. If the script is run without ' + '--non-interactive then the debugger is also run at the end. Debug ' + 'builds are recommended because they seem to catch more failures ' + 'than Release builds.'), + default=None) + option_parser.add_option( + '', '--upload_to_gs', action='store_true', + help='Does not upload to Google Storage if this is False.', + default=False) + option_parser.add_option( + '', '--alternate_upload_dir', + help='Uploads to a different directory in Google Storage if this flag is ' + 'specified', + default=None) + option_parser.add_option( + '', '--output_dir', + help='Directory where SKPs and webpage archives will be outputted to.', + default=tempfile.gettempdir()) + option_parser.add_option( + '', '--browser_executable', + help='The exact browser executable to run.', + default=None) + option_parser.add_option( + '', '--chrome_src_path', + help='Path to the chromium src directory.', + default=None) + option_parser.add_option( + '', '--non-interactive', action='store_true', + help='Runs the script without any prompts. If this flag is specified and ' + '--skia_tools is specified then the debugger is not run.', + default=False) + options, unused_args = option_parser.parse_args() + + playback = SkPicturePlayback(options) + sys.exit(playback.Run()) -- cgit v1.2.3