Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: chrome/test/data/extensions/api_test/system/get_update_status/background.js

Issue 8747003: Add private system extension API to get system update status (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for the case with no update on non-ChromeOS platforms Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698