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

Side by Side Diff: chrome/test/data/extensions/api_test/context_menus/basics/test.js

Issue 2840038: Move context menu module out of experimental. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: kathy changes Created 10 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 if (!chrome.contextMenus) {
6 chrome.contextMenus = chrome.experimental.contextMenus;
7 }
8
9 var assertNoLastError = chrome.test.assertNoLastError; 5 var assertNoLastError = chrome.test.assertNoLastError;
10 6
11 var tests = [ 7 var tests = [
12 function simple() { 8 function simple() {
13 chrome.contextMenus.create({"title":"1"}, chrome.test.callbackPass()); 9 chrome.contextMenus.create({"title":"1"}, chrome.test.callbackPass());
14 }, 10 },
15 11
16 function no_properties() { 12 function no_properties() {
17 chrome.contextMenus.create({}, function(id) { 13 chrome.contextMenus.create({}, function(id) {
18 chrome.test.assertTrue(chrome.extension.lastError != null); 14 chrome.test.assertTrue(chrome.extension.lastError != null);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 77 }
82 78
83 for (var i in types) { 79 for (var i in types) {
84 tests.push(makeCreateTest(types[i])); 80 tests.push(makeCreateTest(types[i]));
85 } 81 }
86 for (var i in contexts) { 82 for (var i in contexts) {
87 tests.push(makeCreateTest("normal", [ contexts[i] ])); 83 tests.push(makeCreateTest("normal", [ contexts[i] ]));
88 } 84 }
89 85
90 chrome.test.runTests(tests); 86 chrome.test.runTests(tests);
91
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698