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

Side by Side Diff: chrome/test/data/extensions/api_test/webrequest/test_declarative.js

Issue 10257006: Move Declarative Web Request API out of experimental and make it a feature (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 7 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
« no previous file with comments | « chrome/test/data/extensions/api_test/webrequest/manifest.json ('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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 onRequest = chrome.experimental.webRequest.onRequest; 5 var onRequest = chrome.declarativeWebRequest.onRequest;
6 var RequestMatcher = chrome.experimental.webRequest.RequestMatcher; 6 var RequestMatcher = chrome.declarativeWebRequest.RequestMatcher;
7 var CancelRequest = chrome.experimental.webRequest.CancelRequest; 7 var CancelRequest = chrome.declarativeWebRequest.CancelRequest;
8 var RedirectRequest = chrome.experimental.webRequest.RedirectRequest; 8 var RedirectRequest = chrome.declarativeWebRequest.RedirectRequest;
9 9
10 function getURLHttpSimple() { 10 function getURLHttpSimple() {
11 return getServerURL("files/extensions/api_test/webrequest/simpleLoad/a.html"); 11 return getServerURL("files/extensions/api_test/webrequest/simpleLoad/a.html");
12 } 12 }
13 13
14 function getURLHttpComplex() { 14 function getURLHttpComplex() {
15 return getServerURL( 15 return getServerURL(
16 "files/extensions/api_test/webrequest/complexLoad/a.html"); 16 "files/extensions/api_test/webrequest/complexLoad/a.html");
17 } 17 }
18 18
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 onRequest.addRules( 93 onRequest.addRules(
94 [ {'conditions': [new RequestMatcher({'url': {'pathSuffix': ".html"}})], 94 [ {'conditions': [new RequestMatcher({'url': {'pathSuffix': ".html"}})],
95 'actions': [ 95 'actions': [
96 new RedirectRequest({'redirectUrl': getURLHttpSimple()})]} 96 new RedirectRequest({'redirectUrl': getURLHttpSimple()})]}
97 ], 97 ],
98 function() {navigateAndWait(getURLHttpComplex());} 98 function() {navigateAndWait(getURLHttpComplex());}
99 ); 99 );
100 }, 100 },
101 ]); 101 ]);
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/webrequest/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698