1 # Copyright (c) 2012 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 AUTHOR = "Chrome OS Team" 6 NAME = "power_LoadTest.video_1hour" 7 PURPOSE = "Measure power draw when system is under load." 8 CRITERIA = "This test is a benchmark." 9 TIME = "LONG" 10 TEST_CATEGORY = "Benchmark" 11 TEST_CLASS = "power" 12 TEST_TYPE = "client" 13 14 DOC = """ 15 This test runs a load test consisting of cycling though web pages, playing 16 videos, etc. and measures battery power draw. The duration of this test is 17 determined by the seconds variable. 18 19 20 The following manual steps need to be performed on the device under test 21 before this test can be run: 22 - make sure that Ethernet cable is disconnected and WiFi is connected 23 - disconnect power cable 24 25 You are now ready to run the test. 26 """ 27 28 # TODO (bleung): Find a way to do automatic Facebook login for test account. 29 # TODO (tbroch): Find way to not replicate all these parameters that are common 30 # between this control file and the original 31 loop_time = 3600 32 loop_count = 1 33 34 # Task format: 35 # This sets the tasks variable in the extension directly via javascript. 36 # 37 # Args: 38 # type: [window, cycle] Window will open a window with tabs for the duration of 39 # the window. Cycle will cycle through the urls for the duration of the window 40 # every delay ms. 41 # name: name of the window 42 # start: start time (ms) 43 # duration: duration of task (ms) 44 # delay: time for each url for the cycle type (ms) 45 # timeout: time before loading a url times out for the cycle type (ms) 46 # focus: whether the window should be in the foreground 47 # tabs: list of urls for the window type 48 # urls: list of urls to cycle through for the cycle type 49 50 tasks='[{' + \ 51 ' type: \'window\',' + \ 52 ' name: \'background\',' + \ 53 ' start: 0,' + \ 54 ' duration: 3600000,' + \ 55 ' focus: false,' + \ 56 ' tabs: [' + \ 57 ' \'http://www.google.com\',' + \ 58 ' \'http://news.google.com\',' + \ 59 ' \'http://finance.yahoo.com\',' + \ 60 ' \'http://clothing.shop.ebay.com/Womens-Shoes-/63889/i.html\',' + \ 61 ' \'http://www.facebook.com\'' + \ 62 ' ]}, {' + \ 63 ' type: \'window\',' + \ 64 ' name: \'video\',' + \ 65 ' start: 1000,' + \ 66 ' duration: 3600000,' + \ 67 ' focus: true,' + \ 68 ' tabs: [' + \ 69 ' \'http://www.youtube.com/embed/YE7VzlLtp-4?autoplay=1&loop=1&' + \ 70 'playlist=YE7VzlLtp-4\'' + \ 71 ' ]}]' 72 73 74 job.run_test('power_LoadTest', loop_time=loop_time, loop_count=loop_count, 75 test_low_batt_p=6, tasks=tasks) 76