| Index: chrome/test/data/extensions/api_test/system/get_update_status/background.js
|
| diff --git a/chrome/test/data/extensions/api_test/system/get_update_status/background.js b/chrome/test/data/extensions/api_test/system/get_update_status/background.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a54f9b44be2c1c4d08bff72efc5db0635cfb4409
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/api_test/system/get_update_status/background.js
|
| @@ -0,0 +1,30 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// systemPrivate.getUpdateStatus test for Chrome
|
| +// browser_tests --gtest_filter="GetUpdateStatusApiTest.Progress"
|
| +
|
| +chrome.test.runTests([
|
| + function notAvailable() {
|
| + chrome.systemPrivate.getUpdateStatus(function(status) {
|
| + chrome.test.assertEq(status.state, "NotAvailable");
|
| + chrome.test.assertEq(status.download_progress, 0.0);
|
| + chrome.test.succeed();
|
| + });
|
| + },
|
| + function updating() {
|
| + chrome.systemPrivate.getUpdateStatus(function(status) {
|
| + chrome.test.assertEq(status.state, "Updating");
|
| + chrome.test.assertEq(status.download_progress, 0.5);
|
| + chrome.test.succeed();
|
| + });
|
| + },
|
| + function needRestart() {
|
| + chrome.systemPrivate.getUpdateStatus(function(status) {
|
| + chrome.test.assertEq(status.state, "NeedRestart");
|
| + chrome.test.assertEq(status.download_progress, 1);
|
| + chrome.test.succeed();
|
| + });
|
| + }
|
| +]);
|
|
|