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 tasks = [
11  {
12    // Chrome browser window 1. This window remains open for the entire test.
13    type: 'window',
14    name: 'background',
15    start: 0,
16    duration: minutes(60),
17    focus: false,
18    tabs: [
19     'http://www.google.com',
20     'http://news.google.com',
21     'http://finance.yahoo.com',
22     'http://clothing.shop.ebay.com/Womens-Shoes-/63889/i.html',
23     'http://www.facebook.com'
24    ]
25  },
26  {
27    // Page cycle through popular external websites for 36 minutes
28    type: 'cycle',
29    name: 'web',
30    start: seconds(1),
31    duration: minutes(36),
32    delay: seconds(60), // A minute on each page
33    timeout: seconds(10),
34    focus: true,
35    urls: URLS,
36  },
37  {
38    // After 36 minutes, actively read e-mail for 12 minutes
39    type: 'cycle',
40    name: 'email',
41    start: minutes(36) + seconds(1),
42    duration: minutes(12) - seconds(1),
43    delay: minutes(5), // 5 minutes between full gmail refresh
44    timeout: seconds(10),
45    focus: true,
46    urls: [
47       'http://gmail.com',
48       'http://mail.google.com'
49    ],
50  },
51  {
52    // After 36 minutes, start streaming audio (background tab), total playtime
53    // 12 minutes
54    type: 'cycle',
55    name: 'audio',
56    start: minutes(36),
57    duration: minutes(12),
58    delay: minutes(12),
59    timeout: seconds(10),
60    focus: false,
61    urls: [
62      'http://www.bbc.co.uk/worldservice/audioconsole/?stream=live',
63      'http://www.npr.org/templates/player/mediaPlayer.html?action=3&t=live1',
64      'http://www.cbc.ca/radio2/channels/popup.html?stream=classical'
65    ]
66  },
67  {
68    // After 48 minutes, play with Google Docs for 6 minutes
69    type: 'cycle',
70    name: 'docs',
71    start: minutes(48),
72    duration: minutes(6),
73    delay: minutes(1), // A minute on each page
74    timeout: seconds(10),
75    focus: true,
76    urls: [
77       ViewGDoc + '1CIvneyASuIHvxxN0WV22zikb08Us1nc93mkU0c5Azr4/edit',
78       ViewGDoc + '120TtfoHXCgRuaubGhra3X5tl0_pS7KX757wFigTFf0c/edit'
79    ],
80  },
81  {
82    // After 54 minutes, watch Big Buck Bunny for 6 minutes
83    type: 'window',
84    name: 'video',
85    start: minutes(54),
86    duration: minutes(6),
87    focus: true,
88    tabs: [
89        'http://www.youtube.com/embed/YE7VzlLtp-4?start=236&vq=hd720&autoplay=1'
90    ]
91  },
92];
93
94
95// List of URLs to cycle through
96var u_index = 0;
97URLS[u_index++] = 'http://www.google.com';
98URLS[u_index++] = 'http://www.yahoo.com';
99URLS[u_index++] = 'http://www.facebook.com';
100URLS[u_index++] = 'http://www.youtube.com';
101URLS[u_index++] = 'http://www.wikipedia.org';
102URLS[u_index++] = 'http://www.amazon.com';
103URLS[u_index++] = 'http://www.msn.com';
104URLS[u_index++] = 'http://www.bing.com';
105URLS[u_index++] = 'http://www.blogspot.com';
106URLS[u_index++] = 'http://www.microsoft.com';
107URLS[u_index++] = 'http://www.myspace.com';
108URLS[u_index++] = 'http://www.go.com';
109URLS[u_index++] = 'http://www.walmart.com';
110URLS[u_index++] = 'http://www.about.com';
111URLS[u_index++] = 'http://www.target.com';
112URLS[u_index++] = 'http://www.aol.com';
113URLS[u_index++] = 'http://www.mapquest.com';
114URLS[u_index++] = 'http://www.ask.com';
115URLS[u_index++] = 'http://www.craigslist.org';
116URLS[u_index++] = 'http://www.wordpress.com';
117URLS[u_index++] = 'http://www.answers.com';
118URLS[u_index++] = 'http://www.paypal.com';
119URLS[u_index++] = 'http://www.imdb.com';
120URLS[u_index++] = 'http://www.bestbuy.com';
121URLS[u_index++] = 'http://www.ehow.com';
122URLS[u_index++] = 'http://www.photobucket.com';
123URLS[u_index++] = 'http://www.cnn.com';
124URLS[u_index++] = 'http://www.chase.com';
125URLS[u_index++] = 'http://www.att.com';
126URLS[u_index++] = 'http://www.sears.com';
127URLS[u_index++] = 'http://www.weather.com';
128URLS[u_index++] = 'http://www.apple.com';
129URLS[u_index++] = 'http://www.zynga.com';
130URLS[u_index++] = 'http://www.adobe.com';
131URLS[u_index++] = 'http://www.bankofamerica.com';
132URLS[u_index++] = 'http://www.zedo.com';
133URLS[u_index++] = 'http://www.flickr.com';
134URLS[u_index++] = 'http://www.shoplocal.com';
135URLS[u_index++] = 'http://www.twitter.com';
136URLS[u_index++] = 'http://www.cnet.com';
137URLS[u_index++] = 'http://www.verizonwireless.com';
138URLS[u_index++] = 'http://www.kohls.com';
139URLS[u_index++] = 'http://www.bizrate.com';
140URLS[u_index++] = 'http://www.jcpenney.com';
141URLS[u_index++] = 'http://www.netflix.com';
142URLS[u_index++] = 'http://www.fastclick.net';
143URLS[u_index++] = 'http://www.windows.com';
144URLS[u_index++] = 'http://www.questionmarket.com';
145URLS[u_index++] = 'http://www.nytimes.com';
146URLS[u_index++] = 'http://www.toysrus.com';
147URLS[u_index++] = 'http://www.allrecipes.com';
148URLS[u_index++] = 'http://www.overstock.com';
149URLS[u_index++] = 'http://www.comcast.net';
150
151