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

Unified Diff: chrome/test/data/extensions/api_test/tabs/javascript_url_permissions/test.js

Issue 9225010: Fix callback for chrome.tabs.update with javascript URLs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nits Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/tabs/javascript_url_permissions/test.js
diff --git a/chrome/test/data/extensions/api_test/tabs/javascript_url_permissions/test.js b/chrome/test/data/extensions/api_test/tabs/javascript_url_permissions/test.js
index d35d1b1845cb26a49f88ff6dfaedd2046dd34849..dc284d54b7ae66ffd1c09575e911cfafc093d1e8 100644
--- a/chrome/test/data/extensions/api_test/tabs/javascript_url_permissions/test.js
+++ b/chrome/test/data/extensions/api_test/tabs/javascript_url_permissions/test.js
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+var assertEq = chrome.test.assertEq;
+var pass = chrome.test.callbackPass;
+
chrome.test.getConfig(function(config) {
- var javaScriptURL = "javascript:void(document.body.bgColor='red')";
+ var javaScriptURL = "javascript:void(document.title='js-url-success')";
var fixPort = function(url) {
return url.replace(/PORT/, config.testServer.port);
@@ -26,8 +29,13 @@ chrome.test.getConfig(function(config) {
},
function javaScriptURLShouldSucceed() {
- chrome.tabs.update(secondTabId, {url: javaScriptURL},
- chrome.test.callbackPass());
+ chrome.tabs.update(
+ secondTabId,
+ {url: javaScriptURL},
+ pass(function(tab) {
+ assertEq(secondTabId, tab.id);
+ assertEq('js-url-success', tab.title);
+ }));
}
]);
});
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698