Files
react-native-devtools-frontend/front_end/extensions_test_runner/ExtensionsNetworkTestRunner.js
T
Tim van der Lippe 83f02be257 Standardize license headers
Many of the license headers were incorrect or corrupted. To prepare for
a check that verifies correct license headers are added to source code,
we should fix up the existing license headers to use the correct format.

The license headers that include non-Google/non-Chromium authors are
left as-is.

Change-Id: Iab9bdc41d815ac7ab07ccacf44818f3b56a75230
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016745
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-01-23 13:00:41 +00:00

29 lines
734 B
JavaScript

// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview using private properties isn't a Closure violation in tests.
* @suppress {accessControls}
*/
self.extension_getRequestByUrl = function(urls, callback) {
function onHAR(response) {
const entries = response.entries;
for (let i = 0; i < entries.length; ++i) {
for (let url = 0; url < urls.length; ++url) {
if (urls[url].test(entries[i].request.url)) {
callback(entries[i]);
return;
}
}
}
output('no item found');
callback(null);
}
webInspector.network.getHAR(onHAR);
};