OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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. |
| 4 |
| 5 // systemPrivate.getUpdateStatus test for Chrome |
| 6 // browser_tests --gtest_filter="GetUpdateStatusApiTest.Progress" |
| 7 |
| 8 chrome.test.runTests([ |
| 9 function notAvailable() { |
| 10 chrome.systemPrivate.getUpdateStatus(function(status) { |
| 11 chrome.test.assertEq(status.state, "NotAvailable"); |
| 12 chrome.test.assertEq(status.download_progress, 0.0); |
| 13 chrome.test.succeed(); |
| 14 }); |
| 15 }, |
| 16 function updating() { |
| 17 chrome.systemPrivate.getUpdateStatus(function(status) { |
| 18 chrome.test.assertEq(status.state, "Updating"); |
| 19 chrome.test.assertEq(status.download_progress, 0.5); |
| 20 chrome.test.succeed(); |
| 21 }); |
| 22 }, |
| 23 function needRestart() { |
| 24 chrome.systemPrivate.getUpdateStatus(function(status) { |
| 25 chrome.test.assertEq(status.state, "NeedRestart"); |
| 26 chrome.test.assertEq(status.download_progress, 1); |
| 27 chrome.test.succeed(); |
| 28 }); |
| 29 } |
| 30 ]); |
OLD | NEW |