Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / webrequest_permissions / spanning / background.js
blob66a1f8e191bc8f37260c6a49e5124856e3134d83
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.
5 chrome.declarativeWebRequest.onRequest.removeRules();
6 var rule = {
7 conditions: [
8 new chrome.declarativeWebRequest.RequestMatcher(
9 {url: {pathContains: '.html'}}),
11 actions: [
12 new chrome.declarativeWebRequest.RedirectRequest(
13 {'redirectUrl': 'data:text/plain,redirected1'})
16 function notifyDone() {
17 chrome.test.sendMessage("done");
19 chrome.declarativeWebRequest.onRequest.addRules([rule], notifyDone);