1// Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// List of tasks to accomplish 6var URLS = new Array(); 7 8var ViewGDoc = ('https://docs.google.com/document/d/'); 9 10var BBC_AUDIO_URL = 'https://www.bbc.co.uk/radio/player/bbc_world_service'; 11 12var PLAY_MUSIC_URL = 'https://play.google.com/music/listen?u=0#/wst/st/a2be2d85-0ac9-3a7a-b038-e221bb63ef71'; 13 14function isMP3DecoderPresent() { 15 return window['MediaSource'] && 16 window['MediaSource'].isTypeSupported('audio/mpeg'); 17} 18 19var tasks = [ 20 { 21 // Chrome browser window 1. This window remains open for the entire test. 22 type: 'window', 23 name: 'background', 24 start: 0, 25 duration: minutes(60), 26 focus: false, 27 tabs: [ 28 'https://www.google.com', 29 'https://news.google.com', 30 'https://finance.yahoo.com', 31 'https://clothing.shop.ebay.com/Womens-Shoes-/63889/i.html', 32 'https://www.facebook.com' 33 ] 34 }, 35 { 36 // Page cycle through popular external websites for 36 minutes 37 type: 'cycle', 38 name: 'web', 39 start: seconds(1), 40 duration: minutes(36), 41 delay: seconds(60), // A minute on each page 42 timeout: seconds(30), 43 focus: true, 44 urls: URLS, 45 }, 46 { 47 // After 36 minutes, actively read e-mail for 12 minutes 48 type: 'cycle', 49 name: 'email', 50 start: minutes(36) + seconds(1), 51 duration: minutes(12) - seconds(1), 52 delay: minutes(5), // 5 minutes between full gmail refresh 53 timeout: seconds(30), 54 focus: true, 55 urls: [ 56 'https://gmail.com', 57 'https://mail.google.com' 58 ], 59 }, 60 { 61 // After 36 minutes, start streaming audio (background tab), total playtime 62 // 12 minutes 63 type: 'cycle', 64 name: 'audio', 65 start: minutes(36), 66 duration: minutes(12), 67 delay: minutes(12), 68 timeout: seconds(30), 69 focus: false, 70 // Google Play Music requires MP3 decoder for playing music. 71 // Fall back to BBC if the browser does not have MP3 decoder bundle. 72 urls: isMP3DecoderPresent() ? [BBC_AUDIO_URL, BBC_AUDIO_URL] : 73 [BBC_AUDIO_URL, BBC_AUDIO_URL] 74 }, 75 { 76 // After 48 minutes, play with Google Docs for 6 minutes 77 type: 'cycle', 78 name: 'docs', 79 start: minutes(48), 80 duration: minutes(6), 81 delay: minutes(1), // A minute on each page 82 timeout: seconds(30), 83 focus: true, 84 urls: [ 85 ViewGDoc + '1CIvneyASuIHvxxN0WV22zikb08Us1nc93mkU0c5Azr4/edit', 86 ViewGDoc + '120TtfoHXCgRuaubGhra3X5tl0_pS7KX757wFigTFf0c/edit' 87 ], 88 }, 89 { 90 // After 54 minutes, watch Big Buck Bunny for 6 minutes 91 type: 'window', 92 name: 'video', 93 start: minutes(54), 94 duration: minutes(6), 95 focus: true, 96 tabs: [ 97 'https://www.youtube.com/embed/YE7VzlLtp-4?start=236&vq=hd720&autoplay=1' 98 ] 99 }, 100]; 101 102 103// List of URLs to cycle through 104var u_index = 0; 105URLS[u_index++] = 'https://www.google.com'; 106URLS[u_index++] = 'https://www.yahoo.com'; 107URLS[u_index++] = 'https://www.facebook.com'; 108URLS[u_index++] = 'https://www.youtube.com'; 109URLS[u_index++] = 'https://www.wikipedia.org'; 110URLS[u_index++] = 'https://www.amazon.com'; 111URLS[u_index++] = 'https://www.msn.com'; 112URLS[u_index++] = 'https://www.bing.com'; 113URLS[u_index++] = 'https://www.blogspot.com'; 114URLS[u_index++] = 'https://www.microsoft.com'; 115URLS[u_index++] = 'https://www.myspace.com'; 116URLS[u_index++] = 'http://www.go.com'; 117URLS[u_index++] = 'https://www.walmart.com'; 118URLS[u_index++] = 'https://www.about.com'; 119URLS[u_index++] = 'https://www.target.com'; 120URLS[u_index++] = 'https://www.aol.com'; 121URLS[u_index++] = 'https://www.mapquest.com'; 122URLS[u_index++] = 'https://www.ask.com'; 123URLS[u_index++] = 'https://www.craigslist.org'; 124URLS[u_index++] = 'https://www.wordpress.com'; 125URLS[u_index++] = 'https://www.answers.com'; 126URLS[u_index++] = 'https://www.paypal.com'; 127URLS[u_index++] = 'https://www.imdb.com'; 128URLS[u_index++] = 'https://www.bestbuy.com'; 129URLS[u_index++] = 'https://www.ehow.com'; 130URLS[u_index++] = 'http://www.photobucket.com'; 131URLS[u_index++] = 'https://www.cnn.com'; 132URLS[u_index++] = 'https://www.chase.com'; 133URLS[u_index++] = 'https://www.att.com'; 134URLS[u_index++] = 'https://www.sears.com'; 135URLS[u_index++] = 'https://www.weather.com'; 136URLS[u_index++] = 'https://www.apple.com'; 137URLS[u_index++] = 'https://www.zynga.com'; 138URLS[u_index++] = 'https://www.adobe.com'; 139URLS[u_index++] = 'https://www.bankofamerica.com'; 140URLS[u_index++] = 'https://www.zedo.com'; 141URLS[u_index++] = 'https://www.flickr.com'; 142URLS[u_index++] = 'https://www.shoplocal.com'; 143URLS[u_index++] = 'https://www.twitter.com'; 144URLS[u_index++] = 'https://www.cnet.com'; 145URLS[u_index++] = 'https://www.verizonwireless.com'; 146URLS[u_index++] = 'https://www.kohls.com'; 147URLS[u_index++] = 'https://www.bizrate.com'; 148URLS[u_index++] = 'https://www.jcpenney.com'; 149URLS[u_index++] = 'https://www.netflix.com'; 150URLS[u_index++] = 'https://www.fastclick.net'; 151URLS[u_index++] = 'https://www.windows.com'; 152URLS[u_index++] = 'https://www.questionmarket.com'; 153URLS[u_index++] = 'https://www.nytimes.com'; 154URLS[u_index++] = 'https://www.toysrus.com'; 155URLS[u_index++] = 'https://www.allrecipes.com'; 156URLS[u_index++] = 'https://www.overstock.com'; 157URLS[u_index++] = 'https://www.comcast.net'; 158