1 // Copyright (c) 2012 The Chromium 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.
5 // systemPrivate.getUpdateStatus test for Chrome
6 // browser_tests --gtest_filter="GetUpdateStatusApiTest.Progress"
9 function notAvailable() {
10 chrome.systemPrivate.getUpdateStatus(function(status) {
11 chrome.test.assertEq(status.state, "NotAvailable");
12 chrome.test.assertEq(status.downloadProgress, 0.0);
13 chrome.test.succeed();
17 chrome.systemPrivate.getUpdateStatus(function(status) {
18 chrome.test.assertEq(status.state, "Updating");
19 chrome.test.assertEq(status.downloadProgress, 0.5);
20 chrome.test.succeed();
23 function needRestart() {
24 chrome.systemPrivate.getUpdateStatus(function(status) {
25 chrome.test.assertEq(status.state, "NeedRestart");
26 chrome.test.assertEq(status.downloadProgress, 1);
27 chrome.test.succeed();