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

Side by Side Diff: chrome/test/data/extensions/context_menus/separators/common.js

Issue 11745015: Update references to the extension messaging APIs to point to the "runtime" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | Annotate | Revision Log
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 function create(title, type, parent, callback) { 5 function create(title, type, parent, callback) {
6 props = {}; 6 props = {};
7 if (title) { 7 if (title) {
8 props.title = title; 8 props.title = title;
9 } 9 }
10 props.type = type; 10 props.type = type;
11 11
12 if (parent) { 12 if (parent) {
13 props.parentId = parent; 13 props.parentId = parent;
14 } 14 }
15 15
16 chrome.contextMenus.create(props, function() { 16 chrome.contextMenus.create(props, function() {
17 if (!chrome.extension.lastError && callback) { 17 if (!chrome.runtime.lastError && callback) {
18 callback(); 18 callback();
19 } 19 }
20 }); 20 });
21 } 21 }
22 22
23 function createTestSet(parent, callback) { 23 function createTestSet(parent, callback) {
24 create("radio1", "radio", parent); 24 create("radio1", "radio", parent);
25 create("radio2", "radio", parent); 25 create("radio2", "radio", parent);
26 create("normal1", "normal", parent); 26 create("normal1", "normal", parent);
27 create(null, "separator", parent); 27 create(null, "separator", parent);
28 create("normal2", "normal", parent); 28 create("normal2", "normal", parent);
29 create(null, "separator", parent); 29 create(null, "separator", parent);
30 create("radio3", "radio", parent); 30 create("radio3", "radio", parent);
31 create("radio4", "radio", parent); 31 create("radio4", "radio", parent);
32 create(null, "separator", parent); 32 create(null, "separator", parent);
33 create("normal3", "normal", parent, callback); 33 create("normal3", "normal", parent, callback);
34 } 34 }
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/context_menus/patterns/test.js ('k') | chrome/test/data/extensions/context_menus/simple/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698