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

Side by Side Diff: chrome/test/data/extensions/api_test/context_menus/basics/test.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 var assertNoLastError = chrome.test.assertNoLastError; 5 var assertNoLastError = chrome.test.assertNoLastError;
6 6
7 var tests = [ 7 var tests = [
8 function simple() { 8 function simple() {
9 chrome.contextMenus.create({"title":"1"}, chrome.test.callbackPass()); 9 chrome.contextMenus.create({"title":"1"}, chrome.test.callbackPass());
10 }, 10 },
11 11
12 function no_properties() { 12 function no_properties() {
13 chrome.contextMenus.create({}, function(id) { 13 chrome.contextMenus.create({}, function(id) {
14 chrome.test.assertTrue(chrome.extension.lastError != null); 14 chrome.test.assertTrue(chrome.runtime.lastError != null);
15 chrome.test.succeed(); 15 chrome.test.succeed();
16 }); 16 });
17 }, 17 },
18 18
19 function remove() { 19 function remove() {
20 var id; 20 var id;
21 id = chrome.contextMenus.create({"title":"1"}, function() { 21 id = chrome.contextMenus.create({"title":"1"}, function() {
22 assertNoLastError(); 22 assertNoLastError();
23 chrome.contextMenus.remove(id, chrome.test.callbackPass()); 23 chrome.contextMenus.remove(id, chrome.test.callbackPass());
24 }); 24 });
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 for (var i in types) { 79 for (var i in types) {
80 tests.push(makeCreateTest(types[i])); 80 tests.push(makeCreateTest(types[i]));
81 } 81 }
82 for (var i in contexts) { 82 for (var i in contexts) {
83 tests.push(makeCreateTest("normal", [ contexts[i] ])); 83 tests.push(makeCreateTest("normal", [ contexts[i] ]));
84 } 84 }
85 85
86 chrome.test.runTests(tests); 86 chrome.test.runTests(tests);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698