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

Unified Diff: chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.js

Issue 2583853004: [chrome.dial] Adds chrome.dial.fetchDeviceDecription API. (Closed)
Patch Set: Respond to lazyboy@ comments. Rebase w/namespace changes Created 3 years, 11 months 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/dial/experimental/fetch_device_description.js
diff --git a/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.js b/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.js
new file mode 100644
index 0000000000000000000000000000000000000000..11f20e63823358b14566249c0b12b9a19b5adc2e
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/dial/experimental/fetch_device_description.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2016 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.
+
+onload = function() {
+ chrome.test.runTests([
+ function fetchDeviceDecription() {
+ var fetchDeviceDescriptionCallback = function(result) {
+ chrome.test.assertNoLastError();
+ chrome.test.assertEq('object', typeof(result));
+ chrome.test.assertEq('http://127.0.0.1/apps', result.appUrl);
+ chrome.test.assertEq('<xml>testDescription</xml>',
+ result.deviceDescription);
+ chrome.test.succeed();
+ };
+ chrome.dial.fetchDeviceDescription('testDevice',
+ fetchDeviceDescriptionCallback);
Wez 2017/01/05 22:29:25 Shall we add a test case for API failure?
mark a. foltz 2017/01/09 21:38:08 Done.
+ }
+ ]);
+};

Powered by Google App Engine
This is Rietveld 408576698