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

Unified 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 side-by-side diff with in-line comments
Download patch
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();
+ });
+ }
+]);

Powered by Google App Engine
This is Rietveld 408576698