| Index: chrome/test/data/extensions/api_test/context_menus/no_perms/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/context_menus/no_perms/test.js b/chrome/test/data/extensions/api_test/context_menus/no_perms/test.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ca9a60e7b828cbd1560612a1ad4944d78bcfec4c
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/api_test/context_menus/no_perms/test.js
|
| @@ -0,0 +1,21 @@
|
| +// Copyright (c) 2010 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.
|
| +
|
| +var tests = [
|
| + function simple() {
|
| + try {
|
| + chrome.contextMenus.create({"title":"1"}, function() {
|
| + });
|
| + } catch (e) {
|
| + chrome.test.assertTrue(e.message.indexOf(
|
| + "You do not have permission to use 'contextMenus.create'") == 0);
|
| + chrome.test.succeed();
|
| + return;
|
| + }
|
| +
|
| + chrome.test.fail("Should have gotten access error.");
|
| + }
|
| +];
|
| +
|
| +chrome.test.runTests(tests);
|
|
|