mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 06:04:55 +08:00
The Network panel did have 1 e2e test file which covered some very specific cases such as encoding, mime type and checkbox interaction. But it did not have a simple and general test for the main UI interaction flows: displaying the list and selecting requests. Adding this test means that we now have a place for checks that verify that the panel works at all. Bug: 1079076 Change-Id: Idd798d87951393563b0e2c9cd5cf383e5251755f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2228759 Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
20 lines
630 B
HTML
20 lines
630 B
HTML
<!--
|
|
Copyright 2020 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.
|
|
-->
|
|
<script>
|
|
// This test page is useful for the network panel E2E tests.
|
|
// Load it with ?num=N where is the number of requests you want this test
|
|
// page to make.
|
|
|
|
function getNumberOfRequiredRequests() {
|
|
const url = new URL(document.location);
|
|
const number = url.searchParams.get('num');
|
|
return number ? parseInt(number, 10) : 0;
|
|
}
|
|
|
|
for (let i = 0; i < getNumberOfRequiredRequests(); i++) {
|
|
fetch(`image.svg?id=${i}`);
|
|
}
|
|
</script> |