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

Side by Side Diff: chrome/test/data/extensions/api_test/incognito/split/background.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 pass = chrome.test.callbackPass; 5 var pass = chrome.test.callbackPass;
6 var assertEq = chrome.test.assertEq; 6 var assertEq = chrome.test.assertEq;
7 var assertTrue = chrome.test.assertTrue; 7 var assertTrue = chrome.test.assertTrue;
8 8
9 var win, tab; 9 var win, tab;
10 var inIncognitoContext = chrome.extension.inIncognitoContext; 10 var inIncognitoContext = chrome.extension.inIncognitoContext;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // Test that chrome.extension.inIncognitoContext is true for incognito 94 // Test that chrome.extension.inIncognitoContext is true for incognito
95 // tabs. 95 // tabs.
96 chrome.tabs.create({windowId: win.id, url: testUrl}, 96 chrome.tabs.create({windowId: win.id, url: testUrl},
97 pass(function(tab) { 97 pass(function(tab) {
98 chrome.tabs.executeScript(tab.id, 98 chrome.tabs.executeScript(tab.id,
99 {code: 'chrome.extension.sendRequest({' + 99 {code: 'chrome.extension.sendRequest({' +
100 ' inIncognitoContext: chrome.extension.inIncognitoContext' + 100 ' inIncognitoContext: chrome.extension.inIncognitoContext' +
101 '});'}, 101 '});'},
102 pass(function() { 102 pass(function() {
103 assertEq(undefined, chrome.extension.lastError); 103 assertEq(undefined, chrome.runtime.lastError);
104 })); 104 }));
105 })); 105 }));
106 106
107 var done = chrome.test.listenForever(chrome.extension.onRequest, 107 var done = chrome.test.listenForever(chrome.extension.onRequest,
108 function(request, sender, sendResponse) { 108 function(request, sender, sendResponse) {
109 assertEq(inIncognitoContext, request.inIncognitoContext); 109 assertEq(inIncognitoContext, request.inIncognitoContext);
110 sendResponse(); 110 sendResponse();
111 done(); 111 done();
112 }); 112 });
113 }, 113 },
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 // Tests that we can set cookies in both processes. 148 // Tests that we can set cookies in both processes.
149 function setDocumentCookie() { 149 function setDocumentCookie() {
150 document.cookie = "k=v"; 150 document.cookie = "k=v";
151 chrome.test.assertTrue(document.cookie.indexOf("k=v") != -1); 151 chrome.test.assertTrue(document.cookie.indexOf("k=v") != -1);
152 chrome.test.succeed(); 152 chrome.test.succeed();
153 } 153 }
154 ]); 154 ]);
155 155
156 }); 156 });
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/incognito/apis/background.js ('k') | chrome/test/data/extensions/api_test/input/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698