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

Unified Diff: chrome/test/data/extensions/api_test/webrequest/test_declarative2.js

Issue 14358004: Almost all actions in Declarative Web Request require all_urls host permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: All URLs -> all hosts; also rebased Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/webrequest/test_declarative2.js
diff --git a/chrome/test/data/extensions/api_test/webrequest/test_declarative2.js b/chrome/test/data/extensions/api_test/webrequest/test_declarative2.js
index be4b114a0521d37f687d1b1cd508579dfa4690c1..b2c960945b6696b8b2612dd8f6a048681d029619 100644
--- a/chrome/test/data/extensions/api_test/webrequest/test_declarative2.js
+++ b/chrome/test/data/extensions/api_test/webrequest/test_declarative2.js
@@ -254,42 +254,6 @@ runTests([
);
},
- function testPermission() {
- // Test that a redirect is ignored if the extension has no permission.
- // we load a.html from a.com and issue an XHR to b.com, which is not
- // contained in the extension's host permissions. Therefore, we cannot
- // redirect the XHR from b.com to a.com, and the request returns the
- // original file from b.com.
- ignoreUnexpected = true;
- expect();
- onRequest.addRules(
- [ {'conditions': [new RequestMatcher({'url': {'pathContains': ".json"}})],
- 'actions': [
- new RedirectRequest({'redirectUrl': getURLHttpSimple()})]}
- ],
- function() {
- var callback = chrome.test.callbackAdded();
- navigateAndWait(getURL("simpleLoad/a.html"), function() {
- var asynchronous = false;
- var req = new XMLHttpRequest();
- req.onreadystatechange = function() {
- if (this.readyState != this.DONE)
- return;
- // "{}" is the contents of the file at getURLHttpXHRData().
- if (this.status == 200 && this.responseText == "{}\n") {
- callback();
- } else {
- chrome.test.fail("Redirect was not prevented. Status: " +
- this.status + ", responseText: " + this.responseText);
- }
- };
- req.open("GET", getURLHttpXHRData(), asynchronous);
- req.send();
- });
- }
- );
- },
-
function testRequestHeaders() {
ignoreUnexpected = true;
expect(

Powered by Google App Engine
This is Rietveld 408576698