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

Side by Side Diff: chrome/test/data/extensions/api_test/executescript/run_at/test.js

Issue 9456037: Adding run_at to chrome.tabs.executeScript/insertCss. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
« no previous file with comments | « chrome/test/data/extensions/api_test/executescript/run_at/test.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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
5 var relativePath =
6 '/files/extensions/api_test/executescript/run_at/test.html';
7 var testUrl = 'http://b.com:PORT' + relativePath;
8
9 chrome.test.getConfig(function(config) {
10 testUrl = testUrl.replace(/PORT/, config.testServer.port);
11 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
12 if (changeInfo.status != 'complete')
13 return;
14 chrome.tabs.onUpdated.removeListener(arguments.callee);
15 chrome.test.runTests([
16 function executeAtStartShouldSucceed() {
17 var scriptDetails = {};
18 scriptDetails.code = "document.title = 'Injected';";
19 scriptDetails.runAt = "document_start";
20 chrome.tabs.executeScript(tabId, scriptDetails, function() {
21 chrome.tabs.get(tabId, chrome.test.callbackPass(function(tab) {
22 chrome.test.assertEq('Injected', tab.title);
23 }));
24 });
25 },
26 ]);
27 });
28 chrome.tabs.create({ url: testUrl });
29 });
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/executescript/run_at/test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698