Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/webrequest/framework.js |
| diff --git a/chrome/test/data/extensions/api_test/webrequest/framework.js b/chrome/test/data/extensions/api_test/webrequest/framework.js |
| index 461ee561896b5e2b930c0f9bc90c3a00faea25f4..65fb8426adceaf3c519ccd7f2f1fa0bd9a289ace 100644 |
| --- a/chrome/test/data/extensions/api_test/webrequest/framework.js |
| +++ b/chrome/test/data/extensions/api_test/webrequest/framework.js |
| @@ -11,6 +11,7 @@ var expectedEventOrder; |
| var tabId; |
| var tabIdMap; |
| var frameIdMap; |
| +var testWebSocketPort; |
| var testServerPort; |
| var testServer = "www.a.com"; |
| var defaultScheme = "http"; |
| @@ -45,6 +46,7 @@ function runTests(tests) { |
| chrome.tabs.onUpdated.removeListener(waitForAboutBlank); |
| chrome.test.getConfig(function(config) { |
| testServerPort = config.testServer.port; |
| + testWebSocketPort = config.testWebSocketPort; |
| chrome.test.runTests(tests); |
| }); |
| } |
| @@ -204,11 +206,15 @@ function isUnexpectedDetachedRequest(name, details) { |
| function captureEvent(name, details, callback) { |
| // Ignore system-level requests like safebrowsing updates and favicon fetches |
| // since they are unpredictable. |
| - if ((details.type == "other" && !details.url.includes('dont-ignore-me')) || |
| + // TODO(pkalinnikov): Remove the startsWith('ws') check once a new type gets |
| + // intoduced for the WebSocket requests. |
|
tyoshino (SeeGerritForStatus)
2016/12/06 08:05:06
introduced
pkalinnikov
2016/12/13 21:15:59
Done.
|
| + if ((details.type == "other" && !details.url.includes('dont-ignore-me') && |
| + !details.url.startsWith('ws')) || |
| isUnexpectedDetachedRequest(name, details) || |
| details.url.match(/\/favicon.ico$/) || |
| - details.url.match(/https:\/\/dl.google.com/)) |
| + details.url.match(/https:\/\/dl.google.com/)) { |
| return; |
| + } |
| // Pull the extra per-event options out of the expected data. These let |
| // us specify special return values per event. |