| OLD | NEW |
| 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.declarativeWebRequest.onRequest; | 5 var onRequest = chrome.declarativeWebRequest.onRequest; |
| 6 var AddResponseHeader = | 6 var AddResponseHeader = |
| 7 chrome.declarativeWebRequest.AddResponseHeader; | 7 chrome.declarativeWebRequest.AddResponseHeader; |
| 8 var RequestMatcher = chrome.declarativeWebRequest.RequestMatcher; | 8 var RequestMatcher = chrome.declarativeWebRequest.RequestMatcher; |
| 9 var CancelRequest = chrome.declarativeWebRequest.CancelRequest; | 9 var CancelRequest = chrome.declarativeWebRequest.CancelRequest; |
| 10 var RedirectByRegEx = chrome.declarativeWebRequest.RedirectByRegEx; | 10 var RedirectByRegEx = chrome.declarativeWebRequest.RedirectByRegEx; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 details: {url: getURLOfHTMLWithThirdParty()} | 73 details: {url: getURLOfHTMLWithThirdParty()} |
| 74 }, | 74 }, |
| 75 { label: "onSendHeaders", | 75 { label: "onSendHeaders", |
| 76 event: "onSendHeaders", | 76 event: "onSendHeaders", |
| 77 details: {url: getURLOfHTMLWithThirdParty()} | 77 details: {url: getURLOfHTMLWithThirdParty()} |
| 78 }, | 78 }, |
| 79 { label: "onHeadersReceived", | 79 { label: "onHeadersReceived", |
| 80 event: "onHeadersReceived", | 80 event: "onHeadersReceived", |
| 81 details: { | 81 details: { |
| 82 url: getURLOfHTMLWithThirdParty(), | 82 url: getURLOfHTMLWithThirdParty(), |
| 83 statusLine: "HTTP/1.1 200 OK" | 83 statusLine: "HTTP/1.1 200 OK", |
| 84 statusCode: 200 |
| 84 } | 85 } |
| 85 }, | 86 }, |
| 86 { label: "onResponseStarted", | 87 { label: "onResponseStarted", |
| 87 event: "onResponseStarted", | 88 event: "onResponseStarted", |
| 88 details: { | 89 details: { |
| 89 url: getURLOfHTMLWithThirdParty(), | 90 url: getURLOfHTMLWithThirdParty(), |
| 90 fromCache: false, | 91 fromCache: false, |
| 91 ip: "127.0.0.1", | 92 ip: "127.0.0.1", |
| 92 statusCode: 200, | 93 statusCode: 200, |
| 93 statusLine: "HTTP/1.1 200 OK" | 94 statusLine: "HTTP/1.1 200 OK" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 event: "onSendHeaders", | 192 event: "onSendHeaders", |
| 192 details: { | 193 details: { |
| 193 url: getURLHttpWithHeaders(), | 194 url: getURLHttpWithHeaders(), |
| 194 } | 195 } |
| 195 }, | 196 }, |
| 196 { label: "onHeadersReceived", | 197 { label: "onHeadersReceived", |
| 197 event: "onHeadersReceived", | 198 event: "onHeadersReceived", |
| 198 details: { | 199 details: { |
| 199 statusLine: "HTTP/1.1 200 OK", | 200 statusLine: "HTTP/1.1 200 OK", |
| 200 url: getURLHttpWithHeaders(), | 201 url: getURLHttpWithHeaders(), |
| 202 statusCode: 200 |
| 201 } | 203 } |
| 202 }, | 204 }, |
| 203 { label: "onErrorOccurred", | 205 { label: "onErrorOccurred", |
| 204 event: "onErrorOccurred", | 206 event: "onErrorOccurred", |
| 205 details: { | 207 details: { |
| 206 url: getURLHttpWithHeaders(), | 208 url: getURLHttpWithHeaders(), |
| 207 fromCache: false, | 209 fromCache: false, |
| 208 error: "net::ERR_BLOCKED_BY_CLIENT" | 210 error: "net::ERR_BLOCKED_BY_CLIENT" |
| 209 } | 211 } |
| 210 }, | 212 }, |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 'urlMatches': 'simple[A-Z].*a\.html$', | 510 'urlMatches': 'simple[A-Z].*a\.html$', |
| 509 'schemes': ["http"] | 511 'schemes': ["http"] |
| 510 }, | 512 }, |
| 511 })], | 513 })], |
| 512 'actions': [new CancelRequest()]} | 514 'actions': [new CancelRequest()]} |
| 513 ], | 515 ], |
| 514 function() {navigateAndWait(getURLHttpSimple());} | 516 function() {navigateAndWait(getURLHttpSimple());} |
| 515 ); | 517 ); |
| 516 }, | 518 }, |
| 517 ]); | 519 ]); |
| OLD | NEW |