mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-09 21:28:43 +08:00
All of these were Closure-specific. R=szuend@chromium.org No-Presubmit: True Bug: 1011811 Change-Id: Ia580e21cd3b06f532bb5a63a770ccfa3d7c796ee Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569761 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org>
28 lines
704 B
JavaScript
28 lines
704 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.
|
|
*/
|
|
|
|
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);
|
|
};
|