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

Side by Side Diff: chrome/test/data/devtools/extensions/devtools_messaging/devtools.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) 2013 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.
4
1 function output(msg) { 5 function output(msg) {
2 chrome.devtools.inspectedWindow.eval("console.log(unescape('" + 6 chrome.devtools.inspectedWindow.eval("console.log(unescape('" +
3 escape(msg) + "'));") 7 escape(msg) + "'));")
4 } 8 }
5 9
6 var hadErrors = false; 10 var hadErrors = false;
7 11
8 function assertEquals(expected, actual) { 12 function assertEquals(expected, actual) {
9 if (expected === actual) 13 if (expected === actual)
10 return; 14 return;
(...skipping 20 matching lines...) Expand all
31 assertEquals('onRequest callback: ' + JSON.stringify(object), response); 35 assertEquals('onRequest callback: ' + JSON.stringify(object), response);
32 step3(); 36 step3();
33 }); 37 });
34 } 38 }
35 39
36 function step3() { 40 function step3() {
37 function onMessage(message) { 41 function onMessage(message) {
38 assertEquals("port.onMessage: foo", message); 42 assertEquals("port.onMessage: foo", message);
39 completeTest(); 43 completeTest();
40 } 44 }
41 var port = chrome.extension.connect(); 45 var port = chrome.runtime.connect();
42 port.onMessage.addListener(onMessage); 46 port.onMessage.addListener(onMessage);
43 port.postMessage("foo"); 47 port.postMessage("foo");
44 } 48 }
45 49
46 step1(); 50 step1();
OLDNEW
« no previous file with comments | « chrome/test/data/devtools/extensions/devtools_messaging/background.js ('k') | chrome/test/data/extensions/api_test/README.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698