OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 var tests = [ |
| 6 function simple() { |
| 7 chrome.developerPrivate.getItemsInfo(callback(function(items) { |
| 8 chrome.test.assertEq(3, items.length); |
| 9 |
| 10 // Check that we got the icon correctly |
| 11 var extension = getItemNamed(items, "simple_extension"); |
| 12 var expected_url = |
| 13 "chrome://extension-icon/" + extension.id + "/" + 48 + "/1"; |
| 14 assertEq(expected_url, extension.icon); |
| 15 checkItemInList(items, "hosted_app", true, "hosted_app", |
| 16 { "appLaunchUrl": "http://www.google.com/", |
| 17 "offlineEnabled": true, |
| 18 "updateUrl": "http://example.com/update.xml" }); |
| 19 |
| 20 checkItemInList(items, "simple_extension", true, "extension", |
| 21 { "homepageUrl": "http://example.com/", |
| 22 "optionsUrl": "chrome-extension://<ID>/pages/options.html"}); |
| 23 |
| 24 var extension = getItemNamed(items, "packaged_app"); |
| 25 var launch_url = "chrome-extension://" + extension.id |
| 26 + "/main.html"; |
| 27 checkItemInList(items, "packaged_app", true, "legacy_packaged_app", |
| 28 { "appLaunchUrl": launch_url, |
| 29 "offlineEnabled": true}); |
| 30 })); |
| 31 } |
| 32 ]; |
| 33 |
| 34 chrome.test.runTests(tests); |
OLD | NEW |