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.
5 function testCallback(callback) {
6 var done = chrome.test.callbackAdded();
9 callback.call(null, arguments);
16 chrome.test.runTests([
17 function tabsCreateThrowsError() {
18 chrome.tabs.create({}, testCallback(function() {
19 throw new Error("tata");
22 function permissionsGetAllThrowsError() {
23 // permissions.getAll has a custom callback, as do many other methods, but
24 // this is easy to call.
25 chrome.permissions.getAll(testCallback(function() {
26 throw new Error("boom");