Chromium Code Reviews| 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..3a0fd95e6fde570324a3dce0764372bc4ff69f4b |
| --- /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.assertTrue(typeof(result) == 'object'); |
|
lazyboy
2017/01/04 22:13:13
optional nit: use assertEq for these.
mark a. foltz
2017/01/05 19:16:35
Done.
|
| + chrome.test.assertTrue(result.appUrl == 'http://127.0.0.1/apps'); |
| + chrome.test.assertTrue(result.deviceDescription == |
| + '<xml>testDescription</xml>'); |
| + chrome.test.succeed(); |
| + }; |
| + chrome.dial.fetchDeviceDescription('testDevice', |
| + fetchDeviceDescriptionCallback); |
| + } |
| + ]); |
| +}; |