~vtuson/+junk/load_test_nexus7

« back to all changes in this revision

Viewing changes to extension/urls.js_8min

  • Committer: Victor Palau
  • Date: 2012-11-06 14:25:35 UTC
  • Revision ID: vtuson@gmail.com-20121106142535-e6z16jpx4rvkhc69
chrome extension and basic test for battery life while browsing

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
6
var URLS = new Array();
 
7
 
 
8
var ViewGDoc = ('http://docs.google.com/RawDocContents?action=fetch&' +
 
9
                'justBody=false&revision=_latest&editMode=true&docID=');
 
10
 
 
11
var tasks = [
 
12
  {
 
13
    // Chrome browser window 1. This window remains open for the entire test.
 
14
    type: 'window',
 
15
    name: 'background',
 
16
    start: 0,
 
17
    duration: minutes(2),
 
18
    tabs: [
 
19
     'http://www.cnn.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: 0,
 
31
    duration: minutes(2),
 
32
    delay: seconds(60), // A minute on each page
 
33
    timeout: seconds(10),
 
34
    focus: true,
 
35
    urls: URLS,
 
36
  },
 
37
  {
 
38
    // After 2 minutes, actively read e-mail for 2 minutes
 
39
    type: 'cycle',
 
40
    name: 'email',
 
41
    start: minutes(2) + seconds(1),
 
42
    duration: minutes(2) - seconds(1),
 
43
    delay: minutes(1), // 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 2 minutes, start streaming audio (background tab), total playtime
 
53
    // 2 minutes
 
54
    type: 'cycle',
 
55
    name: 'audio',
 
56
    start: minutes(2),
 
57
    duration: minutes(2),
 
58
    delay: minutes(2),
 
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 4 minutes, play with Google Docs for 2 minutes
 
69
    type: 'cycle',
 
70
    name: 'docs',
 
71
    start: minutes(4),
 
72
    duration: minutes(2),
 
73
    delay: minutes(1), // A minute on each page
 
74
    timeout: seconds(10),
 
75
    focus: true,
 
76
    urls: [
 
77
       ViewGDoc + '0AaLGACl774zLZGRuYzlibWtfMXJzbmdoamcy',
 
78
       ViewGDoc + '0AaLGACl774zLZGRuYzlibWtfMGRkcmY4emNu'
 
79
    ],
 
80
  },
 
81
  {
 
82
    // After 6 minutes, watch Google IO for 2 minutes
 
83
    type: 'window',
 
84
    name: 'video',
 
85
    start: minutes(6),
 
86
    duration: minutes(2),
 
87
    focus: true,
 
88
    tabs: [
 
89
        'http://www.youtube.com/watch?v=ecI_hCBGEIM&autoplay=1&start=3364'
 
90
    ]
 
91
  },
 
92
];
 
93
 
 
94
 
 
95
// List of URLs to cycle through
 
96
var u_index = 0;
 
97
URLS[u_index++] = 'http://www.google.com';
 
98
URLS[u_index++] = 'http://www.yahoo.com';
 
99
URLS[u_index++] = 'http://www.facebook.com';
 
100
URLS[u_index++] = 'http://www.youtube.com';
 
101
URLS[u_index++] = 'http://www.wikipedia.org';
 
102
URLS[u_index++] = 'http://www.amazon.com';
 
103
URLS[u_index++] = 'http://www.msn.com';
 
104
URLS[u_index++] = 'http://www.bing.com';
 
105
URLS[u_index++] = 'http://www.blogspot.com';
 
106
URLS[u_index++] = 'http://www.microsoft.com';
 
107
URLS[u_index++] = 'http://www.myspace.com';
 
108
URLS[u_index++] = 'http://www.go.com';
 
109
URLS[u_index++] = 'http://www.walmart.com';
 
110
URLS[u_index++] = 'http://www.about.com';
 
111
URLS[u_index++] = 'http://www.target.com';
 
112
URLS[u_index++] = 'http://www.aol.com';
 
113
URLS[u_index++] = 'http://www.mapquest.com';
 
114
URLS[u_index++] = 'http://www.ask.com';
 
115
URLS[u_index++] = 'http://www.craigslist.org';
 
116
URLS[u_index++] = 'http://www.wordpress.com';
 
117
URLS[u_index++] = 'http://www.answers.com';
 
118
URLS[u_index++] = 'http://www.paypal.com';
 
119
URLS[u_index++] = 'http://www.imdb.com';
 
120
URLS[u_index++] = 'http://www.bestbuy.com';
 
121
URLS[u_index++] = 'http://www.ehow.com';
 
122
URLS[u_index++] = 'http://www.photobucket.com';
 
123
URLS[u_index++] = 'http://www.cnn.com';
 
124
URLS[u_index++] = 'http://www.chase.com';
 
125
URLS[u_index++] = 'http://www.att.com';
 
126
URLS[u_index++] = 'http://www.sears.com';
 
127
URLS[u_index++] = 'http://www.weather.com';
 
128
URLS[u_index++] = 'http://www.apple.com';
 
129
URLS[u_index++] = 'http://www.zynga.com';
 
130
URLS[u_index++] = 'http://www.adobe.com';
 
131
URLS[u_index++] = 'http://www.bankofamerica.com';
 
132
URLS[u_index++] = 'http://www.zedo.com';
 
133
URLS[u_index++] = 'http://www.flickr.com';
 
134
URLS[u_index++] = 'http://www.shoplocal.com';
 
135
URLS[u_index++] = 'http://www.twitter.com';
 
136
URLS[u_index++] = 'http://www.cnet.com';
 
137
URLS[u_index++] = 'http://www.verizonwireless.com';
 
138
URLS[u_index++] = 'http://www.kohls.com';
 
139
URLS[u_index++] = 'http://www.bizrate.com';
 
140
URLS[u_index++] = 'http://www.jcpenney.com';
 
141
URLS[u_index++] = 'http://www.netflix.com';
 
142
URLS[u_index++] = 'http://www.fastclick.net';
 
143
URLS[u_index++] = 'http://www.windows.com';
 
144
URLS[u_index++] = 'http://www.questionmarket.com';
 
145
URLS[u_index++] = 'http://www.nytimes.com';
 
146
URLS[u_index++] = 'http://www.toysrus.com';
 
147
URLS[u_index++] = 'http://www.allrecipes.com';
 
148
URLS[u_index++] = 'http://www.overstock.com';
 
149
URLS[u_index++] = 'http://www.comcast.net';
 
150