diff --git a/Makefile b/Makefile index 7192c6473d97cf..0344ae26438b31 100644 --- a/Makefile +++ b/Makefile @@ -609,6 +609,10 @@ test-debug: BUILDTYPE_LOWER=debug ## Run tests on a debug build. test-release test-debug: test-build ## Run tests on a release or debug build. $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) +.PHONY: test-test426 +test-test426: all ## Run the Web Platform Tests. + $(PYTHON) tools/test.py $(PARALLEL_ARGS) test426 + .PHONY: test-wpt test-wpt: all ## Run the Web Platform Tests. $(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt diff --git a/test/fixtures/test426/LICENSE.md b/test/fixtures/test426/LICENSE.md new file mode 100644 index 00000000000000..39501a3b7c70dd --- /dev/null +++ b/test/fixtures/test426/LICENSE.md @@ -0,0 +1,14 @@ +The Source Map Tests suite ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://www.ecma-international.org/ipr FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS*. + +Copyright (c) 2024, Ecma International +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +* Ecma International Standards hereafter means Ecma International Standards as well as Ecma Technical Reports diff --git a/test/fixtures/test426/README.md b/test/fixtures/test426/README.md new file mode 100644 index 00000000000000..e3e353fd500458 --- /dev/null +++ b/test/fixtures/test426/README.md @@ -0,0 +1,55 @@ +# Source Map Tests + +This repository holds testing discussions and tests for the the Source Map debugging format. Specifically, we're looking to encourage discussion around: + +- Manual and automated testing strategies for Source Maps +- Gathering a list of Soure Map generators and consumers +- General discussion around deviations between source maps + +Open discussion happens in the [GitHub issues](https://github.com/source-map/source-map-tests/issues). + +Source Map spec: + * Repo: https://github.com/tc39/source-map + * Rendered spec: https://tc39.es/source-map/ + +## Test cases + +This repo also contains cross-implementation test cases that can be run in test +suites for source map implementations, including browser devtool and library test +suites. + +### Running the tests + +#### Tools + +[Source map validator](https://github.com/jkup/source-map-validator): + * The tests are included in the validator test suite [here](https://github.com/jkup/source-map-validator/blob/main/src/spec-tests.test.ts). You can run them with `npm test`. + +#### Browsers + +The tests for Firefox are in the Mozilla [source-map](https://github.com/mozilla/source-map) library: + * The upstream repo has a [test file](https://github.com/mozilla/source-map/blob/master/test/test-spec-tests.js) for running the spec tests from this repo. They can be run with `npm test`. + +How to run in WebKit: + * Check out [WebKit](https://github.com/WebKit/WebKit/) + * `cd` to the checked out WebKit directory. + * Run `git am /webkit/0001-Add-harness-for-source-maps-spec-tests.patch` + * Run `Tools/Scripts/build-webkit` (depending on the platform you may need to pass `--gtk` or other flags) + * Run `Tools/Scripts/run-webkit-tests LayoutTests/inspector/model/source-map-spec.html` (again, you may need `--gtk` on Linux) + +How to run in Chrome Devtools: +1. Setup: + * Install depot_tools following this [depot_tools guide](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) + * Check out [Chrome Devtools](https://chromium.googlesource.com/devtools/devtools-frontend): + * Run `gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged` + * Run `cd devtools-frontend` + * Run `gclient sync` + * Run `gn gen out/Default` +2. Build: + * Run `autoninja -C out/Default` +3. Test: + * Run `npm run auto-unittest` +4. Apply patches from this repo: + * Run `git apply ` in `devtools-frontend` repo + +More information about running Chrome Devtools without building Chromium can be found [here](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/chromium/3965/README.md) diff --git a/test/fixtures/test426/chrome/0001-Add-source-map-specification-tests.patch b/test/fixtures/test426/chrome/0001-Add-source-map-specification-tests.patch new file mode 100644 index 00000000000000..995bcf246c839d --- /dev/null +++ b/test/fixtures/test426/chrome/0001-Add-source-map-specification-tests.patch @@ -0,0 +1,3867 @@ +From afa11641db357e524c8f4d5f573945dd15c1f2e9 Mon Sep 17 00:00:00 2001 +From: Agata Belkius +Date: Fri, 19 Apr 2024 15:30:48 +0100 +Subject: [PATCH 1/2] Add source map specification tests + +--- + front_end/BUILD.gn | 1 + + front_end/core/sdk/BUILD.gn | 1 + + front_end/core/sdk/SourceMapSpec.test.ts | 206 +++ + .../core/sdk/fixtures/sourcemaps/BUILD.gn | 202 +++ + .../sourcemaps/basic-mapping-as-index-map.js | 2 + + .../basic-mapping-as-index-map.js.map | 15 + + .../sourcemaps/basic-mapping-original.js | 8 + + .../sdk/fixtures/sourcemaps/basic-mapping.js | 2 + + .../fixtures/sourcemaps/basic-mapping.js.map | 6 + + .../fixtures/sourcemaps/ignore-list-empty.js | 1 + + .../sourcemaps/ignore-list-empty.js.map | 8 + + .../sourcemaps/ignore-list-out-of-bounds.js | 1 + + .../ignore-list-out-of-bounds.js.map | 8 + + .../sourcemaps/ignore-list-valid-1.js | 1 + + .../sourcemaps/ignore-list-valid-1.js.map | 8 + + .../sourcemaps/ignore-list-wrong-type-1.js | 1 + + .../ignore-list-wrong-type-1.js.map | 8 + + .../sourcemaps/ignore-list-wrong-type-2.js | 1 + + .../ignore-list-wrong-type-2.js.map | 8 + + .../sourcemaps/ignore-list-wrong-type-3.js | 1 + + .../ignore-list-wrong-type-3.js.map | 8 + + .../index-map-invalid-base-mappings.js | 1 + + .../index-map-invalid-base-mappings.js.map | 15 + + .../sourcemaps/index-map-invalid-order.js | 1 + + .../sourcemaps/index-map-invalid-order.js.map | 23 + + .../sourcemaps/index-map-invalid-overlap.js | 1 + + .../index-map-invalid-overlap.js.map | 23 + + .../sourcemaps/index-map-missing-map.js | 1 + + .../sourcemaps/index-map-missing-map.js.map | 8 + + .../index-map-missing-offset-column.js | 1 + + .../index-map-missing-offset-column.js.map | 14 + + .../index-map-missing-offset-line.js | 1 + + .../index-map-missing-offset-line.js.map | 14 + + .../sourcemaps/index-map-missing-offset.js | 1 + + .../index-map-missing-offset.js.map | 13 + + .../index-map-offset-column-wrong-type.js | 1 + + .../index-map-offset-column-wrong-type.js.map | 14 + + .../index-map-offset-line-wrong-type.js | 1 + + .../index-map-offset-line-wrong-type.js.map | 14 + + .../index-map-two-concatenated-sources.js | 2 + + .../index-map-two-concatenated-sources.js.map | 24 + + .../sourcemaps/index-map-wrong-type-map.js | 1 + + .../index-map-wrong-type-map.js.map | 9 + + .../sourcemaps/index-map-wrong-type-offset.js | 1 + + .../index-map-wrong-type-offset.js.map | 14 + + .../index-map-wrong-type-sections.js | 1 + + .../index-map-wrong-type-sections.js.map | 4 + + .../invalid-mapping-bad-separator.js | 2 + + .../invalid-mapping-bad-separator.js.map | 6 + + .../invalid-mapping-not-a-string-1.js | 1 + + .../invalid-mapping-not-a-string-1.js.map | 7 + + .../invalid-mapping-not-a-string-2.js | 1 + + .../invalid-mapping-not-a-string-2.js.map | 7 + + ...nvalid-mapping-segment-column-too-large.js | 1 + + ...id-mapping-segment-column-too-large.js.map | 7 + + ...apping-segment-name-index-out-of-bounds.js | 1 + + ...ng-segment-name-index-out-of-bounds.js.map | 7 + + ...id-mapping-segment-name-index-too-large.js | 1 + + ...apping-segment-name-index-too-large.js.map | 7 + + ...invalid-mapping-segment-negative-column.js | 1 + + ...lid-mapping-segment-negative-column.js.map | 7 + + ...lid-mapping-segment-negative-name-index.js | 1 + + ...mapping-segment-negative-name-index.js.map | 7 + + ...apping-segment-negative-original-column.js | 1 + + ...ng-segment-negative-original-column.js.map | 7 + + ...-mapping-segment-negative-original-line.js | 1 + + ...ping-segment-negative-original-line.js.map | 7 + + ...apping-segment-negative-relative-column.js | 1 + + ...ng-segment-negative-relative-column.js.map | 8 + + ...ng-segment-negative-relative-name-index.js | 1 + + ...egment-negative-relative-name-index.js.map | 8 + + ...gment-negative-relative-original-column.js | 1 + + ...t-negative-relative-original-column.js.map | 8 + + ...segment-negative-relative-original-line.js | 1 + + ...ent-negative-relative-original-line.js.map | 8 + + ...-segment-negative-relative-source-index.js | 1 + + ...ment-negative-relative-source-index.js.map | 8 + + ...d-mapping-segment-negative-source-index.js | 1 + + ...pping-segment-negative-source-index.js.map | 7 + + ...pping-segment-original-column-too-large.js | 1 + + ...g-segment-original-column-too-large.js.map | 7 + + ...mapping-segment-original-line-too-large.js | 1 + + ...ing-segment-original-line-too-large.js.map | 7 + + ...ping-segment-source-index-out-of-bounds.js | 1 + + ...-segment-source-index-out-of-bounds.js.map | 7 + + ...-mapping-segment-source-index-too-large.js | 1 + + ...ping-segment-source-index-too-large.js.map | 7 + + ...valid-mapping-segment-with-three-fields.js | 2 + + ...d-mapping-segment-with-three-fields.js.map | 6 + + ...invalid-mapping-segment-with-two-fields.js | 2 + + ...lid-mapping-segment-with-two-fields.js.map | 6 + + ...nvalid-mapping-segment-with-zero-fields.js | 1 + + ...id-mapping-segment-with-zero-fields.js.map | 7 + + .../invalid-vlq-missing-continuation.js | 1 + + .../invalid-vlq-missing-continuation.js.map | 6 + + .../sourcemaps/invalid-vlq-non-base64-char.js | 1 + + .../invalid-vlq-non-base64-char.js.map | 6 + + .../sdk/fixtures/sourcemaps/names-missing.js | 1 + + .../fixtures/sourcemaps/names-missing.js.map | 5 + + .../fixtures/sourcemaps/names-not-a-list-1.js | 1 + + .../sourcemaps/names-not-a-list-1.js.map | 6 + + .../fixtures/sourcemaps/names-not-a-list-2.js | 1 + + .../sourcemaps/names-not-a-list-2.js.map | 6 + + .../fixtures/sourcemaps/names-not-string.js | 1 + + .../sourcemaps/names-not-string.js.map | 6 + + .../sourcemaps/second-source-original.js | 4 + + .../sourcemaps/source-map-spec-tests.json | 1540 +++++++++++++++++ + .../sources-and-sources-content-both-null.js | 1 + + ...urces-and-sources-content-both-null.js.map | 7 + + .../fixtures/sourcemaps/sources-missing.js | 1 + + .../sourcemaps/sources-missing.js.map | 5 + + .../sources-non-null-sources-content-null.js | 2 + + ...urces-non-null-sources-content-null.js.map | 7 + + .../sourcemaps/sources-not-a-list-1.js | 1 + + .../sourcemaps/sources-not-a-list-1.js.map | 6 + + .../sourcemaps/sources-not-a-list-2.js | 1 + + .../sourcemaps/sources-not-a-list-2.js.map | 6 + + .../sourcemaps/sources-not-string-or-null.js | 1 + + .../sources-not-string-or-null.js.map | 6 + + .../sources-null-sources-content-non-null.js | 2 + + ...urces-null-sources-content-non-null.js.map | 7 + + .../sourcemaps/transitive-mapping-original.js | 5 + + .../transitive-mapping-original.js.map | 8 + + .../transitive-mapping-three-steps.js | 6 + + .../transitive-mapping-three-steps.js.map | 7 + + .../fixtures/sourcemaps/transitive-mapping.js | 2 + + .../sourcemaps/transitive-mapping.js.map | 6 + + .../sourcemaps/typescript-original.ts | 5 + + .../sourcemaps/unrecognized-property.js | 1 + + .../sourcemaps/unrecognized-property.js.map | 8 + + .../valid-mapping-boundary-values.js | 1 + + .../valid-mapping-boundary-values.js.map | 7 + + .../sourcemaps/valid-mapping-empty-groups.js | 1 + + .../valid-mapping-empty-groups.js.map | 8 + + .../sourcemaps/valid-mapping-large-vlq.js | 1 + + .../sourcemaps/valid-mapping-large-vlq.js.map | 6 + + .../sourcemaps/valid-mapping-null-sources.js | 2 + + .../valid-mapping-null-sources.js.map | 6 + + .../fixtures/sourcemaps/version-missing.js | 1 + + .../sourcemaps/version-missing.js.map | 5 + + .../sourcemaps/version-not-a-number.js | 1 + + .../sourcemaps/version-not-a-number.js.map | 6 + + .../sourcemaps/version-numeric-string.js | 1 + + .../sourcemaps/version-numeric-string.js.map | 6 + + .../fixtures/sourcemaps/version-too-high.js | 1 + + .../sourcemaps/version-too-high.js.map | 6 + + .../fixtures/sourcemaps/version-too-low.js | 1 + + .../sourcemaps/version-too-low.js.map | 6 + + .../sdk/fixtures/sourcemaps/version-valid.js | 1 + + .../fixtures/sourcemaps/version-valid.js.map | 6 + + 150 files changed, 2648 insertions(+) + create mode 100644 front_end/core/sdk/SourceMapSpec.test.ts + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/BUILD.gn + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-missing.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-string.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/second-source-original.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-missing.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-missing.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-high.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-low.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-valid.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map + +diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn +index 863a434cea..125b34ba73 100644 +--- a/front_end/BUILD.gn ++++ b/front_end/BUILD.gn +@@ -106,6 +106,7 @@ group("unittests") { + "core/protocol_client:unittests", + "core/root:unittests", + "core/sdk:unittests", ++ "core/sdk/fixtures/sourcemaps", + "entrypoints/formatter_worker:unittests", + "entrypoints/heap_snapshot_worker:unittests", + "entrypoints/inspector_main:unittests", +diff --git a/front_end/core/sdk/BUILD.gn b/front_end/core/sdk/BUILD.gn +index 8d1cf0fa92..f8879365f4 100644 +--- a/front_end/core/sdk/BUILD.gn ++++ b/front_end/core/sdk/BUILD.gn +@@ -165,6 +165,7 @@ ts_library("unittests") { + "SourceMapManager.test.ts", + "SourceMapScopes.test.ts", + "SourceMapScopesInfo.test.ts", ++ "SourceMapSpec.test.ts", + "StorageBucketsModel.test.ts", + "StorageKeyManager.test.ts", + "Target.test.ts", +diff --git a/front_end/core/sdk/SourceMapSpec.test.ts b/front_end/core/sdk/SourceMapSpec.test.ts +new file mode 100644 +index 0000000000..93b26a2e13 +--- /dev/null ++++ b/front_end/core/sdk/SourceMapSpec.test.ts +@@ -0,0 +1,206 @@ ++// Copyright 2024 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. ++ ++ ++/** ++ This file tests if devtools sourcemaps implementation is matching the sourcemaps spec. ++ Sourcemap Spec tests are using test data coming from: https://github.com/tc39/source-map-tests ++ ++ There is a lot of warnings of invalid source maps passing the validation - this is up to the authors ++ which ones of these could be actually checked in the SourceMaps implementetion and which ones are ok to ignore. ++ ++ **/ ++ ++const {assert} = chai; ++import type * as Platform from '../platform/platform.js'; ++import {assertNotNullOrUndefined} from '../platform/platform.js'; ++import { SourceMapV3, parseSourceMap } from './SourceMap.js'; ++import * as SDK from './sdk.js'; ++import {describeWithEnvironment} from '../../testing/EnvironmentHelpers.js'; ++ ++interface TestSpec { ++ name: string; ++ description: string; ++ baseFile: string; ++ sourceMapFile: string; ++ sourceMapIsValid: boolean; ++ testActions?: TestAction[]; ++} ++ ++interface TestAction { ++ actionType: string; ++ generatedLine: number; ++ generatedColumn: number; ++ originalSource: string; ++ originalLine: number; ++ originalColumn: number; ++ mappedName: null | string; ++ intermediateMaps?: string[] ++} ++ ++// Accept "null", null, or undefined for tests specifying a missing value. ++function nullish(arg : any) { ++ if (arg === "null" || arg === undefined) { ++ return null; ++ } ++ return arg; ++} ++ ++describeWithEnvironment('SourceMapSpec', () => { ++ let testCases : TestSpec[] | undefined; ++ let sourceMapContents : SourceMapV3[] = []; ++ ++ before(async () => { ++ testCases = await loadTestCasesFromFixture('source-map-spec-tests.json'); ++ sourceMapContents = await Promise.all( ++ testCases!.map( ++ async (testCase) => { ++ const { sourceMapFile } = testCase; ++ return loadSourceMapFromFixture(sourceMapFile); ++ } ++ ) ++ ); ++ }); ++ ++ it('Spec tests', () => { ++ const consoleErrorSpy = sinon.spy(console, 'error'); ++ testCases!.forEach(({ ++ baseFile, ++ sourceMapFile, ++ testActions, ++ sourceMapIsValid, ++ name ++ }, index) => { ++ const sourceMapContent = sourceMapContents[index]; ++ ++ // These test cases are ignored because certain validity checks are ++ // not implemented, such as checking the version number is `3`. ++ const ignoredCasesForBasicValidity = [ ++ "fileNotAString1", ++ "fileNotAString2", ++ "versionMissing", ++ "versionNotANumber", ++ "versionNumericString", ++ "versionTooHigh", ++ "versionTooLow", ++ "sourcesNotAList1", ++ "sourcesNotAList2", ++ "sourcesNotStringOrNull", ++ // FIXME: this test should be revised after recent spec changes ++ "namesMissing", ++ "namesNotAList1", ++ "namesNotAList2", ++ "namesNotString", ++ "ignoreListWrongType1", ++ "ignoreListWrongType2", ++ "ignoreListOutOfBounds", ++ "indexMapWrongTypeSections", ++ "indexMapWrongTypeMap", ++ "indexMapMissingOffset", ++ "invalidVLQDueToNonBase64Character", ++ ]; ++ ++ // 1) check if an invalid sourcemap throws on SourceMap instance creation, or ++ // 2) check if an invalid sourcemap throws on mapping creation ++ if (!sourceMapIsValid) { ++ if (ignoredCasesForBasicValidity.includes(name)) ++ return; ++ ++ let thrownDuringParse = false; ++ try { ++ const sourceMap = new SDK.SourceMap.SourceMap( ++ baseFile as Platform.DevToolsPath.UrlString, ++ sourceMapFile as Platform.DevToolsPath.UrlString, ++ sourceMapContent); ++ sourceMap.mappings(); ++ } catch { ++ thrownDuringParse = true; ++ } ++ assert.equal( ++ thrownDuringParse || consoleErrorSpy.calledWith("Failed to parse source map"), ++ true, ++ `${name}: expected invalid source map to fail to load` ++ ); ++ ++ return; ++ } ++ ++ // 3) check if a valid sourcemap can be parsed and a SourceMap instance created ++ const baseFileUrl = baseFile as Platform.DevToolsPath.UrlString; ++ const sourceMapFileUrl = sourceMapFile as Platform.DevToolsPath.UrlString; ++ ++ assert.doesNotThrow( ++ () => parseSourceMap(JSON.stringify(sourceMapContent)), ++ undefined, ++ undefined, ++ `${name}: expected valid source map to parse` ++ ); ++ assert.doesNotThrow(() => new SDK.SourceMap.SourceMap( ++ baseFileUrl, ++ sourceMapFileUrl, ++ sourceMapContent ++ ), undefined, undefined, `${name}: expected valid source map to parse`); ++ ++ // 4) check if the mappings are valid ++ const sourceMap = new SDK.SourceMap.SourceMap( ++ baseFileUrl, ++ sourceMapFileUrl, ++ sourceMapContent); ++ ++ assert.doesNotThrow(() => sourceMap.findEntry(1, 1)); ++ ++ if (testActions !== undefined) { ++ testActions.forEach(({ ++ actionType, ++ originalSource, ++ originalLine, ++ originalColumn, ++ generatedLine, ++ generatedColumn, ++ intermediateMaps ++ }) => { ++ ++ if (actionType === "checkMapping" && sourceMapIsValid) { ++ // 4a) check if the mappings are valid for regular sourcemaps ++ // extract to separate function ++ let actual = sourceMap.findEntry(generatedLine, generatedColumn); ++ assertNotNullOrUndefined(actual); ++ ++ assert.strictEqual(nullish(actual.sourceURL), originalSource, 'unexpected source URL'); ++ assert.strictEqual(nullish(actual.sourceLineNumber), originalLine, 'unexpected source line number'); ++ assert.strictEqual(nullish(actual.sourceColumnNumber), originalColumn, 'unexpected source column number'); ++ } ++ }); ++ } ++ }); ++ }); ++}); ++ ++async function loadTestCasesFromFixture(filename: string): Promise { ++ const testSpec = await getFixtureFileContents<{ tests: TestSpec[] }>(filename); ++ return testSpec?.tests ?? []; ++}; ++ ++async function loadSourceMapFromFixture(filename: string): Promise { ++ return getFixtureFileContents(filename); ++}; ++ ++async function getFixtureFileContents(filename: string): ++ Promise { ++ const url = new URL(`/front_end/core/sdk/fixtures/sourcemaps/${filename}`, window.location.origin); ++ ++ const response = await fetch(url); ++ ++ if (response.status !== 200) { ++ throw new Error(`Unable to load ${url}`); ++ } ++ ++ const contentType = response.headers.get('content-type'); ++ const isGzipEncoded = contentType !== null && contentType.includes('gzip'); ++ let buffer = await response.arrayBuffer(); ++ ++ const decoder = new TextDecoder('utf-8'); ++ const contents = JSON.parse(decoder.decode(buffer)) as T; ++ return contents; ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn b/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn +new file mode 100644 +index 0000000000..a82b09a02d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn +@@ -0,0 +1,202 @@ ++# Copyright 2022 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. ++ ++import("../../../../../scripts/build/ninja/copy.gni") ++ ++copy_to_gen("sourcemaps") { ++ sources = [ ++ "basic-mapping-as-index-map.js", ++ "basic-mapping-as-index-map.js.map", ++ "basic-mapping-original.js", ++ "basic-mapping.js", ++ "basic-mapping.js.map", ++ "file-not-a-string-1.js", ++ "file-not-a-string-1.js.map", ++ "file-not-a-string-2.js", ++ "file-not-a-string-2.js.map", ++ "ignore-list-empty.js", ++ "ignore-list-empty.js.map", ++ "ignore-list-out-of-bounds.js", ++ "ignore-list-out-of-bounds.js.map", ++ "ignore-list-valid-1.js", ++ "ignore-list-valid-1.js.map", ++ "ignore-list-wrong-type-1.js", ++ "ignore-list-wrong-type-1.js.map", ++ "ignore-list-wrong-type-2.js", ++ "ignore-list-wrong-type-2.js.map", ++ "ignore-list-wrong-type-3.js", ++ "ignore-list-wrong-type-3.js.map", ++ "index-map-empty-sections.js", ++ "index-map-empty-sections.js.map", ++ "index-map-file-wrong-type-1.js", ++ "index-map-file-wrong-type-1.js.map", ++ "index-map-file-wrong-type-2.js", ++ "index-map-file-wrong-type-2.js.map", ++ "index-map-invalid-base-mappings.js", ++ "index-map-invalid-base-mappings.js.map", ++ "index-map-invalid-order.js", ++ "index-map-invalid-order.js.map", ++ "index-map-invalid-overlap.js", ++ "index-map-invalid-overlap.js.map", ++ "index-map-invalid-sub-map.js", ++ "index-map-invalid-sub-map.js.map", ++ "index-map-missing-file.js", ++ "index-map-missing-file.js.map", ++ "index-map-missing-map.js", ++ "index-map-missing-map.js.map", ++ "index-map-missing-offset-column.js", ++ "index-map-missing-offset-column.js.map", ++ "index-map-missing-offset-line.js", ++ "index-map-missing-offset-line.js.map", ++ "index-map-missing-offset.js", ++ "index-map-missing-offset.js.map", ++ "index-map-offset-column-wrong-type.js", ++ "index-map-offset-column-wrong-type.js.map", ++ "index-map-offset-line-wrong-type.js", ++ "index-map-offset-line-wrong-type.js.map", ++ "index-map-two-concatenated-sources.js", ++ "index-map-two-concatenated-sources.js.map", ++ "index-map-wrong-type-map.js", ++ "index-map-wrong-type-map.js.map", ++ "index-map-wrong-type-offset.js", ++ "index-map-wrong-type-offset.js.map", ++ "index-map-wrong-type-sections.js", ++ "index-map-wrong-type-sections.js.map", ++ "invalid-mapping-bad-separator.js", ++ "invalid-mapping-bad-separator.js.map", ++ "invalid-mapping-not-a-string-1.js", ++ "invalid-mapping-not-a-string-1.js.map", ++ "invalid-mapping-not-a-string-2.js", ++ "invalid-mapping-not-a-string-2.js.map", ++ "invalid-mapping-segment-column-too-large.js", ++ "invalid-mapping-segment-column-too-large.js.map", ++ "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "invalid-mapping-segment-name-index-out-of-bounds.js.map", ++ "invalid-mapping-segment-name-index-too-large.js", ++ "invalid-mapping-segment-name-index-too-large.js.map", ++ "invalid-mapping-segment-negative-column.js", ++ "invalid-mapping-segment-negative-column.js.map", ++ "invalid-mapping-segment-negative-name-index.js", ++ "invalid-mapping-segment-negative-name-index.js.map", ++ "invalid-mapping-segment-negative-original-column.js", ++ "invalid-mapping-segment-negative-original-column.js.map", ++ "invalid-mapping-segment-negative-original-line.js", ++ "invalid-mapping-segment-negative-original-line.js.map", ++ "invalid-mapping-segment-negative-relative-column.js", ++ "invalid-mapping-segment-negative-relative-column.js.map", ++ "invalid-mapping-segment-negative-relative-name-index.js", ++ "invalid-mapping-segment-negative-relative-name-index.js.map", ++ "invalid-mapping-segment-negative-relative-original-column.js", ++ "invalid-mapping-segment-negative-relative-original-column.js.map", ++ "invalid-mapping-segment-negative-relative-original-line.js", ++ "invalid-mapping-segment-negative-relative-original-line.js.map", ++ "invalid-mapping-segment-negative-relative-source-index.js", ++ "invalid-mapping-segment-negative-relative-source-index.js.map", ++ "invalid-mapping-segment-negative-source-index.js", ++ "invalid-mapping-segment-negative-source-index.js.map", ++ "invalid-mapping-segment-original-column-too-large.js", ++ "invalid-mapping-segment-original-column-too-large.js.map", ++ "invalid-mapping-segment-original-line-too-large.js", ++ "invalid-mapping-segment-original-line-too-large.js.map", ++ "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "invalid-mapping-segment-source-index-out-of-bounds.js.map", ++ "invalid-mapping-segment-source-index-too-large.js", ++ "invalid-mapping-segment-source-index-too-large.js.map", ++ "invalid-mapping-segment-with-three-fields.js", ++ "invalid-mapping-segment-with-three-fields.js.map", ++ "invalid-mapping-segment-with-two-fields.js", ++ "invalid-mapping-segment-with-two-fields.js.map", ++ "invalid-mapping-segment-with-zero-fields.js", ++ "invalid-mapping-segment-with-zero-fields.js.map", ++ "invalid-vlq-missing-continuation.js", ++ "invalid-vlq-missing-continuation.js.map", ++ "invalid-vlq-non-base64-char.js", ++ "invalid-vlq-non-base64-char.js.map", ++ "mapping-semantics-column-reset.js", ++ "mapping-semantics-column-reset.js.map", ++ "mapping-semantics-five-field-segment.js", ++ "mapping-semantics-five-field-segment.js.map", ++ "mapping-semantics-four-field-segment.js", ++ "mapping-semantics-four-field-segment.js.map", ++ "mapping-semantics-relative-1.js", ++ "mapping-semantics-relative-1.js.map", ++ "mapping-semantics-relative-2.js", ++ "mapping-semantics-relative-2.js.map", ++ "mapping-semantics-single-field-segment.js", ++ "mapping-semantics-single-field-segment.js.map", ++ "names-missing.js", ++ "names-missing.js.map", ++ "names-not-a-list-1.js", ++ "names-not-a-list-1.js.map", ++ "names-not-a-list-2.js", ++ "names-not-a-list-2.js.map", ++ "names-not-string.js", ++ "names-not-string.js.map", ++ "second-source-original.js", ++ "source-map-spec-tests.json", ++ "source-resolution-absolute-url.js", ++ "source-resolution-absolute-url.js.map", ++ "source-resolution-relative-url.js", ++ "source-resolution-relative-url.js.map", ++ "source-root-not-a-string-1.js", ++ "source-root-not-a-string-1.js.map", ++ "source-root-not-a-string-2.js", ++ "source-root-not-a-string-2.js.map", ++ "source-root-resolution.js", ++ "source-root-resolution.js.map", ++ "sources-and-sources-content-both-null.js", ++ "sources-and-sources-content-both-null.js.map", ++ "sources-missing.js", ++ "sources-missing.js.map", ++ "sources-non-null-sources-content-null.js", ++ "sources-non-null-sources-content-null.js.map", ++ "sources-not-a-list-1.js", ++ "sources-not-a-list-1.js.map", ++ "sources-not-a-list-2.js", ++ "sources-not-a-list-2.js.map", ++ "sources-not-string-or-null.js", ++ "sources-not-string-or-null.js.map", ++ "sources-null-sources-content-non-null.js", ++ "sources-null-sources-content-non-null.js.map", ++ "transitive-mapping-original.js", ++ "transitive-mapping-original.js.map", ++ "transitive-mapping-three-steps.js", ++ "transitive-mapping-three-steps.js.map", ++ "transitive-mapping.js", ++ "transitive-mapping.js.map", ++ "typescript-original.ts", ++ "unrecognized-property.js", ++ "unrecognized-property.js.map", ++ "valid-mapping-boundary-values.js", ++ "valid-mapping-boundary-values.js.map", ++ "valid-mapping-empty-groups.js", ++ "valid-mapping-empty-groups.js.map", ++ "valid-mapping-empty-string.js", ++ "valid-mapping-empty-string.js.map", ++ "valid-mapping-large-vlq.js", ++ "valid-mapping-large-vlq.js.map", ++ "valid-mapping-null-sources.js", ++ "valid-mapping-null-sources.js.map", ++ "version-missing.js", ++ "version-missing.js.map", ++ "version-not-a-number.js", ++ "version-not-a-number.js.map", ++ "version-numeric-string.js", ++ "version-numeric-string.js.map", ++ "version-too-high.js", ++ "version-too-high.js.map", ++ "version-too-low.js", ++ "version-too-low.js.map", ++ "version-valid.js", ++ "version-valid.js.map", ++ "vlq-valid-continuation-bit-present-1.js", ++ "vlq-valid-continuation-bit-present-1.js.map", ++ "vlq-valid-continuation-bit-present-2.js", ++ "vlq-valid-continuation-bit-present-2.js.map", ++ "vlq-valid-negative-digit.js", ++ "vlq-valid-negative-digit.js.map", ++ "vlq-valid-single-digit.js", ++ "vlq-valid-single-digit.js.map", ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js +new file mode 100644 +index 0000000000..b9fae38043 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=basic-mapping-as-index-map.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map +new file mode 100644 +index 0000000000..c0ad870ed2 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "file": "basic-mapping-as-index-map.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js +new file mode 100644 +index 0000000000..301b186cb1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js +@@ -0,0 +1,8 @@ ++function foo() { ++ return 42; ++} ++function bar() { ++ return 24; ++} ++foo(); ++bar(); +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js +new file mode 100644 +index 0000000000..2e479a4175 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=basic-mapping.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map +new file mode 100644 +index 0000000000..12dc9679a4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version":3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js +new file mode 100644 +index 0000000000..385a5c3501 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-empty.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map +new file mode 100644 +index 0000000000..7297863a9b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js +new file mode 100644 +index 0000000000..7a0fbb8833 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-out-of-bounds.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map +new file mode 100644 +index 0000000000..fb2566bb41 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [1] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js +new file mode 100644 +index 0000000000..ea64a5565a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-valid-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map +new file mode 100644 +index 0000000000..98eebdf7f6 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [0] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js +new file mode 100644 +index 0000000000..8b40bd3847 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map +new file mode 100644 +index 0000000000..688740aba8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": ["not a number"] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js +new file mode 100644 +index 0000000000..35c7791164 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-2.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map +new file mode 100644 +index 0000000000..ca1d30de2d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": ["0"] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js +new file mode 100644 +index 0000000000..8735d41758 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-3.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map +new file mode 100644 +index 0000000000..1ac167d56c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": 0 ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js +new file mode 100644 +index 0000000000..e90bef083c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-base-mappings.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map +new file mode 100644 +index 0000000000..b489c1f080 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "mappings": "AAAA", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js +new file mode 100644 +index 0000000000..263fa3c6e0 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-order.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map +new file mode 100644 +index 0000000000..82da69df72 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map +@@ -0,0 +1,23 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 1, "column": 4 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js +new file mode 100644 +index 0000000000..9aff8dc620 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-overlap.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map +new file mode 100644 +index 0000000000..8d42546fd8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map +@@ -0,0 +1,23 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js +new file mode 100644 +index 0000000000..86c8e9a253 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-map.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map +new file mode 100644 +index 0000000000..3bce47e852 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js +new file mode 100644 +index 0000000000..fe6917403f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map +new file mode 100644 +index 0000000000..aa48bbb993 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js +new file mode 100644 +index 0000000000..ba8614e412 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset-line.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map +new file mode 100644 +index 0000000000..3d60444ea7 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js +new file mode 100644 +index 0000000000..9ca2cf3fb5 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map +new file mode 100644 +index 0000000000..7285138bf5 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map +@@ -0,0 +1,13 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js +new file mode 100644 +index 0000000000..ed1e9ec5d5 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-offset-column-wrong-type.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map +new file mode 100644 +index 0000000000..b43e79a9dd +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": true }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js +new file mode 100644 +index 0000000000..d58f2aff99 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-offset-line-wrong-type.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map +new file mode 100644 +index 0000000000..81dbcd6ec4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": true, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js +new file mode 100644 +index 0000000000..b8702d7187 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar();function baz(){return"baz"}baz(); ++//# sourceMappingURL=index-map-two-concatenated-sources.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map +new file mode 100644 +index 0000000000..f67f5de3c5 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map +@@ -0,0 +1,24 @@ ++{ ++ "version": 3, ++ "file": "index-map-two-concatenated-sources.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 62 }, ++ "map": { ++ "version": 3, ++ "names": ["baz"], ++ "sources": ["second-source-original.js"], ++ "mappings":"AAAA,SAASA,MACP,MAAO,KACT,CACAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js +new file mode 100644 +index 0000000000..d31d6d6358 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-map.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map +new file mode 100644 +index 0000000000..0963f623d7 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map +@@ -0,0 +1,9 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": "not a map" ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js +new file mode 100644 +index 0000000000..048e1246f8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-offset.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map +new file mode 100644 +index 0000000000..fbc6e4e678 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": "not an offset", ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js +new file mode 100644 +index 0000000000..011eca806e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-sections.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map +new file mode 100644 +index 0000000000..dbfb4ead30 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map +@@ -0,0 +1,4 @@ ++{ ++ "version": 3, ++ "sections": "not a sections list" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js +new file mode 100644 +index 0000000000..25338aca30 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-bad-separator.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map +new file mode 100644 +index 0000000000..5f4f5b9233 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA.SAASA:MACP" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js +new file mode 100644 +index 0000000000..cb38e2fe9d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map +new file mode 100644 +index 0000000000..5bf3e2a9d8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-not-a-string-1.js", ++ "sources": ["empty-original.js"], ++ "mappings": 5 ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js +new file mode 100644 +index 0000000000..3d84abd6c6 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map +new file mode 100644 +index 0000000000..4527e7f764 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-not-a-string-2.js", ++ "sources": ["empty-original.js"], ++ "mappings": [1, 2, 3, 4] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js +new file mode 100644 +index 0000000000..55591f874b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map +new file mode 100644 +index 0000000000..b4c059e015 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-column-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "ggggggE" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js +new file mode 100644 +index 0000000000..2a6b434eff +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map +new file mode 100644 +index 0000000000..8dd2ea6c2d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "file": "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAC" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js +new file mode 100644 +index 0000000000..709e34dbd3 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map +new file mode 100644 +index 0000000000..c7bf5b98d1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-name-index-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAggggggE" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js +new file mode 100644 +index 0000000000..a202152d6f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map +new file mode 100644 +index 0000000000..403878bfa4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-column.js", ++ "sources": ["empty-original.js"], ++ "mappings": "F" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js +new file mode 100644 +index 0000000000..3e3f634204 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map +new file mode 100644 +index 0000000000..b94f63646e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-name-index.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAF" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js +new file mode 100644 +index 0000000000..f21d5342b3 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map +new file mode 100644 +index 0000000000..011c639d3f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-original-column.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAF" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js +new file mode 100644 +index 0000000000..b37309601c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map +new file mode 100644 +index 0000000000..e7ec993eeb +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-original-line.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAFA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js +new file mode 100644 +index 0000000000..94b835d687 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map +new file mode 100644 +index 0000000000..414884072b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-column.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "C,F" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js +new file mode 100644 +index 0000000000..c965c5f011 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-name-index.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map +new file mode 100644 +index 0000000000..1fbbcfcd32 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-name-index.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AAAAC,AAAAF" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js +new file mode 100644 +index 0000000000..493a6ec88a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map +new file mode 100644 +index 0000000000..7e62895651 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-original-column.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AAAC,AAAF" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js +new file mode 100644 +index 0000000000..ca8329fb98 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-line.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map +new file mode 100644 +index 0000000000..86b0fb3a04 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-original-line.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AACA,AAFA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js +new file mode 100644 +index 0000000000..fa92225b09 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-source-index.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map +new file mode 100644 +index 0000000000..2efeb047db +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-source-index.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "ACAA,AFAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js +new file mode 100644 +index 0000000000..6e05849b6a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map +new file mode 100644 +index 0000000000..596c2f298b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-source-index.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AFAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js +new file mode 100644 +index 0000000000..0936ed7ea8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map +new file mode 100644 +index 0000000000..ff2103fe24 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-original-column-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAggggggE" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js +new file mode 100644 +index 0000000000..9b3aa5a361 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map +new file mode 100644 +index 0000000000..890f1c71fc +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-original-line-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAggggggEA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js +new file mode 100644 +index 0000000000..2e5fbca268 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map +new file mode 100644 +index 0000000000..86dedb114f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "sources": ["empty-original.js"], ++ "mappings": "ACAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js +new file mode 100644 +index 0000000000..3f4943e127 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map +new file mode 100644 +index 0000000000..e9f858c6e1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-source-index-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AggggggEAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js +new file mode 100644 +index 0000000000..4b868fac9c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map +new file mode 100644 +index 0000000000..c2af1165ad +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js +new file mode 100644 +index 0000000000..96045a7a11 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map +new file mode 100644 +index 0000000000..73cf00fa1c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js +new file mode 100644 +index 0000000000..9d5332a56c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map +new file mode 100644 +index 0000000000..5a34d25b64 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-with-zero-fields.js", ++ "sources": ["empty-original.js"], ++ "mappings": ",,,," ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js +new file mode 100644 +index 0000000000..2c2a0090ac +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-vlq-missing-continuation.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map +new file mode 100644 +index 0000000000..dd0e363ff4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "g" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js +new file mode 100644 +index 0000000000..d1b20b41a2 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-vlq-non-base64-char.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map +new file mode 100644 +index 0000000000..4fa1ac5768 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "A$%?!" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-missing.js b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js +new file mode 100644 +index 0000000000..58781fd887 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-missing.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map +new file mode 100644 +index 0000000000..82170bf784 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js +new file mode 100644 +index 0000000000..dc65f1972b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-a-list-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map +new file mode 100644 +index 0000000000..fe1edaeb96 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": "not a list", ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js +new file mode 100644 +index 0000000000..d7251f78da +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-a-list-2.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map +new file mode 100644 +index 0000000000..3388d2bb71 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": { "foo": 3 }, ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js +new file mode 100644 +index 0000000000..8dc7b4811a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-string.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map +new file mode 100644 +index 0000000000..c0feb0739a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": [null, 3, true, false, {}, []], ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js b/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js +new file mode 100644 +index 0000000000..c339bc9d15 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js +@@ -0,0 +1,4 @@ ++function baz() { ++ return "baz"; ++} ++baz(); +diff --git a/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json b/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json +new file mode 100644 +index 0000000000..0f7a3c1cb1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json +@@ -0,0 +1,1540 @@ ++{ ++ "tests": [ ++ { ++ "name": "versionValid", ++ "description": "Test a simple source map with a valid version number", ++ "baseFile": "version-valid.js", ++ "sourceMapFile": "version-valid.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "versionMissing", ++ "description": "Test a source map that is missing a version field", ++ "baseFile": "version-missing.js", ++ "sourceMapFile": "version-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionNotANumber", ++ "description": "Test a source map with a version field that is not a number", ++ "baseFile": "version-not-a-number.js", ++ "sourceMapFile": "version-not-a-number.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionNumericString", ++ "description": "Test a source map with a version field that is a number as a string", ++ "baseFile": "version-numeric-string.js", ++ "sourceMapFile": "version-numeric-string.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionTooHigh", ++ "description": "Test a source map with an integer version field that is too high", ++ "baseFile": "version-too-high.js", ++ "sourceMapFile": "version-too-high.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionTooLow", ++ "description": "Test a source map with an integer version field that is too low", ++ "baseFile": "version-too-low.js", ++ "sourceMapFile": "version-too-low.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesMissing", ++ "description": "Test a source map that is missing a necessary sources field", ++ "baseFile": "sources-missing.js", ++ "sourceMapFile": "sources-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotAList1", ++ "description": "Test a source map with a sources field that is not a valid list (string)", ++ "baseFile": "sources-not-a-list-1.js", ++ "sourceMapFile": "sources-not-a-list-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotAList2", ++ "description": "Test a source map with a sources field that is not a valid list (object)", ++ "baseFile": "sources-not-a-list-2.js", ++ "sourceMapFile": "sources-not-a-list-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotStringOrNull", ++ "description": "Test a source map with a sources list that has non-string and non-null items", ++ "baseFile": "sources-not-string-or-null.js", ++ "sourceMapFile": "sources-not-string-or-null.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesAndSourcesContentBothNull", ++ "description": "Test a source map that has both null sources and sourcesContent entries", ++ "baseFile": "sources-and-sources-content-both-null.js", ++ "sourceMapFile": "sources-and-sources-content-both-null.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "fileNotAString1", ++ "description": "Test a source map with a file field that is not a valid string", ++ "baseFile": "file-not-a-string-1.js", ++ "sourceMapFile": "file-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "fileNotAString2", ++ "description": "Test a source map with a file field that is not a valid string", ++ "baseFile": "file-not-a-string-2.js", ++ "sourceMapFile": "file-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourceRootNotAString1", ++ "description": "Test a source map with a sourceRoot field that is not a valid string", ++ "baseFile": "source-root-not-a-string-1.js", ++ "sourceMapFile": "source-root-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourceRootNotAString2", ++ "description": "Test a source map with a sourceRoot field that is not a valid string", ++ "baseFile": "source-root-not-a-string-2.js", ++ "sourceMapFile": "source-root-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesMissing", ++ "description": "Test a source map that is missing a necessary names field", ++ "baseFile": "names-missing.js", ++ "sourceMapFile": "names-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotAList1", ++ "description": "Test a source map with a names field that is not a valid list (string)", ++ "baseFile": "names-not-a-list-1.js", ++ "sourceMapFile": "names-not-a-list-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotAList2", ++ "description": "Test a source map with a names field that is not a valid list (object)", ++ "baseFile": "names-not-a-list-2.js", ++ "sourceMapFile": "names-not-a-list-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotString", ++ "description": "Test a source map with a names list that has non-string items", ++ "baseFile": "names-not-string.js", ++ "sourceMapFile": "names-not-string.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListEmpty", ++ "description": "Test a source map with an ignore list that has no items", ++ "baseFile": "ignore-list-empty.js", ++ "sourceMapFile": "ignore-list-empty.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "ignoreListValid1", ++ "description": "Test a source map with a simple valid ignore list", ++ "baseFile": "ignore-list-valid-1.js", ++ "sourceMapFile": "ignore-list-valid-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkIgnoreList", ++ "present": ["empty-original.js"] ++ } ++ ] ++ }, ++ { ++ "name": "ignoreListWrongType1", ++ "description": "Test a source map with an ignore list with the wrong type of items", ++ "baseFile": "ignore-list-wrong-type-1.js", ++ "sourceMapFile": "ignore-list-wrong-type-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType2", ++ "description": "Test a source map with an ignore list with the wrong type of items", ++ "baseFile": "ignore-list-wrong-type-2.js", ++ "sourceMapFile": "ignore-list-wrong-type-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType3", ++ "description": "Test a source map with an ignore list that is not a list", ++ "baseFile": "ignore-list-wrong-type-3.js", ++ "sourceMapFile": "ignore-list-wrong-type-3.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListOutOfBounds", ++ "description": "Test a source map with an ignore list with an item with an out-of-bounds index", ++ "baseFile": "ignore-list-out-of-bounds.js", ++ "sourceMapFile": "ignore-list-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "unrecognizedProperty", ++ "description": "Test a source map that has an extra field not explicitly encoded in the spec", ++ "baseFile": "unrecognized-property.js", ++ "sourceMapFile": "unrecognized-property.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "invalidVLQDueToNonBase64Character", ++ "description": "Test a source map that has a mapping with an invalid non-base64 character", ++ "baseFile": "invalid-vlq-non-base64-char.js", ++ "sourceMapFile": "invalid-vlq-non-base64-char.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidVLQDueToMissingContinuationDigits", ++ "description": "Test a source map that has a mapping with an invalid VLQ that has a continuation bit but no continuing digits", ++ "baseFile": "invalid-vlq-missing-continuation.js", ++ "sourceMapFile": "invalid-vlq-missing-continuation.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingNotAString1", ++ "description": "Test a source map that has an invalid mapping that is not a string (number)", ++ "baseFile": "invalid-mapping-not-a-string-1.js", ++ "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingNotAString2", ++ "description": "Test a source map that has an invalid mapping that is not a string (array)", ++ "baseFile": "invalid-mapping-not-a-string-2.js", ++ "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentBadSeparator", ++ "description": "Test a source map that uses separator characters not recognized in the spec", ++ "baseFile": "invalid-mapping-bad-separator.js", ++ "sourceMapFile": "invalid-mapping-bad-separator.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithZeroFields", ++ "description": "Test a source map that has the wrong number (zero) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-zero-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithTwoFields", ++ "description": "Test a source map that has the wrong number (two) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-two-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithThreeFields", ++ "description": "Test a source map that has the wrong number (three) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-three-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", ++ "description": "Test a source map that has a source index field that is out of bounds of the sources field", ++ "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNameIndexOutOfBounds", ++ "description": "Test a source map that has a name index field that is out of bounds of the names field", ++ "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeColumn", ++ "description": "Test a source map that has an invalid negative non-relative column field", ++ "baseFile": "invalid-mapping-segment-negative-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeSourceIndex", ++ "description": "Test a source map that has an invalid negative non-relative source index field", ++ "baseFile": "invalid-mapping-segment-negative-source-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeOriginalLine", ++ "description": "Test a source map that has an invalid negative non-relative original line field", ++ "baseFile": "invalid-mapping-segment-negative-original-line.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeOriginalColumn", ++ "description": "Test a source map that has an invalid negative non-relative original column field", ++ "baseFile": "invalid-mapping-segment-negative-original-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeNameIndex", ++ "description": "Test a source map that has an invalid negative non-relative name index field", ++ "baseFile": "invalid-mapping-segment-negative-name-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeColumn", ++ "description": "Test a source map that has an invalid negative relative column field", ++ "baseFile": "invalid-mapping-segment-negative-relative-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeSourceIndex", ++ "description": "Test a source map that has an invalid negative relative source index field", ++ "baseFile": "invalid-mapping-segment-negative-relative-source-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-source-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalLine", ++ "description": "Test a source map that has an invalid negative relative original line field", ++ "baseFile": "invalid-mapping-segment-negative-relative-original-line.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalColumn", ++ "description": "Test a source map that has an invalid negative relative original column field", ++ "baseFile": "invalid-mapping-segment-negative-relative-original-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeNameIndex", ++ "description": "Test a source map that has an invalid negative relative name index field", ++ "baseFile": "invalid-mapping-segment-negative-relative-name-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-name-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithColumnExceeding32Bits", ++ "description": "Test a source map that has a column field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-column-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", ++ "description": "Test a source map that has a source index field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-source-index-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", ++ "description": "Test a source map that has a original line field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-original-line-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", ++ "description": "Test a source map that has an original column field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-original-column-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", ++ "description": "Test a source map that has a name index field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-name-index-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "validMappingFieldsWith32BitMaxValues", ++ "description": "Test a source map that has segment fields with max values representable in 32 bits", ++ "baseFile": "valid-mapping-boundary-values.js", ++ "sourceMapFile": "valid-mapping-boundary-values.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingLargeVLQ", ++ "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", ++ "baseFile": "valid-mapping-large-vlq.js", ++ "sourceMapFile": "valid-mapping-large-vlq.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingEmptyGroups", ++ "description": "Test a source map with a mapping that has many empty groups", ++ "baseFile": "valid-mapping-empty-groups.js", ++ "sourceMapFile": "valid-mapping-empty-groups.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingEmptyString", ++ "description": "Test a source map with an empty string mapping", ++ "baseFile": "valid-mapping-empty-string.js", ++ "sourceMapFile": "valid-mapping-empty-string.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "indexMapWrongTypeSections", ++ "description": "Test an index map with a sections field with the wrong type", ++ "baseFile": "index-map-wrong-type-sections.js", ++ "sourceMapFile": "index-map-wrong-type-sections.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapWrongTypeOffset", ++ "description": "Test an index map with an offset field with the wrong type", ++ "baseFile": "index-map-wrong-type-offset.js", ++ "sourceMapFile": "index-map-wrong-type-offset.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapWrongTypeMap", ++ "description": "Test an index map with a map field with the wrong type", ++ "baseFile": "index-map-wrong-type-map.js", ++ "sourceMapFile": "index-map-wrong-type-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidBaseMappings", ++ "description": "Test that an index map cannot also have a regular mappings field", ++ "baseFile": "index-map-invalid-base-mappings.js", ++ "sourceMapFile": "index-map-invalid-base-mappings.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidOverlap", ++ "description": "Test that an invalid index map with multiple sections that overlap", ++ "baseFile": "index-map-invalid-overlap.js", ++ "sourceMapFile": "index-map-invalid-overlap.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidOrder", ++ "description": "Test that an invalid index map with multiple sections in the wrong order", ++ "baseFile": "index-map-invalid-order.js", ++ "sourceMapFile": "index-map-invalid-order.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingMap", ++ "description": "Test that an index map that is missing a section map", ++ "baseFile": "index-map-missing-map.js", ++ "sourceMapFile": "index-map-missing-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidSubMap", ++ "description": "Test that an index map that has an invalid section map", ++ "baseFile": "index-map-invalid-sub-map.js", ++ "sourceMapFile": "index-map-invalid-sub-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffset", ++ "description": "Test that an index map that is missing a section offset", ++ "baseFile": "index-map-missing-offset.js", ++ "sourceMapFile": "index-map-missing-offset.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffsetLine", ++ "description": "Test that an index map that is missing a section offset's line field", ++ "baseFile": "index-map-missing-offset-line.js", ++ "sourceMapFile": "index-map-missing-offset-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffsetColumn", ++ "description": "Test that an index map that is missing a section offset's column field", ++ "baseFile": "index-map-missing-offset-column.js", ++ "sourceMapFile": "index-map-missing-offset-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapOffsetLineWrongType", ++ "description": "Test that an index map that has an offset line field with the wrong type of value", ++ "baseFile": "index-map-offset-line-wrong-type.js", ++ "sourceMapFile": "index-map-offset-line-wrong-type.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapOffsetColumnWrongType", ++ "description": "Test that an index map that has an offset column field with the wrong type of value", ++ "baseFile": "index-map-offset-column-wrong-type.js", ++ "sourceMapFile": "index-map-offset-column-wrong-type.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapEmptySections", ++ "description": "Test a trivial index map with no sections", ++ "baseFile": "index-map-empty-sections.js", ++ "sourceMapFile": "index-map-empty-sections.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "indexMapFileWrongType1", ++ "description": "Test an index map with a file field with the wrong type", ++ "baseFile": "index-map-file-wrong-type-1.js", ++ "sourceMapFile": "index-map-file-wrong-type-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapFileWrongType2", ++ "description": "Test an index map with a file field with the wrong type", ++ "baseFile": "index-map-file-wrong-type-2.js", ++ "sourceMapFile": "index-map-file-wrong-type-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "basicMapping", ++ "description": "Test a simple source map that has several valid mappings", ++ "baseFile": "basic-mapping.js", ++ "sourceMapFile": "basic-mapping.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "sourceRootResolution", ++ "description": "Similar to basic mapping test, but test resoultion of sources with a sourceRoot field", ++ "baseFile": "source-root-resolution.js", ++ "sourceMapFile": "source-root-resolution.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "theroot/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "theroot/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "sourceResolutionAbsoluteURL", ++ "description": "Test resoultion of sources with absolute URLs", ++ "baseFile": "source-resolution-absolute-url.js", ++ "sourceMapFile": "source-resolution-absolute-url.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "/baz/quux/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "/baz/quux/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "basicMappingWithIndexMap", ++ "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", ++ "baseFile": "basic-mapping-as-index-map.js", ++ "sourceMapFile": "basic-mapping-as-index-map.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "indexMapWithMissingFile", ++ "description": "Same as the basic mapping index map test but without the optional file field", ++ "baseFile": "index-map-missing-file.js", ++ "sourceMapFile": "index-map-missing-file.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "indexMapWithTwoConcatenatedSources", ++ "description": "Test an index map that has two sub-maps for concatenated sources", ++ "baseFile": "index-map-two-concatenated-sources.js", ++ "sourceMapFile": "index-map-two-concatenated-sources.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 62, ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 71, ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "baz" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 77, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 83, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 88, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 89, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": "baz" ++ } ++ ] ++ }, ++ { ++ "name": "sourcesNullSourcesContentNonNull", ++ "description": "Test a source map that has a null source but has a sourcesContent", ++ "baseFile": "sources-null-sources-content-non-null.js", ++ "sourceMapFile": "sources-null-sources-content-non-null.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": null, ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": null, ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "sourcesNonNullSourcesContentNull", ++ "description": "Test a source map that has a non-null source but has a null sourcesContent", ++ "baseFile": "sources-non-null-sources-content-null.js", ++ "sourceMapFile": "sources-non-null-sources-content-null.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "transitiveMapping", ++ "description": "Test a simple two-stage transitive mapping from a minified JS to a TypeScript source", ++ "baseFile": "transitive-mapping.js", ++ "sourceMapFile": "transitive-mapping.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 13, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 13, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 16, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 23, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 29, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "transitiveMappingWithThreeSteps", ++ "description": "Test a three-stage transitive mapping from an un-minified JS to minified JS to a TypeScript source", ++ "baseFile": "transitive-mapping-three-steps.js", ++ "sourceMapFile": "transitive-mapping-three-steps.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 13, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 13, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 1, ++ "generatedColumn": 4, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 1, ++ "generatedColumn": 11, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 2, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 4, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 4, ++ "generatedColumn": 4, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidSingleDigit", ++ "description": "Test VLQ decoding for a single digit, no continuation VLQ", ++ "baseFile": "vlq-valid-single-digit.js", ++ "sourceMapFile": "vlq-valid-single-digit.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-single-digit-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidNegativeDigit", ++ "description": "Test VLQ decoding where there's a negative digit, no continuation bit", ++ "baseFile": "vlq-valid-negative-digit.js", ++ "sourceMapFile": "vlq-valid-negative-digit.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-negative-digit-original.js", ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 2, ++ "originalSource": "vlq-valid-negative-digit-original.js", ++ "originalLine": 1, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidContinuationBitPresent1", ++ "description": "Test VLQ decoding where continuation bits are present (continuations are leading zero)", ++ "baseFile": "vlq-valid-continuation-bit-present-1.js", ++ "sourceMapFile": "vlq-valid-continuation-bit-present-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-continuation-bit-present-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidContinuationBitPresent2", ++ "description": "Test VLQ decoding where continuation bits are present (continuations have non-zero bits)", ++ "baseFile": "vlq-valid-continuation-bit-present-2.js", ++ "sourceMapFile": "vlq-valid-continuation-bit-present-2.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 16, ++ "originalSource": "vlq-valid-continuation-bit-present-2-original.js", ++ "originalLine": 1, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsSingleFieldSegment", ++ "description": "Test mapping semantics for a single field segment mapping", ++ "baseFile": "mapping-semantics-single-field-segment.js", ++ "sourceMapFile": "mapping-semantics-single-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "mapping-semantics-single-field-segment-original.js", ++ "originalLine": 0, ++ "originalColumn": 1, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 2, ++ "originalSource": null, ++ "originalLine": null, ++ "originalColumn": null, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsFourFieldSegment", ++ "description": "Test mapping semantics for a four field segment mapping", ++ "baseFile": "mapping-semantics-four-field-segment.js", ++ "sourceMapFile": "mapping-semantics-four-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-four-field-segment-original.js", ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsFiveFieldSegment", ++ "description": "Test mapping semantics for a five field segment mapping", ++ "baseFile": "mapping-semantics-five-field-segment.js", ++ "sourceMapFile": "mapping-semantics-five-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-five-field-segment-original.js", ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsColumnReset", ++ "description": "Test that the generated column field resets to zero on new lines", ++ "baseFile": "mapping-semantics-column-reset.js", ++ "sourceMapFile": "mapping-semantics-column-reset.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-column-reset-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 1, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-column-reset-original.js", ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsRelative1", ++ "description": "Test that fields are calculated relative to previous ones", ++ "baseFile": "mapping-semantics-relative-1.js", ++ "sourceMapFile": "mapping-semantics-relative-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-relative-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 5, ++ "originalSource": "mapping-semantics-relative-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsRelative2", ++ "description": "Test that fields are calculated relative to previous ones, across lines", ++ "baseFile": "mapping-semantics-relative-2.js", ++ "sourceMapFile": "mapping-semantics-relative-2.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-relative-2-original.js", ++ "originalLine": 0, ++ "originalColumn": 2, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 1, ++ "generatedColumn": 2, ++ "originalSource": "mapping-semantics-relative-2-original.js", ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": "bar" ++ } ++ ] ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js +new file mode 100644 +index 0000000000..9263eba549 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-and-sources-content-both-null.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map +new file mode 100644 +index 0000000000..09a7c1f369 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": [null], ++ "sourcesContent": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js +new file mode 100644 +index 0000000000..779b865e27 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-missing.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map +new file mode 100644 +index 0000000000..92aff4fb0e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "version" : 3, ++ "names": ["foo"], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js +new file mode 100644 +index 0000000000..939b568ba1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=sources-non-null-sources-content-null.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map +new file mode 100644 +index 0000000000..e573906b2d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": ["basic-mapping-original.js"], ++ "sourcesContent": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js +new file mode 100644 +index 0000000000..7e33b7e867 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-a-list-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map +new file mode 100644 +index 0000000000..26330517b9 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": "not a list", ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js +new file mode 100644 +index 0000000000..4021f763fc +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-a-list-2.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map +new file mode 100644 +index 0000000000..2ed85962fd +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": { "source.js": 3 }, ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js +new file mode 100644 +index 0000000000..7dca97a1da +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-string-or-null.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map +new file mode 100644 +index 0000000000..db25561966 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [3, {}, true, false, []], ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js +new file mode 100644 +index 0000000000..a760594ee9 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=sources-null-sources-content-non-null.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map +new file mode 100644 +index 0000000000..43af03903f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version":3, ++ "names": ["foo"], ++ "sources": [null], ++ "sourcesContent": ["function foo()\n{ return 42; }\nfunction bar()\n { return 24; }\nfoo();\nbar();"], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js +new file mode 100644 +index 0000000000..0a96699d6e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js +@@ -0,0 +1,5 @@ ++function foo(x) { ++ return x; ++} ++foo("foo"); ++//# sourceMappingURL=transitive-mapping-original.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map +new file mode 100644 +index 0000000000..65af25c1eb +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "file" : "transitive-mapping-original.js", ++ "sourceRoot": "", ++ "sources": ["typescript-original.ts"], ++ "names": [], ++ "mappings": "AACA,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,CAAC,CAAC;AACX,CAAC;AACD,GAAG,CAAC,KAAK,CAAC,CAAC" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js +new file mode 100644 +index 0000000000..fd956164d3 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js +@@ -0,0 +1,6 @@ ++function foo(x) { ++ return x; ++} ++ ++foo("foo"); ++//# sourceMappingURL=transitive-mapping-three-steps.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map +new file mode 100644 +index 0000000000..90459d90f6 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "file": "transitive-mapping-three-steps.js", ++ "sources": ["transitive-mapping.js"], ++ "names": ["foo", "x"], ++ "mappings": "AAAA,SAASA,IAAIC;IAAG,OAAOA;AAAC;;AAACD,IAAI,KAAK" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js +new file mode 100644 +index 0000000000..183c027f1b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js +@@ -0,0 +1,2 @@ ++function foo(x){return x}foo("foo"); ++//# sourceMappingURL=transitive-mapping.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map +new file mode 100644 +index 0000000000..d6a6fa6672 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","x"], ++ "sources": ["transitive-mapping-original.js"], ++ "mappings":"AAAA,SAASA,IAAIC,GACT,OAAOA,CACX,CACAD,IAAI" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts b/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts +new file mode 100644 +index 0000000000..cd51c01ba1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts +@@ -0,0 +1,5 @@ ++type FooArg = string | number; ++function foo(x : FooArg) { ++ return x; ++} ++foo("foo"); +diff --git a/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js +new file mode 100644 +index 0000000000..19dfb0e2e6 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=unrecognized-property.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map +new file mode 100644 +index 0000000000..40bee558a4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "", ++ "foobar": 42, ++ "unusedProperty": [1, 2, 3, 4] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js +new file mode 100644 +index 0000000000..3c49709e05 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-boundary-values.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map +new file mode 100644 +index 0000000000..4dd836e63d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "file": "valid-mapping-boundary-values.js", ++ "sources": ["empty-original.js"], ++ "mappings": "+/////DA+/////D+/////DA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js +new file mode 100644 +index 0000000000..a2b767b619 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-empty-groups.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map +new file mode 100644 +index 0000000000..643c9ae784 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "valid-mapping-empty-groups.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js +new file mode 100644 +index 0000000000..b0cd897813 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-large-vlq.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map +new file mode 100644 +index 0000000000..76e18704c4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["valid-mapping-large-vlq.js"], ++ "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js +new file mode 100644 +index 0000000000..ee2acf0f5b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=valid-mapping-null-sources.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map +new file mode 100644 +index 0000000000..199cda9369 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version":3, ++ "names": ["foo"], ++ "sources": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-missing.js b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js +new file mode 100644 +index 0000000000..c32d1f1a1c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-missing.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map +new file mode 100644 +index 0000000000..49d8ce766e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js +new file mode 100644 +index 0000000000..ae2342e2ff +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-not-a-number.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map +new file mode 100644 +index 0000000000..a584d6e695 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : "3foo", ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js +new file mode 100644 +index 0000000000..a55170885d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-numeric-string.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map +new file mode 100644 +index 0000000000..dbe52a7d0d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : "3", ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js +new file mode 100644 +index 0000000000..55f4e1a298 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-too-high.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map +new file mode 100644 +index 0000000000..ee23be32ff +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 4, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js +new file mode 100644 +index 0000000000..d9642920b3 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-too-low.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map +new file mode 100644 +index 0000000000..64ca7a6e2e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 2, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-valid.js b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js +new file mode 100644 +index 0000000000..82d0bfa1eb +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-valid.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map +new file mode 100644 +index 0000000000..1a163052d8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +-- +2.39.2 + diff --git a/test/fixtures/test426/chrome/0002-Add-reverse-mapping-code-to-test.patch b/test/fixtures/test426/chrome/0002-Add-reverse-mapping-code-to-test.patch new file mode 100644 index 00000000000000..dc08ba5fadb482 --- /dev/null +++ b/test/fixtures/test426/chrome/0002-Add-reverse-mapping-code-to-test.patch @@ -0,0 +1,46 @@ +From bebeda0b8133fc8f44382e59edda9203c980e8f3 Mon Sep 17 00:00:00 2001 +From: Asumu Takikawa +Date: Thu, 11 Jul 2024 16:44:29 -0700 +Subject: [PATCH 2/2] Add reverse mapping code to test + +--- + front_end/core/sdk/SourceMapSpec.test.ts | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/front_end/core/sdk/SourceMapSpec.test.ts b/front_end/core/sdk/SourceMapSpec.test.ts +index 93b26a2e13..402b82e4c0 100644 +--- a/front_end/core/sdk/SourceMapSpec.test.ts ++++ b/front_end/core/sdk/SourceMapSpec.test.ts +@@ -12,7 +12,6 @@ + + **/ + +-const {assert} = chai; + import type * as Platform from '../platform/platform.js'; + import {assertNotNullOrUndefined} from '../platform/platform.js'; + import { SourceMapV3, parseSourceMap } from './SourceMap.js'; +@@ -170,6 +169,21 @@ describeWithEnvironment('SourceMapSpec', () => { + assert.strictEqual(nullish(actual.sourceURL), originalSource, 'unexpected source URL'); + assert.strictEqual(nullish(actual.sourceLineNumber), originalLine, 'unexpected source line number'); + assert.strictEqual(nullish(actual.sourceColumnNumber), originalColumn, 'unexpected source column number'); ++ ++ if (originalSource != null) { ++ let reverseEntries = sourceMap.findReverseEntries( ++ originalSource as Platform.DevToolsPath.UrlString, ++ originalLine, ++ originalColumn ++ ); ++ ++ const anyEntryMatched = reverseEntries.some((entry) => { ++ return entry.sourceURL === originalSource && ++ entry.sourceLineNumber === originalLine && ++ entry.sourceColumnNumber === originalColumn; ++ }); ++ assert.isTrue(anyEntryMatched, `expected any matching reverse lookup entry, got none`); ++ } + } + }); + } +-- +2.39.2 + diff --git a/test/fixtures/test426/resources/basic-mapping-as-index-map.js b/test/fixtures/test426/resources/basic-mapping-as-index-map.js new file mode 100644 index 00000000000000..b9fae380437d95 --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping-as-index-map.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=basic-mapping-as-index-map.js.map diff --git a/test/fixtures/test426/resources/basic-mapping-as-index-map.js.map b/test/fixtures/test426/resources/basic-mapping-as-index-map.js.map new file mode 100644 index 00000000000000..c0ad870ed2baec --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping-as-index-map.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "file": "basic-mapping-as-index-map.js", + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + } + ] +} diff --git a/test/fixtures/test426/resources/basic-mapping-original.js b/test/fixtures/test426/resources/basic-mapping-original.js new file mode 100644 index 00000000000000..301b186cb15e6d --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping-original.js @@ -0,0 +1,8 @@ +function foo() { + return 42; +} +function bar() { + return 24; +} +foo(); +bar(); diff --git a/test/fixtures/test426/resources/basic-mapping.js b/test/fixtures/test426/resources/basic-mapping.js new file mode 100644 index 00000000000000..2e479a4175b861 --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=basic-mapping.js.map diff --git a/test/fixtures/test426/resources/basic-mapping.js.map b/test/fixtures/test426/resources/basic-mapping.js.map new file mode 100644 index 00000000000000..12dc9679a4b1db --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping.js.map @@ -0,0 +1,6 @@ +{ + "version":3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +} diff --git a/test/fixtures/test426/resources/file-not-a-string-1.js b/test/fixtures/test426/resources/file-not-a-string-1.js new file mode 100644 index 00000000000000..d049f870450a55 --- /dev/null +++ b/test/fixtures/test426/resources/file-not-a-string-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=file-not-a-string-1.js.map diff --git a/test/fixtures/test426/resources/file-not-a-string-1.js.map b/test/fixtures/test426/resources/file-not-a-string-1.js.map new file mode 100644 index 00000000000000..85e973d881dfbf --- /dev/null +++ b/test/fixtures/test426/resources/file-not-a-string-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "file": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/file-not-a-string-2.js b/test/fixtures/test426/resources/file-not-a-string-2.js new file mode 100644 index 00000000000000..07b8152c0c6cd1 --- /dev/null +++ b/test/fixtures/test426/resources/file-not-a-string-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=file-not-a-string-2.js.map diff --git a/test/fixtures/test426/resources/file-not-a-string-2.js.map b/test/fixtures/test426/resources/file-not-a-string-2.js.map new file mode 100644 index 00000000000000..a5b6b1f9d94fc3 --- /dev/null +++ b/test/fixtures/test426/resources/file-not-a-string-2.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "file": 235324, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/ignore-list-empty.js b/test/fixtures/test426/resources/ignore-list-empty.js new file mode 100644 index 00000000000000..385a5c3501b22c --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-empty.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-empty.js.map diff --git a/test/fixtures/test426/resources/ignore-list-empty.js.map b/test/fixtures/test426/resources/ignore-list-empty.js.map new file mode 100644 index 00000000000000..7297863a9be8ef --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-empty.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [] +} diff --git a/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js b/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js new file mode 100644 index 00000000000000..567174a707ef49 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-out-of-bounds-1.js.map diff --git a/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js.map b/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js.map new file mode 100644 index 00000000000000..fb2566bb419b98 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [1] +} diff --git a/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js b/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js new file mode 100644 index 00000000000000..4216d9a67315a9 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-out-of-bounds-2.js.map diff --git a/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js.map b/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js.map new file mode 100644 index 00000000000000..41371a76a89663 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [-1] +} diff --git a/test/fixtures/test426/resources/ignore-list-valid-1.js b/test/fixtures/test426/resources/ignore-list-valid-1.js new file mode 100644 index 00000000000000..ea64a5565a6325 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-valid-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-valid-1.js.map diff --git a/test/fixtures/test426/resources/ignore-list-valid-1.js.map b/test/fixtures/test426/resources/ignore-list-valid-1.js.map new file mode 100644 index 00000000000000..98eebdf7f65598 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-valid-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [0] +} diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-1.js b/test/fixtures/test426/resources/ignore-list-wrong-type-1.js new file mode 100644 index 00000000000000..8b40bd38476724 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-wrong-type-1.js.map diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-1.js.map b/test/fixtures/test426/resources/ignore-list-wrong-type-1.js.map new file mode 100644 index 00000000000000..688740aba843fc --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": ["not a number"] +} diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-2.js b/test/fixtures/test426/resources/ignore-list-wrong-type-2.js new file mode 100644 index 00000000000000..35c77911648ef6 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-wrong-type-2.js.map diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-2.js.map b/test/fixtures/test426/resources/ignore-list-wrong-type-2.js.map new file mode 100644 index 00000000000000..ca1d30de2d3626 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-2.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": ["0"] +} diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-3.js b/test/fixtures/test426/resources/ignore-list-wrong-type-3.js new file mode 100644 index 00000000000000..8735d4175804bf --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-3.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-wrong-type-3.js.map diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-3.js.map b/test/fixtures/test426/resources/ignore-list-wrong-type-3.js.map new file mode 100644 index 00000000000000..1ac167d56c4e74 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-3.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": 0 +} diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-4.js b/test/fixtures/test426/resources/ignore-list-wrong-type-4.js new file mode 100644 index 00000000000000..e42f4698a3ec0e --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-4.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-wrong-type-4.js.map diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-4.js.map b/test/fixtures/test426/resources/ignore-list-wrong-type-4.js.map new file mode 100644 index 00000000000000..c1a27efe980dd4 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-4.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [0.5] +} diff --git a/test/fixtures/test426/resources/index-map-empty-sections.js b/test/fixtures/test426/resources/index-map-empty-sections.js new file mode 100644 index 00000000000000..abe9f7f30816c6 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-empty-sections.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-empty-sections.js.map diff --git a/test/fixtures/test426/resources/index-map-empty-sections.js.map b/test/fixtures/test426/resources/index-map-empty-sections.js.map new file mode 100644 index 00000000000000..f3efabbe00c395 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-empty-sections.js.map @@ -0,0 +1,4 @@ +{ + "version": 3, + "sections": [] +} diff --git a/test/fixtures/test426/resources/index-map-file-wrong-type-1.js b/test/fixtures/test426/resources/index-map-file-wrong-type-1.js new file mode 100644 index 00000000000000..48bb12855bf5c4 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-file-wrong-type-1.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=index-map-file-wrong-type-1.js.map diff --git a/test/fixtures/test426/resources/index-map-file-wrong-type-1.js.map b/test/fixtures/test426/resources/index-map-file-wrong-type-1.js.map new file mode 100644 index 00000000000000..dd39b5a2b13c19 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-file-wrong-type-1.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "file": [], + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-file-wrong-type-2.js b/test/fixtures/test426/resources/index-map-file-wrong-type-2.js new file mode 100644 index 00000000000000..c002ba726a51bf --- /dev/null +++ b/test/fixtures/test426/resources/index-map-file-wrong-type-2.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=index-map-file-wrong-type-2.js.map diff --git a/test/fixtures/test426/resources/index-map-file-wrong-type-2.js.map b/test/fixtures/test426/resources/index-map-file-wrong-type-2.js.map new file mode 100644 index 00000000000000..0ee0a406be8d60 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-file-wrong-type-2.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "file": 2345234234, + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-invalid-base-mappings.js b/test/fixtures/test426/resources/index-map-invalid-base-mappings.js new file mode 100644 index 00000000000000..e90bef083c4925 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-base-mappings.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-invalid-base-mappings.js.map diff --git a/test/fixtures/test426/resources/index-map-invalid-base-mappings.js.map b/test/fixtures/test426/resources/index-map-invalid-base-mappings.js.map new file mode 100644 index 00000000000000..4ad1fefe65097b --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-base-mappings.js.map @@ -0,0 +1,16 @@ +{ + "version": 3, + "mappings": "AAAA", + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContnet": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-invalid-order.js b/test/fixtures/test426/resources/index-map-invalid-order.js new file mode 100644 index 00000000000000..263fa3c6e0b92e --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-order.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-invalid-order.js.map diff --git a/test/fixtures/test426/resources/index-map-invalid-order.js.map b/test/fixtures/test426/resources/index-map-invalid-order.js.map new file mode 100644 index 00000000000000..74e0c1d052c4bc --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-order.js.map @@ -0,0 +1,25 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 1, "column": 4 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original-1.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + }, + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original-2.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-invalid-overlap.js b/test/fixtures/test426/resources/index-map-invalid-overlap.js new file mode 100644 index 00000000000000..9aff8dc6203abc --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-overlap.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-invalid-overlap.js.map diff --git a/test/fixtures/test426/resources/index-map-invalid-overlap.js.map b/test/fixtures/test426/resources/index-map-invalid-overlap.js.map new file mode 100644 index 00000000000000..3c08cb7beb59d9 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-overlap.js.map @@ -0,0 +1,25 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original-1.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + }, + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original-2.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-invalid-sub-map.js b/test/fixtures/test426/resources/index-map-invalid-sub-map.js new file mode 100644 index 00000000000000..284e8d77e6591e --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-sub-map.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-invalid-sub-map.js.map diff --git a/test/fixtures/test426/resources/index-map-invalid-sub-map.js.map b/test/fixtures/test426/resources/index-map-invalid-sub-map.js.map new file mode 100644 index 00000000000000..4020ae30c5765b --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-sub-map.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index-map-invalid-sub-map.js", + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": "3", + "mappings": 7 + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-file.js b/test/fixtures/test426/resources/index-map-missing-file.js new file mode 100644 index 00000000000000..be2a93cb77cdee --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-file.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=index-map-missing-file.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-file.js.map b/test/fixtures/test426/resources/index-map-missing-file.js.map new file mode 100644 index 00000000000000..8a6d4b5dc78800 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-file.js.map @@ -0,0 +1,14 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-map.js b/test/fixtures/test426/resources/index-map-missing-map.js new file mode 100644 index 00000000000000..86c8e9a2535ad9 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-map.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-missing-map.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-map.js.map b/test/fixtures/test426/resources/index-map-missing-map.js.map new file mode 100644 index 00000000000000..3bce47e852cfec --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-map.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": 0 } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-offset-column.js b/test/fixtures/test426/resources/index-map-missing-offset-column.js new file mode 100644 index 00000000000000..fe6917403f1804 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-missing-offset-column.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-offset-column.js.map b/test/fixtures/test426/resources/index-map-missing-offset-column.js.map new file mode 100644 index 00000000000000..ae27aa5e62c72d --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset-column.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-offset-line.js b/test/fixtures/test426/resources/index-map-missing-offset-line.js new file mode 100644 index 00000000000000..ba8614e412cef8 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset-line.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-missing-offset-line.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-offset-line.js.map b/test/fixtures/test426/resources/index-map-missing-offset-line.js.map new file mode 100644 index 00000000000000..7b128e96b0b7cb --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset-line.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-offset.js b/test/fixtures/test426/resources/index-map-missing-offset.js new file mode 100644 index 00000000000000..9ca2cf3fb5159d --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-missing-offset.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-offset.js.map b/test/fixtures/test426/resources/index-map-missing-offset.js.map new file mode 100644 index 00000000000000..7737595d848cd6 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset.js.map @@ -0,0 +1,14 @@ +{ + "version": 3, + "sections": [ + { + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js b/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js new file mode 100644 index 00000000000000..ed1e9ec5d5b8a6 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-offset-column-wrong-type.js.map diff --git a/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js.map b/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js.map new file mode 100644 index 00000000000000..6ea11758c1e448 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": true }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js b/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js new file mode 100644 index 00000000000000..d58f2aff993e6e --- /dev/null +++ b/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-offset-line-wrong-type.js.map diff --git a/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js.map b/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js.map new file mode 100644 index 00000000000000..d48b2f43f16b21 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": true, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-two-concatenated-sources.js b/test/fixtures/test426/resources/index-map-two-concatenated-sources.js new file mode 100644 index 00000000000000..b8702d7187c925 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-two-concatenated-sources.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar();function baz(){return"baz"}baz(); +//# sourceMappingURL=index-map-two-concatenated-sources.js.map diff --git a/test/fixtures/test426/resources/index-map-two-concatenated-sources.js.map b/test/fixtures/test426/resources/index-map-two-concatenated-sources.js.map new file mode 100644 index 00000000000000..f67f5de3c5d8c3 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-two-concatenated-sources.js.map @@ -0,0 +1,24 @@ +{ + "version": 3, + "file": "index-map-two-concatenated-sources.js", + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + }, + { + "offset": { "line": 0, "column": 62 }, + "map": { + "version": 3, + "names": ["baz"], + "sources": ["second-source-original.js"], + "mappings":"AAAA,SAASA,MACP,MAAO,KACT,CACAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-wrong-type-map.js b/test/fixtures/test426/resources/index-map-wrong-type-map.js new file mode 100644 index 00000000000000..d31d6d6358b493 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-map.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-wrong-type-map.js.map diff --git a/test/fixtures/test426/resources/index-map-wrong-type-map.js.map b/test/fixtures/test426/resources/index-map-wrong-type-map.js.map new file mode 100644 index 00000000000000..0963f623d761a9 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-map.js.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": "not a map" + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-wrong-type-offset.js b/test/fixtures/test426/resources/index-map-wrong-type-offset.js new file mode 100644 index 00000000000000..048e1246f8b01b --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-offset.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-wrong-type-offset.js.map diff --git a/test/fixtures/test426/resources/index-map-wrong-type-offset.js.map b/test/fixtures/test426/resources/index-map-wrong-type-offset.js.map new file mode 100644 index 00000000000000..645278c3b4755a --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-offset.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": "not an offset", + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-wrong-type-sections.js b/test/fixtures/test426/resources/index-map-wrong-type-sections.js new file mode 100644 index 00000000000000..011eca806ed600 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-sections.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-wrong-type-sections.js.map diff --git a/test/fixtures/test426/resources/index-map-wrong-type-sections.js.map b/test/fixtures/test426/resources/index-map-wrong-type-sections.js.map new file mode 100644 index 00000000000000..dbfb4ead3001fb --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-sections.js.map @@ -0,0 +1,4 @@ +{ + "version": 3, + "sections": "not a sections list" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-bad-separator.js b/test/fixtures/test426/resources/invalid-mapping-bad-separator.js new file mode 100644 index 00000000000000..25338aca30cefd --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-bad-separator.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=invalid-mapping-bad-separator.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-bad-separator.js.map b/test/fixtures/test426/resources/invalid-mapping-bad-separator.js.map new file mode 100644 index 00000000000000..5f4f5b92330a6b --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-bad-separator.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA.SAASA:MACP" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js b/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js new file mode 100644 index 00000000000000..cb38e2fe9d7b1d --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js.map b/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js.map new file mode 100644 index 00000000000000..73d74bef42e202 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-not-a-string-1.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": 5 +} diff --git a/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js b/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js new file mode 100644 index 00000000000000..3d84abd6c6b480 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js.map b/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js.map new file mode 100644 index 00000000000000..3143cbce170b9e --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-not-a-string-2.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": [1, 2, 3, 4] +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js new file mode 100644 index 00000000000000..55591f874b1b9e --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js.map new file mode 100644 index 00000000000000..96b3ce97dcb271 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-column-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "ggggggE" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js new file mode 100644 index 00000000000000..2a6b434eff5819 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map new file mode 100644 index 00000000000000..3efb8da9abbaa6 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": ["foo"], + "file": "invalid-mapping-segment-name-index-out-of-bounds.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAAC" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js new file mode 100644 index 00000000000000..709e34dbd326a0 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js.map new file mode 100644 index 00000000000000..1d44bb8300f7c0 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-name-index-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAAggggggE" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js new file mode 100644 index 00000000000000..a202152d6fdf29 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js.map new file mode 100644 index 00000000000000..bb7e887dc05f4a --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-column.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "F" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js new file mode 100644 index 00000000000000..3e3f6342046785 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js.map new file mode 100644 index 00000000000000..5197ab23b1d2cd --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-name-index.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAAF" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js new file mode 100644 index 00000000000000..f21d5342b395a8 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js.map new file mode 100644 index 00000000000000..4a76cb3e390636 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-original-column.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAF" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js new file mode 100644 index 00000000000000..b37309601ce013 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js.map new file mode 100644 index 00000000000000..40170361b5ddf8 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-original-line.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAFA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js new file mode 100644 index 00000000000000..94b835d6877c07 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-column.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js.map new file mode 100644 index 00000000000000..414884072b55a5 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-column.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "C,F" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js new file mode 100644 index 00000000000000..c965c5f011f584 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-name-index.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js.map new file mode 100644 index 00000000000000..1fbbcfcd323e5f --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-name-index.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAAC,AAAAF" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js new file mode 100644 index 00000000000000..493a6ec88a391a --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-column.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js.map new file mode 100644 index 00000000000000..7e62895651fa30 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-original-column.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAC,AAAF" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js new file mode 100644 index 00000000000000..ca8329fb98f02a --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-line.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js.map new file mode 100644 index 00000000000000..86b0fb3a04cc3d --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-original-line.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AACA,AAFA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js new file mode 100644 index 00000000000000..fa92225b096325 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-source-index.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js.map new file mode 100644 index 00000000000000..2efeb047db618e --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-source-index.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "ACAA,AFAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js new file mode 100644 index 00000000000000..6e05849b6a0354 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js.map new file mode 100644 index 00000000000000..ed835d8007ca68 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-source-index.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AFAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js new file mode 100644 index 00000000000000..0936ed7ea8fdd4 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js.map new file mode 100644 index 00000000000000..8dee1df731c241 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-original-column-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAggggggE" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js new file mode 100644 index 00000000000000..9b3aa5a361ae96 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js.map new file mode 100644 index 00000000000000..8ee6fea9c8350a --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-original-line-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAggggggEA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js new file mode 100644 index 00000000000000..2e5fbca26825ae --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map new file mode 100644 index 00000000000000..fec001a67329e8 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-source-index-out-of-bounds.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "ACAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js new file mode 100644 index 00000000000000..3f4943e1272d01 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js.map new file mode 100644 index 00000000000000..555489fa65701f --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-source-index-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AggggggEAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js b/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js new file mode 100644 index 00000000000000..ad452d96af8286 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js.map new file mode 100644 index 00000000000000..c2af1165ad8f1f --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js b/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js new file mode 100644 index 00000000000000..04c520b47877a1 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js.map new file mode 100644 index 00000000000000..73cf00fa1c9606 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js b/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js new file mode 100644 index 00000000000000..cf627825a581f0 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js.map new file mode 100644 index 00000000000000..fb8e7cff64c376 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-with-zero-fields.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": ",,,," +} diff --git a/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js b/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js new file mode 100644 index 00000000000000..2c2a0090aca613 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-vlq-missing-continuation.js.map diff --git a/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js.map b/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js.map new file mode 100644 index 00000000000000..dd0e363ff47354 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": [], + "names": [], + "mappings": "g" +} diff --git a/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js b/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js new file mode 100644 index 00000000000000..557cb6aed3b262 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-vlq-non-base64-char-padding.js.map diff --git a/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js.map b/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js.map new file mode 100644 index 00000000000000..b439caabc88143 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js.map @@ -0,0 +1,7 @@ +{ + "version" : 3, + "sources": ["foo.js"], + "sourcesContent": ["hello world"], + "names": [], + "mappings": ";;A=" +} diff --git a/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js b/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js new file mode 100644 index 00000000000000..d1b20b41a29fc5 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-vlq-non-base64-char.js.map diff --git a/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js.map b/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js.map new file mode 100644 index 00000000000000..4fa1ac5768853e --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": [], + "names": [], + "mappings": "A$%?!" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-column-reset.js b/test/fixtures/test426/resources/mapping-semantics-column-reset.js new file mode 100644 index 00000000000000..b64482d0984324 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-column-reset.js @@ -0,0 +1,3 @@ + foo + bar +//# sourceMappingURL=mapping-semantics-column-reset.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-column-reset.js.map b/test/fixtures/test426/resources/mapping-semantics-column-reset.js.map new file mode 100644 index 00000000000000..97bc9b91a43d51 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-column-reset.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["mapping-semantics-column-reset-original.js"], + "sourcesContent": ["foo\nbar"], + "mappings": "CAAA;CACA" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js b/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js new file mode 100644 index 00000000000000..0f6602d61503c5 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js @@ -0,0 +1,2 @@ +foo +//# sourceMappingURL=mapping-semantics-five-field-segment.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js.map b/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js.map new file mode 100644 index 00000000000000..d0504f511dad2d --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": ["foo"], + "sources": ["unused", "mapping-semantics-five-field-segment-original.js"], + "sourcesContent": ["", "\n\n foo"], + "mappings": "CCEEA" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js b/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js new file mode 100644 index 00000000000000..3dcbee9294c0b4 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js @@ -0,0 +1,2 @@ +foo +//# sourceMappingURL=mapping-semantics-four-field-segment.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js.map b/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js.map new file mode 100644 index 00000000000000..9e01ac4b6c58f8 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["unused", "mapping-semantics-four-field-segment-original.js"], + "sourcesContent": ["", "\n\n foo"], + "mappings": "CCEE" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-relative-1.js b/test/fixtures/test426/resources/mapping-semantics-relative-1.js new file mode 100644 index 00000000000000..281870cc50e772 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-relative-1.js @@ -0,0 +1,2 @@ + 42; 24; +//# sourceMappingURL=mapping-semantics-relative-1.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-relative-1.js.map b/test/fixtures/test426/resources/mapping-semantics-relative-1.js.map new file mode 100644 index 00000000000000..6570031f8983f4 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-relative-1.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["unused", "mapping-semantics-relative-1-original.js"], + "sourcesContent": ["", "42; 24;"], + "mappings": "CCAA,IAAI" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-relative-2.js b/test/fixtures/test426/resources/mapping-semantics-relative-2.js new file mode 100644 index 00000000000000..f4bff1c75bccef --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-relative-2.js @@ -0,0 +1,3 @@ + foo + bar +//# sourceMappingURL=mapping-semantics-relative-2.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-relative-2.js.map b/test/fixtures/test426/resources/mapping-semantics-relative-2.js.map new file mode 100644 index 00000000000000..d6845233f91207 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-relative-2.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": ["foo", "bar"], + "sources": ["unused", "mapping-semantics-relative-2-original.js"], + "sourcesContent": ["", " foo\n bar"], + "mappings": "CCAEA;EACAC" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js b/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js new file mode 100644 index 00000000000000..ca06b7c58d8847 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js @@ -0,0 +1,2 @@ + 3 +//# sourceMappingURL=mapping-semantics-single-field-segment.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js.map b/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js.map new file mode 100644 index 00000000000000..8260d63085d79b --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["mapping-semantics-single-field-segment-original.js"], + "sourcesContent": ["3 3"], + "mappings": "AAAC,E" +} diff --git a/test/fixtures/test426/resources/mappings-missing.js b/test/fixtures/test426/resources/mappings-missing.js new file mode 100644 index 00000000000000..07a8361e8fcae9 --- /dev/null +++ b/test/fixtures/test426/resources/mappings-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=mappings-missing.js.map diff --git a/test/fixtures/test426/resources/mappings-missing.js.map b/test/fixtures/test426/resources/mappings-missing.js.map new file mode 100644 index 00000000000000..7a60084729612d --- /dev/null +++ b/test/fixtures/test426/resources/mappings-missing.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "names": ["foo"], + "sources": ["1.js"], + "sourcesContent": ["hello world"] +} diff --git a/test/fixtures/test426/resources/names-missing.js b/test/fixtures/test426/resources/names-missing.js new file mode 100644 index 00000000000000..58781fd88705d3 --- /dev/null +++ b/test/fixtures/test426/resources/names-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=names-missing.js.map diff --git a/test/fixtures/test426/resources/names-missing.js.map b/test/fixtures/test426/resources/names-missing.js.map new file mode 100644 index 00000000000000..475f4e309b2641 --- /dev/null +++ b/test/fixtures/test426/resources/names-missing.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent" : [""], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/names-not-a-list-1.js b/test/fixtures/test426/resources/names-not-a-list-1.js new file mode 100644 index 00000000000000..dc65f1972b5a87 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-a-list-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=names-not-a-list-1.js.map diff --git a/test/fixtures/test426/resources/names-not-a-list-1.js.map b/test/fixtures/test426/resources/names-not-a-list-1.js.map new file mode 100644 index 00000000000000..fe1edaeb96ad90 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-a-list-1.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": ["source.js"], + "names": "not a list", + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/names-not-a-list-2.js b/test/fixtures/test426/resources/names-not-a-list-2.js new file mode 100644 index 00000000000000..d7251f78da8457 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-a-list-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=names-not-a-list-2.js.map diff --git a/test/fixtures/test426/resources/names-not-a-list-2.js.map b/test/fixtures/test426/resources/names-not-a-list-2.js.map new file mode 100644 index 00000000000000..3388d2bb7109d0 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-a-list-2.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": ["source.js"], + "names": { "foo": 3 }, + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/names-not-string.js b/test/fixtures/test426/resources/names-not-string.js new file mode 100644 index 00000000000000..8dc7b4811a3e91 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-string.js @@ -0,0 +1 @@ +//# sourceMappingURL=names-not-string.js.map diff --git a/test/fixtures/test426/resources/names-not-string.js.map b/test/fixtures/test426/resources/names-not-string.js.map new file mode 100644 index 00000000000000..c0feb0739aecff --- /dev/null +++ b/test/fixtures/test426/resources/names-not-string.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": ["source.js"], + "names": [null, 3, true, false, {}, []], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/second-source-original.js b/test/fixtures/test426/resources/second-source-original.js new file mode 100644 index 00000000000000..c339bc9d15daa0 --- /dev/null +++ b/test/fixtures/test426/resources/second-source-original.js @@ -0,0 +1,4 @@ +function baz() { + return "baz"; +} +baz(); diff --git a/test/fixtures/test426/resources/source-resolution-absolute-url.js b/test/fixtures/test426/resources/source-resolution-absolute-url.js new file mode 100644 index 00000000000000..7ab34b6bd0fac9 --- /dev/null +++ b/test/fixtures/test426/resources/source-resolution-absolute-url.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=source-resolution-absolute-url.js.map diff --git a/test/fixtures/test426/resources/source-resolution-absolute-url.js.map b/test/fixtures/test426/resources/source-resolution-absolute-url.js.map new file mode 100644 index 00000000000000..195dc42ecea399 --- /dev/null +++ b/test/fixtures/test426/resources/source-resolution-absolute-url.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "file": "source-root-resolution.js", + "names": ["foo", "bar"], + "sources": ["/baz/quux/basic-mapping-original.js"], + "sourcesContent": ["function foo() {\nreturn 42;\n }\n function bar() {\n return 24;\n }\n foo();\n bar();"], + "mappings": "AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/source-root-not-a-string-1.js b/test/fixtures/test426/resources/source-root-not-a-string-1.js new file mode 100644 index 00000000000000..f176f3143a4adf --- /dev/null +++ b/test/fixtures/test426/resources/source-root-not-a-string-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=source-root-not-a-string-1.js.map diff --git a/test/fixtures/test426/resources/source-root-not-a-string-1.js.map b/test/fixtures/test426/resources/source-root-not-a-string-1.js.map new file mode 100644 index 00000000000000..e297f5c03e5096 --- /dev/null +++ b/test/fixtures/test426/resources/source-root-not-a-string-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sourceRoot": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/source-root-not-a-string-2.js b/test/fixtures/test426/resources/source-root-not-a-string-2.js new file mode 100644 index 00000000000000..e7e6d9547825e6 --- /dev/null +++ b/test/fixtures/test426/resources/source-root-not-a-string-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=source-root-not-a-string-2.js.map diff --git a/test/fixtures/test426/resources/source-root-not-a-string-2.js.map b/test/fixtures/test426/resources/source-root-not-a-string-2.js.map new file mode 100644 index 00000000000000..d5705ebfb8e982 --- /dev/null +++ b/test/fixtures/test426/resources/source-root-not-a-string-2.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sourceRoot": -10923409, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/source-root-resolution.js b/test/fixtures/test426/resources/source-root-resolution.js new file mode 100644 index 00000000000000..15a1a4c95026b0 --- /dev/null +++ b/test/fixtures/test426/resources/source-root-resolution.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=source-root-resolution.js.map diff --git a/test/fixtures/test426/resources/source-root-resolution.js.map b/test/fixtures/test426/resources/source-root-resolution.js.map new file mode 100644 index 00000000000000..52fc9a23793f7c --- /dev/null +++ b/test/fixtures/test426/resources/source-root-resolution.js.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "sourceRoot": "theroot", + "file": "source-root-resolution.js", + "names": ["foo", "bar"], + "sources": ["basic-mapping-original.js"], + "sourcesContent": ["function foo() {\n return 42;\n }\n function bar() {\n return 24;\n }\n foo();\n bar();"], + "mappings": "AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/sources-and-sources-content-both-null.js b/test/fixtures/test426/resources/sources-and-sources-content-both-null.js new file mode 100644 index 00000000000000..9263eba549f5b6 --- /dev/null +++ b/test/fixtures/test426/resources/sources-and-sources-content-both-null.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-and-sources-content-both-null.js.map diff --git a/test/fixtures/test426/resources/sources-and-sources-content-both-null.js.map b/test/fixtures/test426/resources/sources-and-sources-content-both-null.js.map new file mode 100644 index 00000000000000..09a7c1f3698ce6 --- /dev/null +++ b/test/fixtures/test426/resources/sources-and-sources-content-both-null.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": ["foo"], + "sources": [null], + "sourcesContent": [null], + "mappings":"AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/sources-content-missing.js b/test/fixtures/test426/resources/sources-content-missing.js new file mode 100644 index 00000000000000..c97d9f133a590d --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-content-missing.js.map diff --git a/test/fixtures/test426/resources/sources-content-missing.js.map b/test/fixtures/test426/resources/sources-content-missing.js.map new file mode 100644 index 00000000000000..fa7922f5c783fe --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-missing.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "names": ["foo"], + "sources": ["basic-mapping-original.js"], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/sources-content-not-a-list-1.js b/test/fixtures/test426/resources/sources-content-not-a-list-1.js new file mode 100644 index 00000000000000..5395f8b6fbe655 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-a-list-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-content-not-a-list-1.js.map diff --git a/test/fixtures/test426/resources/sources-content-not-a-list-1.js.map b/test/fixtures/test426/resources/sources-content-not-a-list-1.js.map new file mode 100644 index 00000000000000..3710f95111b755 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-a-list-1.js.map @@ -0,0 +1,7 @@ +{ + "version" : 3, + "sources": ["first.js"], + "sourcesContent": "not a list", + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-content-not-a-list-2.js b/test/fixtures/test426/resources/sources-content-not-a-list-2.js new file mode 100644 index 00000000000000..0ccc4aa460af30 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-a-list-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-content-not-a-list-2.js.map diff --git a/test/fixtures/test426/resources/sources-content-not-a-list-2.js.map b/test/fixtures/test426/resources/sources-content-not-a-list-2.js.map new file mode 100644 index 00000000000000..ab9ae257c1f9e4 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-a-list-2.js.map @@ -0,0 +1,7 @@ +{ + "version" : 3, + "sources": ["first.js"], + "sourcesContent": { "foobar baz": 3 }, + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-content-not-string-or-null.js b/test/fixtures/test426/resources/sources-content-not-string-or-null.js new file mode 100644 index 00000000000000..480b4ba7403f88 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-string-or-null.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-content-not-string-or-null.js.map diff --git a/test/fixtures/test426/resources/sources-content-not-string-or-null.js.map b/test/fixtures/test426/resources/sources-content-not-string-or-null.js.map new file mode 100644 index 00000000000000..6e6c2517150b96 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-string-or-null.js.map @@ -0,0 +1,7 @@ +{ + "version" : 3, + "sources": ["1.js", "2.js", "3.js", "4.js", "5.js"], + "sourcesContent": [3, {}, true, false, []], + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-missing.js b/test/fixtures/test426/resources/sources-missing.js new file mode 100644 index 00000000000000..779b865e2769ad --- /dev/null +++ b/test/fixtures/test426/resources/sources-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-missing.js.map diff --git a/test/fixtures/test426/resources/sources-missing.js.map b/test/fixtures/test426/resources/sources-missing.js.map new file mode 100644 index 00000000000000..92aff4fb0e74b1 --- /dev/null +++ b/test/fixtures/test426/resources/sources-missing.js.map @@ -0,0 +1,5 @@ +{ + "version" : 3, + "names": ["foo"], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/sources-non-null-sources-content-null.js b/test/fixtures/test426/resources/sources-non-null-sources-content-null.js new file mode 100644 index 00000000000000..939b568ba14251 --- /dev/null +++ b/test/fixtures/test426/resources/sources-non-null-sources-content-null.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=sources-non-null-sources-content-null.js.map diff --git a/test/fixtures/test426/resources/sources-non-null-sources-content-null.js.map b/test/fixtures/test426/resources/sources-non-null-sources-content-null.js.map new file mode 100644 index 00000000000000..e573906b2d7144 --- /dev/null +++ b/test/fixtures/test426/resources/sources-non-null-sources-content-null.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": ["foo"], + "sources": ["basic-mapping-original.js"], + "sourcesContent": [null], + "mappings":"AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/sources-not-a-list-1.js b/test/fixtures/test426/resources/sources-not-a-list-1.js new file mode 100644 index 00000000000000..7e33b7e8672535 --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-a-list-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-not-a-list-1.js.map diff --git a/test/fixtures/test426/resources/sources-not-a-list-1.js.map b/test/fixtures/test426/resources/sources-not-a-list-1.js.map new file mode 100644 index 00000000000000..26330517b9884f --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-a-list-1.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": "not a list", + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-not-a-list-2.js b/test/fixtures/test426/resources/sources-not-a-list-2.js new file mode 100644 index 00000000000000..4021f763fc880b --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-a-list-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-not-a-list-2.js.map diff --git a/test/fixtures/test426/resources/sources-not-a-list-2.js.map b/test/fixtures/test426/resources/sources-not-a-list-2.js.map new file mode 100644 index 00000000000000..2ed85962fddf31 --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-a-list-2.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": { "source.js": 3 }, + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-not-string-or-null.js b/test/fixtures/test426/resources/sources-not-string-or-null.js new file mode 100644 index 00000000000000..7dca97a1dab557 --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-string-or-null.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-not-string-or-null.js.map diff --git a/test/fixtures/test426/resources/sources-not-string-or-null.js.map b/test/fixtures/test426/resources/sources-not-string-or-null.js.map new file mode 100644 index 00000000000000..db25561966056d --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-string-or-null.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": [3, {}, true, false, []], + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-null-sources-content-non-null.js b/test/fixtures/test426/resources/sources-null-sources-content-non-null.js new file mode 100644 index 00000000000000..a760594ee9bd13 --- /dev/null +++ b/test/fixtures/test426/resources/sources-null-sources-content-non-null.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=sources-null-sources-content-non-null.js.map diff --git a/test/fixtures/test426/resources/sources-null-sources-content-non-null.js.map b/test/fixtures/test426/resources/sources-null-sources-content-non-null.js.map new file mode 100644 index 00000000000000..43af03903f64f8 --- /dev/null +++ b/test/fixtures/test426/resources/sources-null-sources-content-non-null.js.map @@ -0,0 +1,7 @@ +{ + "version":3, + "names": ["foo"], + "sources": [null], + "sourcesContent": ["function foo()\n{ return 42; }\nfunction bar()\n { return 24; }\nfoo();\nbar();"], + "mappings":"AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/transitive-mapping-original.js b/test/fixtures/test426/resources/transitive-mapping-original.js new file mode 100644 index 00000000000000..0a96699d6e2540 --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping-original.js @@ -0,0 +1,5 @@ +function foo(x) { + return x; +} +foo("foo"); +//# sourceMappingURL=transitive-mapping-original.js.map diff --git a/test/fixtures/test426/resources/transitive-mapping-original.js.map b/test/fixtures/test426/resources/transitive-mapping-original.js.map new file mode 100644 index 00000000000000..65af25c1ebbe4c --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping-original.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "file" : "transitive-mapping-original.js", + "sourceRoot": "", + "sources": ["typescript-original.ts"], + "names": [], + "mappings": "AACA,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,CAAC,CAAC;AACX,CAAC;AACD,GAAG,CAAC,KAAK,CAAC,CAAC" +} diff --git a/test/fixtures/test426/resources/transitive-mapping-three-steps.js b/test/fixtures/test426/resources/transitive-mapping-three-steps.js new file mode 100644 index 00000000000000..fd956164d34906 --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping-three-steps.js @@ -0,0 +1,6 @@ +function foo(x) { + return x; +} + +foo("foo"); +//# sourceMappingURL=transitive-mapping-three-steps.js.map diff --git a/test/fixtures/test426/resources/transitive-mapping-three-steps.js.map b/test/fixtures/test426/resources/transitive-mapping-three-steps.js.map new file mode 100644 index 00000000000000..90459d90f6a0ea --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping-three-steps.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "file": "transitive-mapping-three-steps.js", + "sources": ["transitive-mapping.js"], + "names": ["foo", "x"], + "mappings": "AAAA,SAASA,IAAIC;IAAG,OAAOA;AAAC;;AAACD,IAAI,KAAK" +} diff --git a/test/fixtures/test426/resources/transitive-mapping.js b/test/fixtures/test426/resources/transitive-mapping.js new file mode 100644 index 00000000000000..183c027f1bb81e --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping.js @@ -0,0 +1,2 @@ +function foo(x){return x}foo("foo"); +//# sourceMappingURL=transitive-mapping.js.map diff --git a/test/fixtures/test426/resources/transitive-mapping.js.map b/test/fixtures/test426/resources/transitive-mapping.js.map new file mode 100644 index 00000000000000..d6a6fa6672d483 --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": ["foo","x"], + "sources": ["transitive-mapping-original.js"], + "mappings":"AAAA,SAASA,IAAIC,GACT,OAAOA,CACX,CACAD,IAAI" +} diff --git a/test/fixtures/test426/resources/typescript-original.ts b/test/fixtures/test426/resources/typescript-original.ts new file mode 100644 index 00000000000000..cd51c01ba1297e --- /dev/null +++ b/test/fixtures/test426/resources/typescript-original.ts @@ -0,0 +1,5 @@ +type FooArg = string | number; +function foo(x : FooArg) { + return x; +} +foo("foo"); diff --git a/test/fixtures/test426/resources/unrecognized-property.js b/test/fixtures/test426/resources/unrecognized-property.js new file mode 100644 index 00000000000000..19dfb0e2e6c7c1 --- /dev/null +++ b/test/fixtures/test426/resources/unrecognized-property.js @@ -0,0 +1 @@ +//# sourceMappingURL=unrecognized-property.js.map diff --git a/test/fixtures/test426/resources/unrecognized-property.js.map b/test/fixtures/test426/resources/unrecognized-property.js.map new file mode 100644 index 00000000000000..40bee558a4ff92 --- /dev/null +++ b/test/fixtures/test426/resources/unrecognized-property.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": [], + "names": [], + "mappings": "", + "foobar": 42, + "unusedProperty": [1, 2, 3, 4] +} diff --git a/test/fixtures/test426/resources/valid-mapping-boundary-values.js b/test/fixtures/test426/resources/valid-mapping-boundary-values.js new file mode 100644 index 00000000000000..3c49709e05ac02 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-boundary-values.js @@ -0,0 +1 @@ +//# sourceMappingURL=valid-mapping-boundary-values.js.map diff --git a/test/fixtures/test426/resources/valid-mapping-boundary-values.js.map b/test/fixtures/test426/resources/valid-mapping-boundary-values.js.map new file mode 100644 index 00000000000000..39943bc891655e --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-boundary-values.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": ["foo"], + "file": "valid-mapping-boundary-values.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "+/////DA+/////D+/////DA" +} diff --git a/test/fixtures/test426/resources/valid-mapping-empty-groups.js b/test/fixtures/test426/resources/valid-mapping-empty-groups.js new file mode 100644 index 00000000000000..a2b767b619a03c --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-empty-groups.js @@ -0,0 +1 @@ +//# sourceMappingURL=valid-mapping-empty-groups.js.map diff --git a/test/fixtures/test426/resources/valid-mapping-empty-groups.js.map b/test/fixtures/test426/resources/valid-mapping-empty-groups.js.map new file mode 100644 index 00000000000000..643c9ae78481a9 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-empty-groups.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "valid-mapping-empty-groups.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" +} diff --git a/test/fixtures/test426/resources/valid-mapping-empty-string.js b/test/fixtures/test426/resources/valid-mapping-empty-string.js new file mode 100644 index 00000000000000..83fc1bf3ac7314 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-empty-string.js @@ -0,0 +1 @@ +//# sourceMappingURL=valid-mapping-empty-string.js.map diff --git a/test/fixtures/test426/resources/valid-mapping-empty-string.js.map b/test/fixtures/test426/resources/valid-mapping-empty-string.js.map new file mode 100644 index 00000000000000..a35268d8f5b88b --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-empty-string.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "valid-mapping-empty-string.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/valid-mapping-large-vlq.js b/test/fixtures/test426/resources/valid-mapping-large-vlq.js new file mode 100644 index 00000000000000..b0cd8978132af3 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-large-vlq.js @@ -0,0 +1 @@ +//# sourceMappingURL=valid-mapping-large-vlq.js.map diff --git a/test/fixtures/test426/resources/valid-mapping-large-vlq.js.map b/test/fixtures/test426/resources/valid-mapping-large-vlq.js.map new file mode 100644 index 00000000000000..76e18704c4b1a2 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-large-vlq.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": [], + "sources": ["valid-mapping-large-vlq.js"], + "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" +} diff --git a/test/fixtures/test426/resources/version-missing.js b/test/fixtures/test426/resources/version-missing.js new file mode 100644 index 00000000000000..c32d1f1a1cc682 --- /dev/null +++ b/test/fixtures/test426/resources/version-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-missing.js.map diff --git a/test/fixtures/test426/resources/version-missing.js.map b/test/fixtures/test426/resources/version-missing.js.map new file mode 100644 index 00000000000000..49d8ce766edb9f --- /dev/null +++ b/test/fixtures/test426/resources/version-missing.js.map @@ -0,0 +1,5 @@ +{ + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-not-a-number.js b/test/fixtures/test426/resources/version-not-a-number.js new file mode 100644 index 00000000000000..ae2342e2ffe510 --- /dev/null +++ b/test/fixtures/test426/resources/version-not-a-number.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-not-a-number.js.map diff --git a/test/fixtures/test426/resources/version-not-a-number.js.map b/test/fixtures/test426/resources/version-not-a-number.js.map new file mode 100644 index 00000000000000..a584d6e6951171 --- /dev/null +++ b/test/fixtures/test426/resources/version-not-a-number.js.map @@ -0,0 +1,6 @@ +{ + "version" : "3foo", + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-numeric-string.js b/test/fixtures/test426/resources/version-numeric-string.js new file mode 100644 index 00000000000000..a55170885da6dc --- /dev/null +++ b/test/fixtures/test426/resources/version-numeric-string.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-numeric-string.js.map diff --git a/test/fixtures/test426/resources/version-numeric-string.js.map b/test/fixtures/test426/resources/version-numeric-string.js.map new file mode 100644 index 00000000000000..dbe52a7d0df69a --- /dev/null +++ b/test/fixtures/test426/resources/version-numeric-string.js.map @@ -0,0 +1,6 @@ +{ + "version" : "3", + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-too-high.js b/test/fixtures/test426/resources/version-too-high.js new file mode 100644 index 00000000000000..55f4e1a298fad7 --- /dev/null +++ b/test/fixtures/test426/resources/version-too-high.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-too-high.js.map diff --git a/test/fixtures/test426/resources/version-too-high.js.map b/test/fixtures/test426/resources/version-too-high.js.map new file mode 100644 index 00000000000000..ee23be32ff278f --- /dev/null +++ b/test/fixtures/test426/resources/version-too-high.js.map @@ -0,0 +1,6 @@ +{ + "version" : 4, + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-too-low.js b/test/fixtures/test426/resources/version-too-low.js new file mode 100644 index 00000000000000..d9642920b31345 --- /dev/null +++ b/test/fixtures/test426/resources/version-too-low.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-too-low.js.map diff --git a/test/fixtures/test426/resources/version-too-low.js.map b/test/fixtures/test426/resources/version-too-low.js.map new file mode 100644 index 00000000000000..64ca7a6e2e9282 --- /dev/null +++ b/test/fixtures/test426/resources/version-too-low.js.map @@ -0,0 +1,6 @@ +{ + "version" : 2, + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-valid.js b/test/fixtures/test426/resources/version-valid.js new file mode 100644 index 00000000000000..82d0bfa1eb2a17 --- /dev/null +++ b/test/fixtures/test426/resources/version-valid.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-valid.js.map diff --git a/test/fixtures/test426/resources/version-valid.js.map b/test/fixtures/test426/resources/version-valid.js.map new file mode 100644 index 00000000000000..1a163052d8fc86 --- /dev/null +++ b/test/fixtures/test426/resources/version-valid.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js new file mode 100644 index 00000000000000..511e7be18ae5ba --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js @@ -0,0 +1,2 @@ + 3 +//# sourceMappingURL=vlq-valid-continuation-bit-present-1.js.map diff --git a/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js.map b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js.map new file mode 100644 index 00000000000000..f4acb4b4183754 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["vlq-valid-continuation-bit-present-1-original.js"], + "sourcesContent": [" 3"], + "mappings": "+gAgAgAigA" +} diff --git a/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js new file mode 100644 index 00000000000000..0c879ce052ad95 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js @@ -0,0 +1,4 @@ + + + 3 +//# sourceMappingURL=vlq-valid-continuation-bit-present-2.js.map diff --git a/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js.map b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js.map new file mode 100644 index 00000000000000..a975cf8591ff6d --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["vlq-valid-continuation-bit-present-2-original.js"], + "sourcesContent": ["\n 3"], + "mappings": ";;gBACC" +} diff --git a/test/fixtures/test426/resources/vlq-valid-negative-digit.js b/test/fixtures/test426/resources/vlq-valid-negative-digit.js new file mode 100644 index 00000000000000..d8e795090effae --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-negative-digit.js @@ -0,0 +1,4 @@ + + + 4; 3 +//# sourceMappingURL=vlq-valid-negative-digit.js.map diff --git a/test/fixtures/test426/resources/vlq-valid-negative-digit.js.map b/test/fixtures/test426/resources/vlq-valid-negative-digit.js.map new file mode 100644 index 00000000000000..71dec0d65a1aa9 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-negative-digit.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["vlq-valid-negative-digit-original.js"], + "sourcesContent": ["\n 4;3"], + "mappings": ";;eACG,bAAF" +} diff --git a/test/fixtures/test426/resources/vlq-valid-single-digit.js b/test/fixtures/test426/resources/vlq-valid-single-digit.js new file mode 100644 index 00000000000000..54c59aae1fcb44 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-single-digit.js @@ -0,0 +1,2 @@ + 3 +//# sourceMappingURL=vlq-valid-single-digit.js.map diff --git a/test/fixtures/test426/resources/vlq-valid-single-digit.js.map b/test/fixtures/test426/resources/vlq-valid-single-digit.js.map new file mode 100644 index 00000000000000..9e35a7a0a6a591 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-single-digit.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["vlq-valid-single-digit-original.js"], + "sourcesContent": ["3"], + "mappings": "eAAA" +} diff --git a/test/fixtures/test426/source-map-spec-tests.json b/test/fixtures/test426/source-map-spec-tests.json new file mode 100644 index 00000000000000..bf3dc64ba5b9c9 --- /dev/null +++ b/test/fixtures/test426/source-map-spec-tests.json @@ -0,0 +1,1596 @@ +{ + "tests": [ + { + "name": "versionValid", + "description": "Test a simple source map with a valid version number", + "baseFile": "version-valid.js", + "sourceMapFile": "version-valid.js.map", + "sourceMapIsValid": true + }, + { + "name": "versionMissing", + "description": "Test a source map that is missing a version field", + "baseFile": "version-missing.js", + "sourceMapFile": "version-missing.js.map", + "sourceMapIsValid": false + }, + { + "name": "versionNotANumber", + "description": "Test a source map with a version field that is not a number", + "baseFile": "version-not-a-number.js", + "sourceMapFile": "version-not-a-number.js.map", + "sourceMapIsValid": false + }, + { + "name": "versionNumericString", + "description": "Test a source map with a version field that is a number as a string", + "baseFile": "version-numeric-string.js", + "sourceMapFile": "version-numeric-string.js.map", + "sourceMapIsValid": false + }, + { + "name": "versionTooHigh", + "description": "Test a source map with an integer version field that is too high", + "baseFile": "version-too-high.js", + "sourceMapFile": "version-too-high.js.map", + "sourceMapIsValid": false + }, + { + "name": "versionTooLow", + "description": "Test a source map with an integer version field that is too low", + "baseFile": "version-too-low.js", + "sourceMapFile": "version-too-low.js.map", + "sourceMapIsValid": false + }, + { + "name": "mappingsMissing", + "description": "Test a source map that is missing a necessary mappings field", + "baseFile": "mappings-missing.js", + "sourceMapFile": "mappings-missing.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesMissing", + "description": "Test a source map that is missing a necessary sources field", + "baseFile": "sources-missing.js", + "sourceMapFile": "sources-missing.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesNotAList1", + "description": "Test a source map with a sources field that is not a valid list (string)", + "baseFile": "sources-not-a-list-1.js", + "sourceMapFile": "sources-not-a-list-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesNotAList2", + "description": "Test a source map with a sources field that is not a valid list (object)", + "baseFile": "sources-not-a-list-2.js", + "sourceMapFile": "sources-not-a-list-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesNotStringOrNull", + "description": "Test a source map with a sources list that has non-string and non-null items", + "baseFile": "sources-not-string-or-null.js", + "sourceMapFile": "sources-not-string-or-null.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesContentMissing", + "description": "Test a source map that is missing an optional sourcesContent field", + "baseFile": "sources-content-missing.js", + "sourceMapFile": "sources-content-missing.js.map", + "sourceMapIsValid": true + }, + { + "name": "sourcesContentNotAList1", + "description": "Test a source map with a sourcesContent field that is not a valid list (string)", + "baseFile": "sources-content-not-a-list-1.js", + "sourceMapFile": "sources-content-not-a-list-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesContentNotAList2", + "description": "Test a source map with a sourcesContent field that is not a valid list (object)", + "baseFile": "sources-content-not-a-list-2.js", + "sourceMapFile": "sources-content-not-a-list-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesContentNotStringOrNull", + "description": "Test a source map with a sourcesContent list that has non-string and non-null items", + "baseFile": "sources-not-string-or-null.js", + "sourceMapFile": "sources-content-not-string-or-null.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesAndSourcesContentBothNull", + "description": "Test a source map that has both null sources and sourcesContent entries", + "baseFile": "sources-and-sources-content-both-null.js", + "sourceMapFile": "sources-and-sources-content-both-null.js.map", + "sourceMapIsValid": true + }, + { + "name": "fileNotAString1", + "description": "Test a source map with a file field that is not a valid string", + "baseFile": "file-not-a-string-1.js", + "sourceMapFile": "file-not-a-string-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "fileNotAString2", + "description": "Test a source map with a file field that is not a valid string", + "baseFile": "file-not-a-string-2.js", + "sourceMapFile": "file-not-a-string-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourceRootNotAString1", + "description": "Test a source map with a sourceRoot field that is not a valid string", + "baseFile": "source-root-not-a-string-1.js", + "sourceMapFile": "source-root-not-a-string-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourceRootNotAString2", + "description": "Test a source map with a sourceRoot field that is not a valid string", + "baseFile": "source-root-not-a-string-2.js", + "sourceMapFile": "source-root-not-a-string-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "namesMissing", + "description": "Test a source map that is missing the optional names field", + "baseFile": "names-missing.js", + "sourceMapFile": "names-missing.js.map", + "sourceMapIsValid": true + }, + { + "name": "namesNotAList1", + "description": "Test a source map with a names field that is not a valid list (string)", + "baseFile": "names-not-a-list-1.js", + "sourceMapFile": "names-not-a-list-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "namesNotAList2", + "description": "Test a source map with a names field that is not a valid list (object)", + "baseFile": "names-not-a-list-2.js", + "sourceMapFile": "names-not-a-list-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "namesNotString", + "description": "Test a source map with a names list that has non-string items", + "baseFile": "names-not-string.js", + "sourceMapFile": "names-not-string.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListEmpty", + "description": "Test a source map with an ignore list that has no items", + "baseFile": "ignore-list-empty.js", + "sourceMapFile": "ignore-list-empty.js.map", + "sourceMapIsValid": true + }, + { + "name": "ignoreListValid1", + "description": "Test a source map with a simple valid ignore list", + "baseFile": "ignore-list-valid-1.js", + "sourceMapFile": "ignore-list-valid-1.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkIgnoreList", + "present": ["empty-original.js"] + } + ] + }, + { + "name": "ignoreListWrongType1", + "description": "Test a source map with an ignore list with the wrong type of items", + "baseFile": "ignore-list-wrong-type-1.js", + "sourceMapFile": "ignore-list-wrong-type-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListWrongType2", + "description": "Test a source map with an ignore list with the wrong type of items", + "baseFile": "ignore-list-wrong-type-2.js", + "sourceMapFile": "ignore-list-wrong-type-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListWrongType3", + "description": "Test a source map with an ignore list that is not a list", + "baseFile": "ignore-list-wrong-type-3.js", + "sourceMapFile": "ignore-list-wrong-type-3.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListWrongType4", + "description": "Test a source map with an ignore list with a negative index", + "baseFile": "ignore-list-wrong-type-4.js", + "sourceMapFile": "ignore-list-wrong-type-4.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListOutOfBounds1", + "description": "Test a source map with an ignore list with an item with an out-of-bounds index (too big)", + "baseFile": "ignore-list-out-of-bounds-1.js", + "sourceMapFile": "ignore-list-out-of-bounds-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListOutOfBounds2", + "description": "Test a source map with an ignore list with an item with an out-of-bounds index (too low)", + "baseFile": "ignore-list-out-of-bounds-2.js", + "sourceMapFile": "ignore-list-out-of-bounds-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "unrecognizedProperty", + "description": "Test a source map that has an extra field not explicitly encoded in the spec", + "baseFile": "unrecognized-property.js", + "sourceMapFile": "unrecognized-property.js.map", + "sourceMapIsValid": true + }, + { + "name": "invalidVLQDueToNonBase64Character", + "description": "Test a source map that has a mapping with an invalid non-base64 character", + "baseFile": "invalid-vlq-non-base64-char.js", + "sourceMapFile": "invalid-vlq-non-base64-char.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidVLQDueToNonBase64CharacterPadding", + "description": "Test a source map that has a mapping with an invalid padding character =", + "baseFile": "invalid-vlq-non-base64-char-padding.js", + "sourceMapFile": "invalid-vlq-non-base64-char-padding.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidVLQDueToMissingContinuationDigits", + "description": "Test a source map that has a mapping with an invalid VLQ that has a continuation bit but no continuing digits", + "baseFile": "invalid-vlq-missing-continuation.js", + "sourceMapFile": "invalid-vlq-missing-continuation.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingNotAString1", + "description": "Test a source map that has an invalid mapping that is not a string (number)", + "baseFile": "invalid-mapping-not-a-string-1.js", + "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingNotAString2", + "description": "Test a source map that has an invalid mapping that is not a string (array)", + "baseFile": "invalid-mapping-not-a-string-2.js", + "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentBadSeparator", + "description": "Test a source map that uses separator characters not recognized in the spec", + "baseFile": "invalid-mapping-bad-separator.js", + "sourceMapFile": "invalid-mapping-bad-separator.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithZeroFields", + "description": "Test a source map that has the wrong number (zero) of segments fields", + "baseFile": "invalid-mapping-segment-with-zero-fields.js", + "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithTwoFields", + "description": "Test a source map that has the wrong number (two) of segments fields", + "baseFile": "invalid-mapping-segment-with-two-fields.js", + "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithThreeFields", + "description": "Test a source map that has the wrong number (three) of segments fields", + "baseFile": "invalid-mapping-segment-with-three-fields.js", + "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", + "description": "Test a source map that has a source index field that is out of bounds of the sources field", + "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", + "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNameIndexOutOfBounds", + "description": "Test a source map that has a name index field that is out of bounds of the names field", + "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", + "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeColumn", + "description": "Test a source map that has an invalid negative non-relative column field", + "baseFile": "invalid-mapping-segment-negative-column.js", + "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeSourceIndex", + "description": "Test a source map that has an invalid negative non-relative source index field", + "baseFile": "invalid-mapping-segment-negative-source-index.js", + "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeOriginalLine", + "description": "Test a source map that has an invalid negative non-relative original line field", + "baseFile": "invalid-mapping-segment-negative-original-line.js", + "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeOriginalColumn", + "description": "Test a source map that has an invalid negative non-relative original column field", + "baseFile": "invalid-mapping-segment-negative-original-column.js", + "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeNameIndex", + "description": "Test a source map that has an invalid negative non-relative name index field", + "baseFile": "invalid-mapping-segment-negative-name-index.js", + "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeColumn", + "description": "Test a source map that has an invalid negative relative column field", + "baseFile": "invalid-mapping-segment-negative-relative-column.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeSourceIndex", + "description": "Test a source map that has an invalid negative relative source index field", + "baseFile": "invalid-mapping-segment-negative-relative-source-index.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-source-index.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeOriginalLine", + "description": "Test a source map that has an invalid negative relative original line field", + "baseFile": "invalid-mapping-segment-negative-relative-original-line.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-original-line.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeOriginalColumn", + "description": "Test a source map that has an invalid negative relative original column field", + "baseFile": "invalid-mapping-segment-negative-relative-original-column.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-original-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeNameIndex", + "description": "Test a source map that has an invalid negative relative name index field", + "baseFile": "invalid-mapping-segment-negative-relative-name-index.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-name-index.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithColumnExceeding32Bits", + "description": "Test a source map that has a column field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-column-too-large.js", + "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", + "description": "Test a source map that has a source index field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-source-index-too-large.js", + "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", + "description": "Test a source map that has a original line field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-original-line-too-large.js", + "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", + "description": "Test a source map that has an original column field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-original-column-too-large.js", + "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", + "description": "Test a source map that has a name index field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-name-index-too-large.js", + "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "validMappingFieldsWith32BitMaxValues", + "description": "Test a source map that has segment fields with max values representable in 32 bits", + "baseFile": "valid-mapping-boundary-values.js", + "sourceMapFile": "valid-mapping-boundary-values.js.map", + "sourceMapIsValid": true + }, + { + "name": "validMappingLargeVLQ", + "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", + "baseFile": "valid-mapping-large-vlq.js", + "sourceMapFile": "valid-mapping-large-vlq.js.map", + "sourceMapIsValid": true + }, + { + "name": "validMappingEmptyGroups", + "description": "Test a source map with a mapping that has many empty groups", + "baseFile": "valid-mapping-empty-groups.js", + "sourceMapFile": "valid-mapping-empty-groups.js.map", + "sourceMapIsValid": true + }, + { + "name": "validMappingEmptyString", + "description": "Test a source map with an empty string mapping", + "baseFile": "valid-mapping-empty-string.js", + "sourceMapFile": "valid-mapping-empty-string.js.map", + "sourceMapIsValid": true + }, + { + "name": "indexMapWrongTypeSections", + "description": "Test an index map with a sections field with the wrong type", + "baseFile": "index-map-wrong-type-sections.js", + "sourceMapFile": "index-map-wrong-type-sections.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapWrongTypeOffset", + "description": "Test an index map with an offset field with the wrong type", + "baseFile": "index-map-wrong-type-offset.js", + "sourceMapFile": "index-map-wrong-type-offset.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapWrongTypeMap", + "description": "Test an index map with a map field with the wrong type", + "baseFile": "index-map-wrong-type-map.js", + "sourceMapFile": "index-map-wrong-type-map.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapInvalidBaseMappings", + "description": "Test that an index map cannot also have a regular mappings field", + "baseFile": "index-map-invalid-base-mappings.js", + "sourceMapFile": "index-map-invalid-base-mappings.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapInvalidOverlap", + "description": "Test that an invalid index map with multiple sections that overlap", + "baseFile": "index-map-invalid-overlap.js", + "sourceMapFile": "index-map-invalid-overlap.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapInvalidOrder", + "description": "Test that an invalid index map with multiple sections in the wrong order", + "baseFile": "index-map-invalid-order.js", + "sourceMapFile": "index-map-invalid-order.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapMissingMap", + "description": "Test that an index map that is missing a section map", + "baseFile": "index-map-missing-map.js", + "sourceMapFile": "index-map-missing-map.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapInvalidSubMap", + "description": "Test that an index map that has an invalid section map", + "baseFile": "index-map-invalid-sub-map.js", + "sourceMapFile": "index-map-invalid-sub-map.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapMissingOffset", + "description": "Test that an index map that is missing a section offset", + "baseFile": "index-map-missing-offset.js", + "sourceMapFile": "index-map-missing-offset.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapMissingOffsetLine", + "description": "Test that an index map that is missing a section offset's line field", + "baseFile": "index-map-missing-offset-line.js", + "sourceMapFile": "index-map-missing-offset-line.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapMissingOffsetColumn", + "description": "Test that an index map that is missing a section offset's column field", + "baseFile": "index-map-missing-offset-column.js", + "sourceMapFile": "index-map-missing-offset-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapOffsetLineWrongType", + "description": "Test that an index map that has an offset line field with the wrong type of value", + "baseFile": "index-map-offset-line-wrong-type.js", + "sourceMapFile": "index-map-offset-line-wrong-type.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapOffsetColumnWrongType", + "description": "Test that an index map that has an offset column field with the wrong type of value", + "baseFile": "index-map-offset-column-wrong-type.js", + "sourceMapFile": "index-map-offset-column-wrong-type.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapEmptySections", + "description": "Test a trivial index map with no sections", + "baseFile": "index-map-empty-sections.js", + "sourceMapFile": "index-map-empty-sections.js.map", + "sourceMapIsValid": true + }, + { + "name": "indexMapFileWrongType1", + "description": "Test an index map with a file field with the wrong type", + "baseFile": "index-map-file-wrong-type-1.js", + "sourceMapFile": "index-map-file-wrong-type-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapFileWrongType2", + "description": "Test an index map with a file field with the wrong type", + "baseFile": "index-map-file-wrong-type-2.js", + "sourceMapFile": "index-map-file-wrong-type-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "basicMapping", + "description": "Test a simple source map that has several valid mappings", + "baseFile": "basic-mapping.js", + "sourceMapFile": "basic-mapping.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 15, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 22, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 24, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 25, + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 34, + "originalSource": "basic-mapping-original.js", + "originalLine": 3, + "originalColumn": 9, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 40, + "originalLine": 4, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 47, + "originalLine": 4, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 49, + "originalLine": 5, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 50, + "originalLine": 6, + "originalColumn": 0, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 56, + "originalLine": 7, + "originalColumn": 0, + "mappedName": "bar" + } + ] + }, + { + "name": "sourceRootResolution", + "description": "Similar to basic mapping test, but test resoultion of sources with a sourceRoot field", + "baseFile": "source-root-resolution.js", + "sourceMapFile": "source-root-resolution.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "theroot/basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "theroot/basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + } + ] + }, + { + "name": "sourceResolutionAbsoluteURL", + "description": "Test resoultion of sources with absolute URLs", + "baseFile": "source-resolution-absolute-url.js", + "sourceMapFile": "source-resolution-absolute-url.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "/baz/quux/basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "/baz/quux/basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + } + ] + }, + { + "name": "basicMappingWithIndexMap", + "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", + "baseFile": "basic-mapping-as-index-map.js", + "sourceMapFile": "basic-mapping-as-index-map.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 15, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 22, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 24, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 25, + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 34, + "originalSource": "basic-mapping-original.js", + "originalLine": 3, + "originalColumn": 9, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 40, + "originalLine": 4, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 47, + "originalLine": 4, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 49, + "originalLine": 5, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 50, + "originalLine": 6, + "originalColumn": 0, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 56, + "originalLine": 7, + "originalColumn": 0, + "mappedName": "bar" + } + ] + }, + { + "name": "indexMapWithMissingFile", + "description": "Same as the basic mapping index map test but without the optional file field", + "baseFile": "index-map-missing-file.js", + "sourceMapFile": "index-map-missing-file.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 15, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 22, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 24, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 25, + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 34, + "originalSource": "basic-mapping-original.js", + "originalLine": 3, + "originalColumn": 9, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 40, + "originalLine": 4, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 47, + "originalLine": 4, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 49, + "originalLine": 5, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 50, + "originalLine": 6, + "originalColumn": 0, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 56, + "originalLine": 7, + "originalColumn": 0, + "mappedName": "bar" + } + ] + }, + { + "name": "indexMapWithTwoConcatenatedSources", + "description": "Test an index map that has two sub-maps for concatenated sources", + "baseFile": "index-map-two-concatenated-sources.js", + "sourceMapFile": "index-map-two-concatenated-sources.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 15, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 22, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 24, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 25, + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 34, + "originalSource": "basic-mapping-original.js", + "originalLine": 3, + "originalColumn": 9, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 40, + "originalLine": 4, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 47, + "originalLine": 4, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 49, + "originalLine": 5, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 50, + "originalLine": 6, + "originalColumn": 0, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 56, + "originalLine": 7, + "originalColumn": 0, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 62, + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 71, + "originalLine": 0, + "originalColumn": 9, + "mappedName": "baz" + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 77, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 83, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 88, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 89, + "originalLine": 3, + "originalColumn": 0, + "mappedName": "baz" + } + ] + }, + { + "name": "sourcesNullSourcesContentNonNull", + "description": "Test a source map that has a null source but has a sourcesContent", + "baseFile": "sources-null-sources-content-non-null.js", + "sourceMapFile": "sources-null-sources-content-non-null.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": null, + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": null, + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + } + ] + }, + { + "name": "sourcesNonNullSourcesContentNull", + "description": "Test a source map that has a non-null source but has a null sourcesContent", + "baseFile": "sources-non-null-sources-content-null.js", + "sourceMapFile": "sources-non-null-sources-content-null.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + } + ] + }, + { + "name": "transitiveMapping", + "description": "Test a simple two-stage transitive mapping from a minified JS to a TypeScript source", + "baseFile": "transitive-mapping.js", + "sourceMapFile": "transitive-mapping.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 13, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 13, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 16, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 2, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 23, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 2, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 24, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 25, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 4, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 29, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 4, + "originalColumn": 4, + "mappedName": null + } + ] + }, + { + "name": "transitiveMappingWithThreeSteps", + "description": "Test a three-stage transitive mapping from an un-minified JS to minified JS to a TypeScript source", + "baseFile": "transitive-mapping-three-steps.js", + "sourceMapFile": "transitive-mapping-three-steps.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 13, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 13, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 1, + "generatedColumn": 4, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 2, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 1, + "generatedColumn": 11, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 2, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 2, + "generatedColumn": 0, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 4, + "generatedColumn": 0, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 4, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 4, + "generatedColumn": 4, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 4, + "originalColumn": 4, + "mappedName": null + } + ] + }, + { + "name": "vlqValidSingleDigit", + "description": "Test VLQ decoding for a single digit, no continuation VLQ", + "baseFile": "vlq-valid-single-digit.js", + "sourceMapFile": "vlq-valid-single-digit.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 15, + "originalSource": "vlq-valid-single-digit-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + } + ] + }, + { + "name": "vlqValidNegativeDigit", + "description": "Test VLQ decoding where there's a negative digit, no continuation bit", + "baseFile": "vlq-valid-negative-digit.js", + "sourceMapFile": "vlq-valid-negative-digit.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 2, + "generatedColumn": 15, + "originalSource": "vlq-valid-negative-digit-original.js", + "originalLine": 1, + "originalColumn": 3, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 2, + "generatedColumn": 2, + "originalSource": "vlq-valid-negative-digit-original.js", + "originalLine": 1, + "originalColumn": 1, + "mappedName": null + } + ] + }, + { + "name": "vlqValidContinuationBitPresent1", + "description": "Test VLQ decoding where continuation bits are present (continuations are leading zero)", + "baseFile": "vlq-valid-continuation-bit-present-1.js", + "sourceMapFile": "vlq-valid-continuation-bit-present-1.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 15, + "originalSource": "vlq-valid-continuation-bit-present-1-original.js", + "originalLine": 0, + "originalColumn": 1, + "mappedName": null + } + ] + }, + { + "name": "vlqValidContinuationBitPresent2", + "description": "Test VLQ decoding where continuation bits are present (continuations have non-zero bits)", + "baseFile": "vlq-valid-continuation-bit-present-2.js", + "sourceMapFile": "vlq-valid-continuation-bit-present-2.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 2, + "generatedColumn": 16, + "originalSource": "vlq-valid-continuation-bit-present-2-original.js", + "originalLine": 1, + "originalColumn": 1, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsSingleFieldSegment", + "description": "Test mapping semantics for a single field segment mapping", + "baseFile": "mapping-semantics-single-field-segment.js", + "sourceMapFile": "mapping-semantics-single-field-segment.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "mapping-semantics-single-field-segment-original.js", + "originalLine": 0, + "originalColumn": 1, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 2, + "originalSource": null, + "originalLine": null, + "originalColumn": null, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsFourFieldSegment", + "description": "Test mapping semantics for a four field segment mapping", + "baseFile": "mapping-semantics-four-field-segment.js", + "sourceMapFile": "mapping-semantics-four-field-segment.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-four-field-segment-original.js", + "originalLine": 2, + "originalColumn": 2, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsFiveFieldSegment", + "description": "Test mapping semantics for a five field segment mapping", + "baseFile": "mapping-semantics-five-field-segment.js", + "sourceMapFile": "mapping-semantics-five-field-segment.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-five-field-segment-original.js", + "originalLine": 2, + "originalColumn": 2, + "mappedName": "foo" + } + ] + }, + { + "name": "mappingSemanticsColumnReset", + "description": "Test that the generated column field resets to zero on new lines", + "baseFile": "mapping-semantics-column-reset.js", + "sourceMapFile": "mapping-semantics-column-reset.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-column-reset-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 1, + "generatedColumn": 1, + "originalSource": "mapping-semantics-column-reset-original.js", + "originalLine": 1, + "originalColumn": 0, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsRelative1", + "description": "Test that fields are calculated relative to previous ones", + "baseFile": "mapping-semantics-relative-1.js", + "sourceMapFile": "mapping-semantics-relative-1.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-relative-1-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 5, + "originalSource": "mapping-semantics-relative-1-original.js", + "originalLine": 0, + "originalColumn": 4, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsRelative2", + "description": "Test that fields are calculated relative to previous ones, across lines", + "baseFile": "mapping-semantics-relative-2.js", + "sourceMapFile": "mapping-semantics-relative-2.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-relative-2-original.js", + "originalLine": 0, + "originalColumn": 2, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "generatedLine": 1, + "generatedColumn": 2, + "originalSource": "mapping-semantics-relative-2-original.js", + "originalLine": 1, + "originalColumn": 2, + "mappedName": "bar" + } + ] + } + ] +} diff --git a/test/fixtures/test426/webkit/0001-Add-test-runner-for-the-source-map-spec-tests.patch b/test/fixtures/test426/webkit/0001-Add-test-runner-for-the-source-map-spec-tests.patch new file mode 100644 index 00000000000000..9ba9f695a7b180 --- /dev/null +++ b/test/fixtures/test426/webkit/0001-Add-test-runner-for-the-source-map-spec-tests.patch @@ -0,0 +1,11542 @@ +From bcb0accac37b7fe585a01cd7de7f6c91e5704426 Mon Sep 17 00:00:00 2001 +From: Asumu Takikawa +Date: Mon, 11 Mar 2024 13:41:31 -0700 +Subject: [PATCH] Add test runner for the source map spec tests + +Need the bug URL (OOPS!). + +Reviewed by NOBODY (OOPS!). + +This patch adds a layout test for the inspector using the imported spec +tests from TG4 for the current Source Map specification: + + https://github.com/tc39/source-map + https://github.com/tc39/source-map-tests + +It also adds the tests themselves as imported tests under +`LayoutTests/imported`. + +* LayoutTests/imported/tg4/source-map-tests/LICENSE.md: Added. +* LayoutTests/imported/tg4/source-map-tests/README.WebKit: Added. +* LayoutTests/imported/tg4/source-map-tests/README.md: Added. +* LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch: Added. +* LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch: Added. +* LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch: Added. +* LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js: Added. +(async checkValidity): +(async checkMapping): +(const.testCase.of.testDescriptions.tests.const.testFunction.async const): +(const.testCase.of.testDescriptions.tests.const.testFunction.testCase.name): +(read): +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js: Added. +(foo): +(bar): +(baz): +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js: Added. +(baz): +* LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js: Added. +(foo): +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js: Added. +(foo): +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js: Added. +(foo): +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json: Added. +* LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch: Added. +* LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html: Added. +* LayoutTests/inspector/model/source-map-spec-expected.txt: Added. +* LayoutTests/inspector/model/source-map-spec.html: Added. +--- + .../imported/tg4/source-map-tests/LICENSE.md | 14 + + .../tg4/source-map-tests/README.WebKit | 1 + + .../imported/tg4/source-map-tests/README.md | 176 + + ...1-Add-source-map-specification-tests.patch | 3867 +++++++++++++++++ + ...002-Add-reverse-mapping-code-to-test.patch | 46 + + ...01-WIP-Firefox-source-map-spec-tests.patch | 337 ++ + .../firefox/browser_spec-source-map.js | 71 + + .../resources/basic-mapping-as-index-map.js | 2 + + .../basic-mapping-as-index-map.js.map | 15 + + .../resources/basic-mapping-original.js | 8 + + .../resources/basic-mapping.js | 2 + + .../resources/basic-mapping.js.map | 6 + + .../resources/file-not-a-string-1.js | 1 + + .../resources/file-not-a-string-1.js.map | 8 + + .../resources/file-not-a-string-2.js | 1 + + .../resources/file-not-a-string-2.js.map | 8 + + .../resources/ignore-list-empty.js | 1 + + .../resources/ignore-list-empty.js.map | 8 + + .../resources/ignore-list-out-of-bounds-1.js | 1 + + .../ignore-list-out-of-bounds-1.js.map | 8 + + .../resources/ignore-list-out-of-bounds-2.js | 1 + + .../ignore-list-out-of-bounds-2.js.map | 8 + + .../resources/ignore-list-valid-1.js | 1 + + .../resources/ignore-list-valid-1.js.map | 8 + + .../resources/ignore-list-wrong-type-1.js | 1 + + .../resources/ignore-list-wrong-type-1.js.map | 8 + + .../resources/ignore-list-wrong-type-2.js | 1 + + .../resources/ignore-list-wrong-type-2.js.map | 8 + + .../resources/ignore-list-wrong-type-3.js | 1 + + .../resources/ignore-list-wrong-type-3.js.map | 8 + + .../resources/ignore-list-wrong-type-4.js | 1 + + .../resources/ignore-list-wrong-type-4.js.map | 8 + + .../resources/index-map-empty-sections.js | 1 + + .../resources/index-map-empty-sections.js.map | 4 + + .../resources/index-map-file-wrong-type-1.js | 2 + + .../index-map-file-wrong-type-1.js.map | 15 + + .../resources/index-map-file-wrong-type-2.js | 2 + + .../index-map-file-wrong-type-2.js.map | 15 + + .../index-map-invalid-base-mappings.js | 1 + + .../index-map-invalid-base-mappings.js.map | 15 + + .../resources/index-map-invalid-order.js | 1 + + .../resources/index-map-invalid-order.js.map | 23 + + .../resources/index-map-invalid-overlap.js | 1 + + .../index-map-invalid-overlap.js.map | 23 + + .../resources/index-map-invalid-sub-map.js | 1 + + .../index-map-invalid-sub-map.js.map | 13 + + .../resources/index-map-missing-file.js | 2 + + .../resources/index-map-missing-file.js.map | 14 + + .../resources/index-map-missing-map.js | 1 + + .../resources/index-map-missing-map.js.map | 8 + + .../index-map-missing-offset-column.js | 1 + + .../index-map-missing-offset-column.js.map | 14 + + .../index-map-missing-offset-line.js | 1 + + .../index-map-missing-offset-line.js.map | 14 + + .../resources/index-map-missing-offset.js | 1 + + .../resources/index-map-missing-offset.js.map | 13 + + .../index-map-offset-column-wrong-type.js | 1 + + .../index-map-offset-column-wrong-type.js.map | 14 + + .../index-map-offset-line-wrong-type.js | 1 + + .../index-map-offset-line-wrong-type.js.map | 14 + + .../index-map-two-concatenated-sources.js | 2 + + .../index-map-two-concatenated-sources.js.map | 24 + + .../resources/index-map-wrong-type-map.js | 1 + + .../resources/index-map-wrong-type-map.js.map | 9 + + .../resources/index-map-wrong-type-offset.js | 1 + + .../index-map-wrong-type-offset.js.map | 14 + + .../index-map-wrong-type-sections.js | 1 + + .../index-map-wrong-type-sections.js.map | 4 + + .../invalid-mapping-bad-separator.js | 2 + + .../invalid-mapping-bad-separator.js.map | 6 + + .../invalid-mapping-not-a-string-1.js | 1 + + .../invalid-mapping-not-a-string-1.js.map | 7 + + .../invalid-mapping-not-a-string-2.js | 1 + + .../invalid-mapping-not-a-string-2.js.map | 7 + + ...nvalid-mapping-segment-column-too-large.js | 1 + + ...id-mapping-segment-column-too-large.js.map | 7 + + ...apping-segment-name-index-out-of-bounds.js | 1 + + ...ng-segment-name-index-out-of-bounds.js.map | 7 + + ...id-mapping-segment-name-index-too-large.js | 1 + + ...apping-segment-name-index-too-large.js.map | 7 + + ...invalid-mapping-segment-negative-column.js | 1 + + ...lid-mapping-segment-negative-column.js.map | 7 + + ...lid-mapping-segment-negative-name-index.js | 1 + + ...mapping-segment-negative-name-index.js.map | 7 + + ...apping-segment-negative-original-column.js | 1 + + ...ng-segment-negative-original-column.js.map | 7 + + ...-mapping-segment-negative-original-line.js | 1 + + ...ping-segment-negative-original-line.js.map | 7 + + ...apping-segment-negative-relative-column.js | 1 + + ...ng-segment-negative-relative-column.js.map | 8 + + ...ng-segment-negative-relative-name-index.js | 1 + + ...egment-negative-relative-name-index.js.map | 8 + + ...gment-negative-relative-original-column.js | 1 + + ...t-negative-relative-original-column.js.map | 8 + + ...segment-negative-relative-original-line.js | 1 + + ...ent-negative-relative-original-line.js.map | 8 + + ...-segment-negative-relative-source-index.js | 1 + + ...ment-negative-relative-source-index.js.map | 8 + + ...d-mapping-segment-negative-source-index.js | 1 + + ...pping-segment-negative-source-index.js.map | 7 + + ...pping-segment-original-column-too-large.js | 1 + + ...g-segment-original-column-too-large.js.map | 7 + + ...mapping-segment-original-line-too-large.js | 1 + + ...ing-segment-original-line-too-large.js.map | 7 + + ...ping-segment-source-index-out-of-bounds.js | 1 + + ...-segment-source-index-out-of-bounds.js.map | 7 + + ...-mapping-segment-source-index-too-large.js | 1 + + ...ping-segment-source-index-too-large.js.map | 7 + + ...valid-mapping-segment-with-three-fields.js | 2 + + ...d-mapping-segment-with-three-fields.js.map | 6 + + ...invalid-mapping-segment-with-two-fields.js | 2 + + ...lid-mapping-segment-with-two-fields.js.map | 6 + + ...nvalid-mapping-segment-with-zero-fields.js | 1 + + ...id-mapping-segment-with-zero-fields.js.map | 7 + + .../invalid-vlq-missing-continuation.js | 1 + + .../invalid-vlq-missing-continuation.js.map | 6 + + .../resources/invalid-vlq-non-base64-char.js | 1 + + .../invalid-vlq-non-base64-char.js.map | 6 + + .../mapping-semantics-column-reset.js | 3 + + .../mapping-semantics-column-reset.js.map | 7 + + .../mapping-semantics-five-field-segment.js | 2 + + ...apping-semantics-five-field-segment.js.map | 7 + + .../mapping-semantics-four-field-segment.js | 2 + + ...apping-semantics-four-field-segment.js.map | 7 + + .../resources/mapping-semantics-relative-1.js | 2 + + .../mapping-semantics-relative-1.js.map | 7 + + .../resources/mapping-semantics-relative-2.js | 3 + + .../mapping-semantics-relative-2.js.map | 7 + + .../mapping-semantics-single-field-segment.js | 2 + + ...ping-semantics-single-field-segment.js.map | 7 + + .../resources/names-missing.js | 1 + + .../resources/names-missing.js.map | 6 + + .../resources/names-not-a-list-1.js | 1 + + .../resources/names-not-a-list-1.js.map | 6 + + .../resources/names-not-a-list-2.js | 1 + + .../resources/names-not-a-list-2.js.map | 6 + + .../resources/names-not-string.js | 1 + + .../resources/names-not-string.js.map | 6 + + .../resources/second-source-original.js | 4 + + .../source-resolution-absolute-url.js | 2 + + .../source-resolution-absolute-url.js.map | 8 + + .../resources/source-root-not-a-string-1.js | 1 + + .../source-root-not-a-string-1.js.map | 8 + + .../resources/source-root-not-a-string-2.js | 1 + + .../source-root-not-a-string-2.js.map | 8 + + .../resources/source-root-resolution.js | 2 + + .../resources/source-root-resolution.js.map | 9 + + .../sources-and-sources-content-both-null.js | 1 + + ...urces-and-sources-content-both-null.js.map | 7 + + .../resources/sources-missing.js | 1 + + .../resources/sources-missing.js.map | 5 + + .../sources-non-null-sources-content-null.js | 2 + + ...urces-non-null-sources-content-null.js.map | 7 + + .../resources/sources-not-a-list-1.js | 1 + + .../resources/sources-not-a-list-1.js.map | 6 + + .../resources/sources-not-a-list-2.js | 1 + + .../resources/sources-not-a-list-2.js.map | 6 + + .../resources/sources-not-string-or-null.js | 1 + + .../sources-not-string-or-null.js.map | 6 + + .../sources-null-sources-content-non-null.js | 2 + + ...urces-null-sources-content-non-null.js.map | 7 + + .../resources/transitive-mapping-original.js | 5 + + .../transitive-mapping-original.js.map | 8 + + .../transitive-mapping-three-steps.js | 6 + + .../transitive-mapping-three-steps.js.map | 7 + + .../resources/transitive-mapping.js | 2 + + .../resources/transitive-mapping.js.map | 6 + + .../resources/typescript-original.ts | 5 + + .../resources/unrecognized-property.js | 1 + + .../resources/unrecognized-property.js.map | 8 + + .../valid-mapping-boundary-values.js | 1 + + .../valid-mapping-boundary-values.js.map | 7 + + .../resources/valid-mapping-empty-groups.js | 1 + + .../valid-mapping-empty-groups.js.map | 8 + + .../resources/valid-mapping-empty-string.js | 1 + + .../valid-mapping-empty-string.js.map | 8 + + .../resources/valid-mapping-large-vlq.js | 1 + + .../resources/valid-mapping-large-vlq.js.map | 6 + + .../resources/version-missing.js | 1 + + .../resources/version-missing.js.map | 5 + + .../resources/version-not-a-number.js | 1 + + .../resources/version-not-a-number.js.map | 6 + + .../resources/version-numeric-string.js | 1 + + .../resources/version-numeric-string.js.map | 6 + + .../resources/version-too-high.js | 1 + + .../resources/version-too-high.js.map | 6 + + .../resources/version-too-low.js | 1 + + .../resources/version-too-low.js.map | 6 + + .../resources/version-valid.js | 1 + + .../resources/version-valid.js.map | 6 + + .../vlq-valid-continuation-bit-present-1.js | 2 + + ...lq-valid-continuation-bit-present-1.js.map | 7 + + .../vlq-valid-continuation-bit-present-2.js | 4 + + ...lq-valid-continuation-bit-present-2.js.map | 7 + + .../resources/vlq-valid-negative-digit.js | 4 + + .../resources/vlq-valid-negative-digit.js.map | 7 + + .../resources/vlq-valid-single-digit.js | 2 + + .../resources/vlq-valid-single-digit.js.map | 7 + + .../source-map-spec-tests.json | 1554 +++++++ + ...d-harness-for-source-maps-spec-tests.patch | 1649 +++++++ + .../webkit/source-map-spec.html | 83 + + .../model/source-map-spec-expected.txt | 828 ++++ + .../inspector/model/source-map-spec.html | 87 + + 203 files changed, 9653 insertions(+) + create mode 100644 LayoutTests/imported/tg4/source-map-tests/LICENSE.md + create mode 100644 LayoutTests/imported/tg4/source-map-tests/README.WebKit + create mode 100644 LayoutTests/imported/tg4/source-map-tests/README.md + create mode 100644 LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch + create mode 100644 LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch + create mode 100644 LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch + create mode 100644 LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json + create mode 100644 LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch + create mode 100644 LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html + create mode 100644 LayoutTests/inspector/model/source-map-spec-expected.txt + create mode 100644 LayoutTests/inspector/model/source-map-spec.html + +diff --git a/LayoutTests/imported/tg4/source-map-tests/LICENSE.md b/LayoutTests/imported/tg4/source-map-tests/LICENSE.md +new file mode 100644 +index 000000000000..39501a3b7c70 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/LICENSE.md +@@ -0,0 +1,14 @@ ++The Source Map Tests suite ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://www.ecma-international.org/ipr FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS*. ++ ++Copyright (c) 2024, Ecma International ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ++ ++1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. ++2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. ++3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++* Ecma International Standards hereafter means Ecma International Standards as well as Ecma Technical Reports +diff --git a/LayoutTests/imported/tg4/source-map-tests/README.WebKit b/LayoutTests/imported/tg4/source-map-tests/README.WebKit +new file mode 100644 +index 000000000000..9d6cf4b7fb68 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/README.WebKit +@@ -0,0 +1 @@ ++FIXME +diff --git a/LayoutTests/imported/tg4/source-map-tests/README.md b/LayoutTests/imported/tg4/source-map-tests/README.md +new file mode 100644 +index 000000000000..a8bb3947c435 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/README.md +@@ -0,0 +1,176 @@ ++# Source Map Tests ++ ++This repository holds testing discussions and tests for the the Source Map debugging format. Specifically, we're looking to encourage discussion around: ++ ++- Manual and automated testing strategies for Source Maps ++- Gathering a list of Soure Map generators and consumers ++- General discussion around deviations between source maps ++ ++Open discussion happens in the [GitHub issues](https://github.com/source-map/source-map-tests/issues). ++ ++Source Map spec: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# ++ ++## Test cases ++ ++These test cases are still a work-in-progress 🚧. ++ ++#### Running the tests ++ ++How to run in WebKit: ++ * Check out [WebKit](https://github.com/WebKit/WebKit/) ++ * `cd` to the checked out WebKit directory. ++ * Run `git am /webkit/0001-Add-harness-for-source-maps-spec-tests.patch` ++ * Run `Tools/Scripts/build-webkit` (depending on the platform you may need to pass `--gtk` or other flags) ++ * Run `Tools/Scripts/run-webkit-tests LayoutTests/inspector/model/source-map-spec.html` (again, you may need `--gtk` on Linux) ++ ++For Firefox, see the Mozilla [source-map](https://github.com/mozilla/source-map) library: ++ * There is a [branch](https://github.com/takikawa/source-map/tree/add-spec-tests) for adding the spec tests to the package. ++ ++How to run in Chrome Devtools: ++1. Setup: ++ * Install depot_tools following this [depot_tools guide](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) ++ * Check out [Chrome Devtools](https://chromium.googlesource.com/devtools/devtools-frontend): ++ * Run `gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged` ++ * Run `cd devtools-frontend` ++ * Run `gclient sync` ++ * Run `gn gen out/Default` ++2. Build: ++ * Run `autoninja -C out/Default` ++3. Test: ++ * Run `npm run auto-unittest` ++4. Apply patches from this repo: ++ * Run `git apply ` in `devtools-frontend` repo ++ ++More information about running Chrome Devtools without building Chromium can be found [here](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/chromium/3965/README.md) ++ ++### Goals of tests ++ ++* Thoroughly test all aspects of the source maps spec that can be tested. ++* Strictly follow the spec when determining test behavior. ++ ++### Test coverage ++ ++#### Core spec ++ ++* Encoding ++ - [ ] Source map must be a valid JSON document. ++ - Base64 VLQ ++ * VLQs should decode correctly ++ - [X] A VLQ with a non-base64 character will fail to decode. ++ - [ ] A VLQ with one digit and no continuation digits should decode. ++ - [ ] A negative VLQ with the sign bit set to 1 should decode. ++ - [ ] A VLQ with non-zero continuation bits (and more than one digit) should decode. ++ - [X] A VLQ with a non-zero continuation bit with no further digits should fail to decode. ++ - [ ] A VLQ should decode with the correct order of digits (least to most significant). ++ - [x] A long VLQ with many trailing zero digits will decode. ++ * [x] A VLQ exceeding the 32-bit size limit is invalid (note: the spec is unclear on the details of this limit) ++ * [x] A VLQ at exactly the 32-bit size limit should be decoded (positive and negative). ++* Basic format ++ - `version` field ++ * [X] Must be present ++ * [X] Must be a number ++ * [X] Must be 3 ++ - `file` field ++ * [ ] Optional, allow missing ++ * [ ] Must be a string? (spec is not clear) ++ - `sourceRoot` field ++ * [ ] Optional, allow missing ++ * [ ] Must be a string? (spec is not clear) ++ - `sources` field ++ * [X] Must be present ++ * [X] Must be an array ++ * [X] Array elements must be `null` or a string ++ - `sourcesContent` field ++ * [X] Must be present ++ * [X] Must be an array ++ * [X] Array elements must be `null` or a string ++ - `names` field ++ * [X] Must be present (note: the spec implies this but implementations may not agree) ++ * [X] Must be an array ++ * [X] Array elements must be strings ++ - `mappings` field ++ * [X] Must be present ++ * [X] Must be a string ++ * [ ] Empty string is valid ++ - `ignoreList` field ++ * [ ] Optional, allow missing ++ * [ ] Must be an array ++ * [ ] Array elements must be numbers ++ * [ ] Elements must not be out of bounds for the `sources` list ++ - [X] Extra unrecognized fields are allowed ++* Index maps ++ - ? Must be mutually exclusive with non-index map? ++ - `file` field ++ * [ ] Optional, allow missing ++ * [ ] Must be a string? (spec is not clear) ++ - `sections` field ++ * [X] Must be present ++ * [X] Must be an array ++ * [ ] An empty sections array is valid ++ * [X] Array elements are valid section objects ++ - `offset` field ++ * [X] Must be present ++ * `line` field ++ - [X] Must be present ++ - [X] Must be a number ++ * `column` field ++ - [X] Must be present ++ - [X] Must be a number ++ - `map` field ++ * [X] Must be present ++ * [X] Must be an object ++ * [ ] Must be a valid source map ++ - [X] Sections are in order (the spec is not 100% clear, but assumption is increasing numeric order, may need subtests) ++ - [X] Sections are non-overlapping (the definition of overlap is not clear, may need subtests) ++* Mappings format ++ - [X] Each line is separated by ";" ++ - [X] A line may consist of zero segments (e.g., ";;") ++ - [X] Each line consists only of segments separated by "," ++ - [X] Must have greater than zero fields (note: many implementations don't check) ++ - [X] Must have 1, 4, or 5 fields ++ - [X] The source index must not be out of bounds of the sources array ++ - [X] The name index must not be out of bounds of the names array ++ - Absolute VLQ values must be non-negative ++ * [X] The column must be non-negative ++ * [X] The source index must be non-negative ++ * [X] The original line must be non-negative ++ * [X] The original column must be non-negative ++ * [X] The name index must be non-negative ++ - Relative VLQ values must be non-negative after adding to previous value ++ * [X] The column must be non-negative ++ * [X] The source index must be non-negative ++ * [X] The original line must be non-negative ++ * [X] The original column must be non-negative ++ * [X] The name index must be non-negative ++* Ignore list ++ - [X] An ignore list is optional, may be missing ++ - [X] An ignore list can't be a non-array value ++ * [X] An ignore list can be empty ++ * [X] An ignore list entry must be a number ++ * [X] An ignore list entry cannot be out-of-bounds of the sources array ++ - [X] Ignore list entries are detected and are present ++ - [X] Items not specified in the ignore list don't show up as ignored ++* Mappings semantics ++ - [ ] A source map with no mappings does not map any position. ++ - [ ] A single field segment gets mapped to the correct line and column. ++ - [X] A four field segment gets mapped to the correct line and column. ++ - [X] A five field segment gets mapped to the correct line and column. ++ - [X] When a name is present in a segment, it is correctly mapped. ++ - [X] When a source is present in a segment, it is correctly mapped. ++ - [ ] The second occurence of a field segment in a line is mapped relative to the previous one. ++ - [ ] When a new line starts, the generated column field resets to zero rather than being relative to the previous line. ++ - [ ] For fields other than the generated column, a segment field that has occured once in a previous line is mapped relatively when it occurs in the next line. ++ - [ ] Ensure that a transitive source map mapping works as expected ++ - Index maps are correctly used in mappings ++ * [ ] An index map with one sub-map will map correctly. ++ * [X] An index map with multiple sub-maps will map correctly, with appropriate offsets for the second and later sub-maps. ++* Resolution of sources ++ - [ ] When `sourceRoot` is provided, it is prepended to any `sources` entries and will be mapped with the full URL. ++ - [ ] If the source URL is an absolute URL, it is resolved as an absolute URL. ++ - [ ] If the source URL is a relative URL, it is resolved relative to the source map path. ++* Wasm support ++ - [ ] Create versions of the tests that use a Wasm source. ++ ++### Scopes Proposal ++ ++TODO +diff --git a/LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch b/LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch +new file mode 100644 +index 000000000000..c5fbd4baa8b0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch +@@ -0,0 +1,3867 @@ ++From afa11641db357e524c8f4d5f573945dd15c1f2e9 Mon Sep 17 00:00:00 2001 ++From: Agata Belkius ++Date: Fri, 19 Apr 2024 15:30:48 +0100 ++Subject: [PATCH 1/2] Add source map specification tests ++ ++--- ++ front_end/BUILD.gn | 1 + ++ front_end/core/sdk/BUILD.gn | 1 + ++ front_end/core/sdk/SourceMapSpec.test.ts | 206 +++ ++ .../core/sdk/fixtures/sourcemaps/BUILD.gn | 202 +++ ++ .../sourcemaps/basic-mapping-as-index-map.js | 2 + ++ .../basic-mapping-as-index-map.js.map | 15 + ++ .../sourcemaps/basic-mapping-original.js | 8 + ++ .../sdk/fixtures/sourcemaps/basic-mapping.js | 2 + ++ .../fixtures/sourcemaps/basic-mapping.js.map | 6 + ++ .../fixtures/sourcemaps/ignore-list-empty.js | 1 + ++ .../sourcemaps/ignore-list-empty.js.map | 8 + ++ .../sourcemaps/ignore-list-out-of-bounds.js | 1 + ++ .../ignore-list-out-of-bounds.js.map | 8 + ++ .../sourcemaps/ignore-list-valid-1.js | 1 + ++ .../sourcemaps/ignore-list-valid-1.js.map | 8 + ++ .../sourcemaps/ignore-list-wrong-type-1.js | 1 + ++ .../ignore-list-wrong-type-1.js.map | 8 + ++ .../sourcemaps/ignore-list-wrong-type-2.js | 1 + ++ .../ignore-list-wrong-type-2.js.map | 8 + ++ .../sourcemaps/ignore-list-wrong-type-3.js | 1 + ++ .../ignore-list-wrong-type-3.js.map | 8 + ++ .../index-map-invalid-base-mappings.js | 1 + ++ .../index-map-invalid-base-mappings.js.map | 15 + ++ .../sourcemaps/index-map-invalid-order.js | 1 + ++ .../sourcemaps/index-map-invalid-order.js.map | 23 + ++ .../sourcemaps/index-map-invalid-overlap.js | 1 + ++ .../index-map-invalid-overlap.js.map | 23 + ++ .../sourcemaps/index-map-missing-map.js | 1 + ++ .../sourcemaps/index-map-missing-map.js.map | 8 + ++ .../index-map-missing-offset-column.js | 1 + ++ .../index-map-missing-offset-column.js.map | 14 + ++ .../index-map-missing-offset-line.js | 1 + ++ .../index-map-missing-offset-line.js.map | 14 + ++ .../sourcemaps/index-map-missing-offset.js | 1 + ++ .../index-map-missing-offset.js.map | 13 + ++ .../index-map-offset-column-wrong-type.js | 1 + ++ .../index-map-offset-column-wrong-type.js.map | 14 + ++ .../index-map-offset-line-wrong-type.js | 1 + ++ .../index-map-offset-line-wrong-type.js.map | 14 + ++ .../index-map-two-concatenated-sources.js | 2 + ++ .../index-map-two-concatenated-sources.js.map | 24 + ++ .../sourcemaps/index-map-wrong-type-map.js | 1 + ++ .../index-map-wrong-type-map.js.map | 9 + ++ .../sourcemaps/index-map-wrong-type-offset.js | 1 + ++ .../index-map-wrong-type-offset.js.map | 14 + ++ .../index-map-wrong-type-sections.js | 1 + ++ .../index-map-wrong-type-sections.js.map | 4 + ++ .../invalid-mapping-bad-separator.js | 2 + ++ .../invalid-mapping-bad-separator.js.map | 6 + ++ .../invalid-mapping-not-a-string-1.js | 1 + ++ .../invalid-mapping-not-a-string-1.js.map | 7 + ++ .../invalid-mapping-not-a-string-2.js | 1 + ++ .../invalid-mapping-not-a-string-2.js.map | 7 + ++ ...nvalid-mapping-segment-column-too-large.js | 1 + ++ ...id-mapping-segment-column-too-large.js.map | 7 + ++ ...apping-segment-name-index-out-of-bounds.js | 1 + ++ ...ng-segment-name-index-out-of-bounds.js.map | 7 + ++ ...id-mapping-segment-name-index-too-large.js | 1 + ++ ...apping-segment-name-index-too-large.js.map | 7 + ++ ...invalid-mapping-segment-negative-column.js | 1 + ++ ...lid-mapping-segment-negative-column.js.map | 7 + ++ ...lid-mapping-segment-negative-name-index.js | 1 + ++ ...mapping-segment-negative-name-index.js.map | 7 + ++ ...apping-segment-negative-original-column.js | 1 + ++ ...ng-segment-negative-original-column.js.map | 7 + ++ ...-mapping-segment-negative-original-line.js | 1 + ++ ...ping-segment-negative-original-line.js.map | 7 + ++ ...apping-segment-negative-relative-column.js | 1 + ++ ...ng-segment-negative-relative-column.js.map | 8 + ++ ...ng-segment-negative-relative-name-index.js | 1 + ++ ...egment-negative-relative-name-index.js.map | 8 + ++ ...gment-negative-relative-original-column.js | 1 + ++ ...t-negative-relative-original-column.js.map | 8 + ++ ...segment-negative-relative-original-line.js | 1 + ++ ...ent-negative-relative-original-line.js.map | 8 + ++ ...-segment-negative-relative-source-index.js | 1 + ++ ...ment-negative-relative-source-index.js.map | 8 + ++ ...d-mapping-segment-negative-source-index.js | 1 + ++ ...pping-segment-negative-source-index.js.map | 7 + ++ ...pping-segment-original-column-too-large.js | 1 + ++ ...g-segment-original-column-too-large.js.map | 7 + ++ ...mapping-segment-original-line-too-large.js | 1 + ++ ...ing-segment-original-line-too-large.js.map | 7 + ++ ...ping-segment-source-index-out-of-bounds.js | 1 + ++ ...-segment-source-index-out-of-bounds.js.map | 7 + ++ ...-mapping-segment-source-index-too-large.js | 1 + ++ ...ping-segment-source-index-too-large.js.map | 7 + ++ ...valid-mapping-segment-with-three-fields.js | 2 + ++ ...d-mapping-segment-with-three-fields.js.map | 6 + ++ ...invalid-mapping-segment-with-two-fields.js | 2 + ++ ...lid-mapping-segment-with-two-fields.js.map | 6 + ++ ...nvalid-mapping-segment-with-zero-fields.js | 1 + ++ ...id-mapping-segment-with-zero-fields.js.map | 7 + ++ .../invalid-vlq-missing-continuation.js | 1 + ++ .../invalid-vlq-missing-continuation.js.map | 6 + ++ .../sourcemaps/invalid-vlq-non-base64-char.js | 1 + ++ .../invalid-vlq-non-base64-char.js.map | 6 + ++ .../sdk/fixtures/sourcemaps/names-missing.js | 1 + ++ .../fixtures/sourcemaps/names-missing.js.map | 5 + ++ .../fixtures/sourcemaps/names-not-a-list-1.js | 1 + ++ .../sourcemaps/names-not-a-list-1.js.map | 6 + ++ .../fixtures/sourcemaps/names-not-a-list-2.js | 1 + ++ .../sourcemaps/names-not-a-list-2.js.map | 6 + ++ .../fixtures/sourcemaps/names-not-string.js | 1 + ++ .../sourcemaps/names-not-string.js.map | 6 + ++ .../sourcemaps/second-source-original.js | 4 + ++ .../sourcemaps/source-map-spec-tests.json | 1540 +++++++++++++++++ ++ .../sources-and-sources-content-both-null.js | 1 + ++ ...urces-and-sources-content-both-null.js.map | 7 + ++ .../fixtures/sourcemaps/sources-missing.js | 1 + ++ .../sourcemaps/sources-missing.js.map | 5 + ++ .../sources-non-null-sources-content-null.js | 2 + ++ ...urces-non-null-sources-content-null.js.map | 7 + ++ .../sourcemaps/sources-not-a-list-1.js | 1 + ++ .../sourcemaps/sources-not-a-list-1.js.map | 6 + ++ .../sourcemaps/sources-not-a-list-2.js | 1 + ++ .../sourcemaps/sources-not-a-list-2.js.map | 6 + ++ .../sourcemaps/sources-not-string-or-null.js | 1 + ++ .../sources-not-string-or-null.js.map | 6 + ++ .../sources-null-sources-content-non-null.js | 2 + ++ ...urces-null-sources-content-non-null.js.map | 7 + ++ .../sourcemaps/transitive-mapping-original.js | 5 + ++ .../transitive-mapping-original.js.map | 8 + ++ .../transitive-mapping-three-steps.js | 6 + ++ .../transitive-mapping-three-steps.js.map | 7 + ++ .../fixtures/sourcemaps/transitive-mapping.js | 2 + ++ .../sourcemaps/transitive-mapping.js.map | 6 + ++ .../sourcemaps/typescript-original.ts | 5 + ++ .../sourcemaps/unrecognized-property.js | 1 + ++ .../sourcemaps/unrecognized-property.js.map | 8 + ++ .../valid-mapping-boundary-values.js | 1 + ++ .../valid-mapping-boundary-values.js.map | 7 + ++ .../sourcemaps/valid-mapping-empty-groups.js | 1 + ++ .../valid-mapping-empty-groups.js.map | 8 + ++ .../sourcemaps/valid-mapping-large-vlq.js | 1 + ++ .../sourcemaps/valid-mapping-large-vlq.js.map | 6 + ++ .../sourcemaps/valid-mapping-null-sources.js | 2 + ++ .../valid-mapping-null-sources.js.map | 6 + ++ .../fixtures/sourcemaps/version-missing.js | 1 + ++ .../sourcemaps/version-missing.js.map | 5 + ++ .../sourcemaps/version-not-a-number.js | 1 + ++ .../sourcemaps/version-not-a-number.js.map | 6 + ++ .../sourcemaps/version-numeric-string.js | 1 + ++ .../sourcemaps/version-numeric-string.js.map | 6 + ++ .../fixtures/sourcemaps/version-too-high.js | 1 + ++ .../sourcemaps/version-too-high.js.map | 6 + ++ .../fixtures/sourcemaps/version-too-low.js | 1 + ++ .../sourcemaps/version-too-low.js.map | 6 + ++ .../sdk/fixtures/sourcemaps/version-valid.js | 1 + ++ .../fixtures/sourcemaps/version-valid.js.map | 6 + ++ 150 files changed, 2648 insertions(+) ++ create mode 100644 front_end/core/sdk/SourceMapSpec.test.ts ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/BUILD.gn ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-missing.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-string.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/second-source-original.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-missing.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-missing.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-high.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-low.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-valid.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map ++ ++diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn ++index 863a434cea..125b34ba73 100644 ++--- a/front_end/BUILD.gn +++++ b/front_end/BUILD.gn ++@@ -106,6 +106,7 @@ group("unittests") { ++ "core/protocol_client:unittests", ++ "core/root:unittests", ++ "core/sdk:unittests", +++ "core/sdk/fixtures/sourcemaps", ++ "entrypoints/formatter_worker:unittests", ++ "entrypoints/heap_snapshot_worker:unittests", ++ "entrypoints/inspector_main:unittests", ++diff --git a/front_end/core/sdk/BUILD.gn b/front_end/core/sdk/BUILD.gn ++index 8d1cf0fa92..f8879365f4 100644 ++--- a/front_end/core/sdk/BUILD.gn +++++ b/front_end/core/sdk/BUILD.gn ++@@ -165,6 +165,7 @@ ts_library("unittests") { ++ "SourceMapManager.test.ts", ++ "SourceMapScopes.test.ts", ++ "SourceMapScopesInfo.test.ts", +++ "SourceMapSpec.test.ts", ++ "StorageBucketsModel.test.ts", ++ "StorageKeyManager.test.ts", ++ "Target.test.ts", ++diff --git a/front_end/core/sdk/SourceMapSpec.test.ts b/front_end/core/sdk/SourceMapSpec.test.ts ++new file mode 100644 ++index 0000000000..93b26a2e13 ++--- /dev/null +++++ b/front_end/core/sdk/SourceMapSpec.test.ts ++@@ -0,0 +1,206 @@ +++// Copyright 2024 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. +++ +++ +++/** +++ This file tests if devtools sourcemaps implementation is matching the sourcemaps spec. +++ Sourcemap Spec tests are using test data coming from: https://github.com/tc39/source-map-tests +++ +++ There is a lot of warnings of invalid source maps passing the validation - this is up to the authors +++ which ones of these could be actually checked in the SourceMaps implementetion and which ones are ok to ignore. +++ +++ **/ +++ +++const {assert} = chai; +++import type * as Platform from '../platform/platform.js'; +++import {assertNotNullOrUndefined} from '../platform/platform.js'; +++import { SourceMapV3, parseSourceMap } from './SourceMap.js'; +++import * as SDK from './sdk.js'; +++import {describeWithEnvironment} from '../../testing/EnvironmentHelpers.js'; +++ +++interface TestSpec { +++ name: string; +++ description: string; +++ baseFile: string; +++ sourceMapFile: string; +++ sourceMapIsValid: boolean; +++ testActions?: TestAction[]; +++} +++ +++interface TestAction { +++ actionType: string; +++ generatedLine: number; +++ generatedColumn: number; +++ originalSource: string; +++ originalLine: number; +++ originalColumn: number; +++ mappedName: null | string; +++ intermediateMaps?: string[] +++} +++ +++// Accept "null", null, or undefined for tests specifying a missing value. +++function nullish(arg : any) { +++ if (arg === "null" || arg === undefined) { +++ return null; +++ } +++ return arg; +++} +++ +++describeWithEnvironment('SourceMapSpec', () => { +++ let testCases : TestSpec[] | undefined; +++ let sourceMapContents : SourceMapV3[] = []; +++ +++ before(async () => { +++ testCases = await loadTestCasesFromFixture('source-map-spec-tests.json'); +++ sourceMapContents = await Promise.all( +++ testCases!.map( +++ async (testCase) => { +++ const { sourceMapFile } = testCase; +++ return loadSourceMapFromFixture(sourceMapFile); +++ } +++ ) +++ ); +++ }); +++ +++ it('Spec tests', () => { +++ const consoleErrorSpy = sinon.spy(console, 'error'); +++ testCases!.forEach(({ +++ baseFile, +++ sourceMapFile, +++ testActions, +++ sourceMapIsValid, +++ name +++ }, index) => { +++ const sourceMapContent = sourceMapContents[index]; +++ +++ // These test cases are ignored because certain validity checks are +++ // not implemented, such as checking the version number is `3`. +++ const ignoredCasesForBasicValidity = [ +++ "fileNotAString1", +++ "fileNotAString2", +++ "versionMissing", +++ "versionNotANumber", +++ "versionNumericString", +++ "versionTooHigh", +++ "versionTooLow", +++ "sourcesNotAList1", +++ "sourcesNotAList2", +++ "sourcesNotStringOrNull", +++ // FIXME: this test should be revised after recent spec changes +++ "namesMissing", +++ "namesNotAList1", +++ "namesNotAList2", +++ "namesNotString", +++ "ignoreListWrongType1", +++ "ignoreListWrongType2", +++ "ignoreListOutOfBounds", +++ "indexMapWrongTypeSections", +++ "indexMapWrongTypeMap", +++ "indexMapMissingOffset", +++ "invalidVLQDueToNonBase64Character", +++ ]; +++ +++ // 1) check if an invalid sourcemap throws on SourceMap instance creation, or +++ // 2) check if an invalid sourcemap throws on mapping creation +++ if (!sourceMapIsValid) { +++ if (ignoredCasesForBasicValidity.includes(name)) +++ return; +++ +++ let thrownDuringParse = false; +++ try { +++ const sourceMap = new SDK.SourceMap.SourceMap( +++ baseFile as Platform.DevToolsPath.UrlString, +++ sourceMapFile as Platform.DevToolsPath.UrlString, +++ sourceMapContent); +++ sourceMap.mappings(); +++ } catch { +++ thrownDuringParse = true; +++ } +++ assert.equal( +++ thrownDuringParse || consoleErrorSpy.calledWith("Failed to parse source map"), +++ true, +++ `${name}: expected invalid source map to fail to load` +++ ); +++ +++ return; +++ } +++ +++ // 3) check if a valid sourcemap can be parsed and a SourceMap instance created +++ const baseFileUrl = baseFile as Platform.DevToolsPath.UrlString; +++ const sourceMapFileUrl = sourceMapFile as Platform.DevToolsPath.UrlString; +++ +++ assert.doesNotThrow( +++ () => parseSourceMap(JSON.stringify(sourceMapContent)), +++ undefined, +++ undefined, +++ `${name}: expected valid source map to parse` +++ ); +++ assert.doesNotThrow(() => new SDK.SourceMap.SourceMap( +++ baseFileUrl, +++ sourceMapFileUrl, +++ sourceMapContent +++ ), undefined, undefined, `${name}: expected valid source map to parse`); +++ +++ // 4) check if the mappings are valid +++ const sourceMap = new SDK.SourceMap.SourceMap( +++ baseFileUrl, +++ sourceMapFileUrl, +++ sourceMapContent); +++ +++ assert.doesNotThrow(() => sourceMap.findEntry(1, 1)); +++ +++ if (testActions !== undefined) { +++ testActions.forEach(({ +++ actionType, +++ originalSource, +++ originalLine, +++ originalColumn, +++ generatedLine, +++ generatedColumn, +++ intermediateMaps +++ }) => { +++ +++ if (actionType === "checkMapping" && sourceMapIsValid) { +++ // 4a) check if the mappings are valid for regular sourcemaps +++ // extract to separate function +++ let actual = sourceMap.findEntry(generatedLine, generatedColumn); +++ assertNotNullOrUndefined(actual); +++ +++ assert.strictEqual(nullish(actual.sourceURL), originalSource, 'unexpected source URL'); +++ assert.strictEqual(nullish(actual.sourceLineNumber), originalLine, 'unexpected source line number'); +++ assert.strictEqual(nullish(actual.sourceColumnNumber), originalColumn, 'unexpected source column number'); +++ } +++ }); +++ } +++ }); +++ }); +++}); +++ +++async function loadTestCasesFromFixture(filename: string): Promise { +++ const testSpec = await getFixtureFileContents<{ tests: TestSpec[] }>(filename); +++ return testSpec?.tests ?? []; +++}; +++ +++async function loadSourceMapFromFixture(filename: string): Promise { +++ return getFixtureFileContents(filename); +++}; +++ +++async function getFixtureFileContents(filename: string): +++ Promise { +++ const url = new URL(`/front_end/core/sdk/fixtures/sourcemaps/${filename}`, window.location.origin); +++ +++ const response = await fetch(url); +++ +++ if (response.status !== 200) { +++ throw new Error(`Unable to load ${url}`); +++ } +++ +++ const contentType = response.headers.get('content-type'); +++ const isGzipEncoded = contentType !== null && contentType.includes('gzip'); +++ let buffer = await response.arrayBuffer(); +++ +++ const decoder = new TextDecoder('utf-8'); +++ const contents = JSON.parse(decoder.decode(buffer)) as T; +++ return contents; +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn b/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn ++new file mode 100644 ++index 0000000000..a82b09a02d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn ++@@ -0,0 +1,202 @@ +++# Copyright 2022 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. +++ +++import("../../../../../scripts/build/ninja/copy.gni") +++ +++copy_to_gen("sourcemaps") { +++ sources = [ +++ "basic-mapping-as-index-map.js", +++ "basic-mapping-as-index-map.js.map", +++ "basic-mapping-original.js", +++ "basic-mapping.js", +++ "basic-mapping.js.map", +++ "file-not-a-string-1.js", +++ "file-not-a-string-1.js.map", +++ "file-not-a-string-2.js", +++ "file-not-a-string-2.js.map", +++ "ignore-list-empty.js", +++ "ignore-list-empty.js.map", +++ "ignore-list-out-of-bounds.js", +++ "ignore-list-out-of-bounds.js.map", +++ "ignore-list-valid-1.js", +++ "ignore-list-valid-1.js.map", +++ "ignore-list-wrong-type-1.js", +++ "ignore-list-wrong-type-1.js.map", +++ "ignore-list-wrong-type-2.js", +++ "ignore-list-wrong-type-2.js.map", +++ "ignore-list-wrong-type-3.js", +++ "ignore-list-wrong-type-3.js.map", +++ "index-map-empty-sections.js", +++ "index-map-empty-sections.js.map", +++ "index-map-file-wrong-type-1.js", +++ "index-map-file-wrong-type-1.js.map", +++ "index-map-file-wrong-type-2.js", +++ "index-map-file-wrong-type-2.js.map", +++ "index-map-invalid-base-mappings.js", +++ "index-map-invalid-base-mappings.js.map", +++ "index-map-invalid-order.js", +++ "index-map-invalid-order.js.map", +++ "index-map-invalid-overlap.js", +++ "index-map-invalid-overlap.js.map", +++ "index-map-invalid-sub-map.js", +++ "index-map-invalid-sub-map.js.map", +++ "index-map-missing-file.js", +++ "index-map-missing-file.js.map", +++ "index-map-missing-map.js", +++ "index-map-missing-map.js.map", +++ "index-map-missing-offset-column.js", +++ "index-map-missing-offset-column.js.map", +++ "index-map-missing-offset-line.js", +++ "index-map-missing-offset-line.js.map", +++ "index-map-missing-offset.js", +++ "index-map-missing-offset.js.map", +++ "index-map-offset-column-wrong-type.js", +++ "index-map-offset-column-wrong-type.js.map", +++ "index-map-offset-line-wrong-type.js", +++ "index-map-offset-line-wrong-type.js.map", +++ "index-map-two-concatenated-sources.js", +++ "index-map-two-concatenated-sources.js.map", +++ "index-map-wrong-type-map.js", +++ "index-map-wrong-type-map.js.map", +++ "index-map-wrong-type-offset.js", +++ "index-map-wrong-type-offset.js.map", +++ "index-map-wrong-type-sections.js", +++ "index-map-wrong-type-sections.js.map", +++ "invalid-mapping-bad-separator.js", +++ "invalid-mapping-bad-separator.js.map", +++ "invalid-mapping-not-a-string-1.js", +++ "invalid-mapping-not-a-string-1.js.map", +++ "invalid-mapping-not-a-string-2.js", +++ "invalid-mapping-not-a-string-2.js.map", +++ "invalid-mapping-segment-column-too-large.js", +++ "invalid-mapping-segment-column-too-large.js.map", +++ "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "invalid-mapping-segment-name-index-out-of-bounds.js.map", +++ "invalid-mapping-segment-name-index-too-large.js", +++ "invalid-mapping-segment-name-index-too-large.js.map", +++ "invalid-mapping-segment-negative-column.js", +++ "invalid-mapping-segment-negative-column.js.map", +++ "invalid-mapping-segment-negative-name-index.js", +++ "invalid-mapping-segment-negative-name-index.js.map", +++ "invalid-mapping-segment-negative-original-column.js", +++ "invalid-mapping-segment-negative-original-column.js.map", +++ "invalid-mapping-segment-negative-original-line.js", +++ "invalid-mapping-segment-negative-original-line.js.map", +++ "invalid-mapping-segment-negative-relative-column.js", +++ "invalid-mapping-segment-negative-relative-column.js.map", +++ "invalid-mapping-segment-negative-relative-name-index.js", +++ "invalid-mapping-segment-negative-relative-name-index.js.map", +++ "invalid-mapping-segment-negative-relative-original-column.js", +++ "invalid-mapping-segment-negative-relative-original-column.js.map", +++ "invalid-mapping-segment-negative-relative-original-line.js", +++ "invalid-mapping-segment-negative-relative-original-line.js.map", +++ "invalid-mapping-segment-negative-relative-source-index.js", +++ "invalid-mapping-segment-negative-relative-source-index.js.map", +++ "invalid-mapping-segment-negative-source-index.js", +++ "invalid-mapping-segment-negative-source-index.js.map", +++ "invalid-mapping-segment-original-column-too-large.js", +++ "invalid-mapping-segment-original-column-too-large.js.map", +++ "invalid-mapping-segment-original-line-too-large.js", +++ "invalid-mapping-segment-original-line-too-large.js.map", +++ "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "invalid-mapping-segment-source-index-out-of-bounds.js.map", +++ "invalid-mapping-segment-source-index-too-large.js", +++ "invalid-mapping-segment-source-index-too-large.js.map", +++ "invalid-mapping-segment-with-three-fields.js", +++ "invalid-mapping-segment-with-three-fields.js.map", +++ "invalid-mapping-segment-with-two-fields.js", +++ "invalid-mapping-segment-with-two-fields.js.map", +++ "invalid-mapping-segment-with-zero-fields.js", +++ "invalid-mapping-segment-with-zero-fields.js.map", +++ "invalid-vlq-missing-continuation.js", +++ "invalid-vlq-missing-continuation.js.map", +++ "invalid-vlq-non-base64-char.js", +++ "invalid-vlq-non-base64-char.js.map", +++ "mapping-semantics-column-reset.js", +++ "mapping-semantics-column-reset.js.map", +++ "mapping-semantics-five-field-segment.js", +++ "mapping-semantics-five-field-segment.js.map", +++ "mapping-semantics-four-field-segment.js", +++ "mapping-semantics-four-field-segment.js.map", +++ "mapping-semantics-relative-1.js", +++ "mapping-semantics-relative-1.js.map", +++ "mapping-semantics-relative-2.js", +++ "mapping-semantics-relative-2.js.map", +++ "mapping-semantics-single-field-segment.js", +++ "mapping-semantics-single-field-segment.js.map", +++ "names-missing.js", +++ "names-missing.js.map", +++ "names-not-a-list-1.js", +++ "names-not-a-list-1.js.map", +++ "names-not-a-list-2.js", +++ "names-not-a-list-2.js.map", +++ "names-not-string.js", +++ "names-not-string.js.map", +++ "second-source-original.js", +++ "source-map-spec-tests.json", +++ "source-resolution-absolute-url.js", +++ "source-resolution-absolute-url.js.map", +++ "source-resolution-relative-url.js", +++ "source-resolution-relative-url.js.map", +++ "source-root-not-a-string-1.js", +++ "source-root-not-a-string-1.js.map", +++ "source-root-not-a-string-2.js", +++ "source-root-not-a-string-2.js.map", +++ "source-root-resolution.js", +++ "source-root-resolution.js.map", +++ "sources-and-sources-content-both-null.js", +++ "sources-and-sources-content-both-null.js.map", +++ "sources-missing.js", +++ "sources-missing.js.map", +++ "sources-non-null-sources-content-null.js", +++ "sources-non-null-sources-content-null.js.map", +++ "sources-not-a-list-1.js", +++ "sources-not-a-list-1.js.map", +++ "sources-not-a-list-2.js", +++ "sources-not-a-list-2.js.map", +++ "sources-not-string-or-null.js", +++ "sources-not-string-or-null.js.map", +++ "sources-null-sources-content-non-null.js", +++ "sources-null-sources-content-non-null.js.map", +++ "transitive-mapping-original.js", +++ "transitive-mapping-original.js.map", +++ "transitive-mapping-three-steps.js", +++ "transitive-mapping-three-steps.js.map", +++ "transitive-mapping.js", +++ "transitive-mapping.js.map", +++ "typescript-original.ts", +++ "unrecognized-property.js", +++ "unrecognized-property.js.map", +++ "valid-mapping-boundary-values.js", +++ "valid-mapping-boundary-values.js.map", +++ "valid-mapping-empty-groups.js", +++ "valid-mapping-empty-groups.js.map", +++ "valid-mapping-empty-string.js", +++ "valid-mapping-empty-string.js.map", +++ "valid-mapping-large-vlq.js", +++ "valid-mapping-large-vlq.js.map", +++ "valid-mapping-null-sources.js", +++ "valid-mapping-null-sources.js.map", +++ "version-missing.js", +++ "version-missing.js.map", +++ "version-not-a-number.js", +++ "version-not-a-number.js.map", +++ "version-numeric-string.js", +++ "version-numeric-string.js.map", +++ "version-too-high.js", +++ "version-too-high.js.map", +++ "version-too-low.js", +++ "version-too-low.js.map", +++ "version-valid.js", +++ "version-valid.js.map", +++ "vlq-valid-continuation-bit-present-1.js", +++ "vlq-valid-continuation-bit-present-1.js.map", +++ "vlq-valid-continuation-bit-present-2.js", +++ "vlq-valid-continuation-bit-present-2.js.map", +++ "vlq-valid-negative-digit.js", +++ "vlq-valid-negative-digit.js.map", +++ "vlq-valid-single-digit.js", +++ "vlq-valid-single-digit.js.map", +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js ++new file mode 100644 ++index 0000000000..b9fae38043 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=basic-mapping-as-index-map.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map ++new file mode 100644 ++index 0000000000..c0ad870ed2 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map ++@@ -0,0 +1,15 @@ +++{ +++ "version": 3, +++ "file": "basic-mapping-as-index-map.js", +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js ++new file mode 100644 ++index 0000000000..301b186cb1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js ++@@ -0,0 +1,8 @@ +++function foo() { +++ return 42; +++} +++function bar() { +++ return 24; +++} +++foo(); +++bar(); ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js ++new file mode 100644 ++index 0000000000..2e479a4175 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=basic-mapping.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map ++new file mode 100644 ++index 0000000000..12dc9679a4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js ++new file mode 100644 ++index 0000000000..385a5c3501 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-empty.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map ++new file mode 100644 ++index 0000000000..7297863a9b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": [] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js ++new file mode 100644 ++index 0000000000..7a0fbb8833 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-out-of-bounds.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map ++new file mode 100644 ++index 0000000000..fb2566bb41 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": [1] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js ++new file mode 100644 ++index 0000000000..ea64a5565a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-valid-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map ++new file mode 100644 ++index 0000000000..98eebdf7f6 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": [0] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js ++new file mode 100644 ++index 0000000000..8b40bd3847 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-wrong-type-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map ++new file mode 100644 ++index 0000000000..688740aba8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": ["not a number"] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js ++new file mode 100644 ++index 0000000000..35c7791164 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-wrong-type-2.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map ++new file mode 100644 ++index 0000000000..ca1d30de2d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": ["0"] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js ++new file mode 100644 ++index 0000000000..8735d41758 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-wrong-type-3.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map ++new file mode 100644 ++index 0000000000..1ac167d56c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": 0 +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js ++new file mode 100644 ++index 0000000000..e90bef083c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-invalid-base-mappings.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map ++new file mode 100644 ++index 0000000000..b489c1f080 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map ++@@ -0,0 +1,15 @@ +++{ +++ "version": 3, +++ "mappings": "AAAA", +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js ++new file mode 100644 ++index 0000000000..263fa3c6e0 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-invalid-order.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map ++new file mode 100644 ++index 0000000000..82da69df72 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map ++@@ -0,0 +1,23 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 1, "column": 4 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ }, +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js ++new file mode 100644 ++index 0000000000..9aff8dc620 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-invalid-overlap.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map ++new file mode 100644 ++index 0000000000..8d42546fd8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map ++@@ -0,0 +1,23 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ }, +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js ++new file mode 100644 ++index 0000000000..86c8e9a253 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-missing-map.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map ++new file mode 100644 ++index 0000000000..3bce47e852 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js ++new file mode 100644 ++index 0000000000..fe6917403f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-missing-offset-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map ++new file mode 100644 ++index 0000000000..aa48bbb993 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js ++new file mode 100644 ++index 0000000000..ba8614e412 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-missing-offset-line.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map ++new file mode 100644 ++index 0000000000..3d60444ea7 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js ++new file mode 100644 ++index 0000000000..9ca2cf3fb5 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-missing-offset.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map ++new file mode 100644 ++index 0000000000..7285138bf5 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map ++@@ -0,0 +1,13 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js ++new file mode 100644 ++index 0000000000..ed1e9ec5d5 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-offset-column-wrong-type.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map ++new file mode 100644 ++index 0000000000..b43e79a9dd ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": true }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js ++new file mode 100644 ++index 0000000000..d58f2aff99 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-offset-line-wrong-type.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map ++new file mode 100644 ++index 0000000000..81dbcd6ec4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": true, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js ++new file mode 100644 ++index 0000000000..b8702d7187 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar();function baz(){return"baz"}baz(); +++//# sourceMappingURL=index-map-two-concatenated-sources.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map ++new file mode 100644 ++index 0000000000..f67f5de3c5 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map ++@@ -0,0 +1,24 @@ +++{ +++ "version": 3, +++ "file": "index-map-two-concatenated-sources.js", +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++ } +++ }, +++ { +++ "offset": { "line": 0, "column": 62 }, +++ "map": { +++ "version": 3, +++ "names": ["baz"], +++ "sources": ["second-source-original.js"], +++ "mappings":"AAAA,SAASA,MACP,MAAO,KACT,CACAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js ++new file mode 100644 ++index 0000000000..d31d6d6358 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-wrong-type-map.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map ++new file mode 100644 ++index 0000000000..0963f623d7 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map ++@@ -0,0 +1,9 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": "not a map" +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js ++new file mode 100644 ++index 0000000000..048e1246f8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-wrong-type-offset.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map ++new file mode 100644 ++index 0000000000..fbc6e4e678 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": "not an offset", +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js ++new file mode 100644 ++index 0000000000..011eca806e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-wrong-type-sections.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map ++new file mode 100644 ++index 0000000000..dbfb4ead30 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map ++@@ -0,0 +1,4 @@ +++{ +++ "version": 3, +++ "sections": "not a sections list" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js ++new file mode 100644 ++index 0000000000..25338aca30 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-bad-separator.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map ++new file mode 100644 ++index 0000000000..5f4f5b9233 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA.SAASA:MACP" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js ++new file mode 100644 ++index 0000000000..cb38e2fe9d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map ++new file mode 100644 ++index 0000000000..5bf3e2a9d8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-not-a-string-1.js", +++ "sources": ["empty-original.js"], +++ "mappings": 5 +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js ++new file mode 100644 ++index 0000000000..3d84abd6c6 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map ++new file mode 100644 ++index 0000000000..4527e7f764 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-not-a-string-2.js", +++ "sources": ["empty-original.js"], +++ "mappings": [1, 2, 3, 4] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js ++new file mode 100644 ++index 0000000000..55591f874b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map ++new file mode 100644 ++index 0000000000..b4c059e015 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-column-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "ggggggE" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js ++new file mode 100644 ++index 0000000000..2a6b434eff ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map ++new file mode 100644 ++index 0000000000..8dd2ea6c2d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "file": "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAC" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js ++new file mode 100644 ++index 0000000000..709e34dbd3 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map ++new file mode 100644 ++index 0000000000..c7bf5b98d1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-name-index-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAggggggE" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js ++new file mode 100644 ++index 0000000000..a202152d6f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map ++new file mode 100644 ++index 0000000000..403878bfa4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-column.js", +++ "sources": ["empty-original.js"], +++ "mappings": "F" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js ++new file mode 100644 ++index 0000000000..3e3f634204 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map ++new file mode 100644 ++index 0000000000..b94f63646e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-name-index.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAF" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js ++new file mode 100644 ++index 0000000000..f21d5342b3 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map ++new file mode 100644 ++index 0000000000..011c639d3f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-original-column.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAF" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js ++new file mode 100644 ++index 0000000000..b37309601c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map ++new file mode 100644 ++index 0000000000..e7ec993eeb ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-original-line.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAFA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js ++new file mode 100644 ++index 0000000000..94b835d687 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map ++new file mode 100644 ++index 0000000000..414884072b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-column.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "C,F" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js ++new file mode 100644 ++index 0000000000..c965c5f011 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-name-index.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map ++new file mode 100644 ++index 0000000000..1fbbcfcd32 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-name-index.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "AAAAC,AAAAF" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js ++new file mode 100644 ++index 0000000000..493a6ec88a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map ++new file mode 100644 ++index 0000000000..7e62895651 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-original-column.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "AAAC,AAAF" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js ++new file mode 100644 ++index 0000000000..ca8329fb98 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-line.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map ++new file mode 100644 ++index 0000000000..86b0fb3a04 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-original-line.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "AACA,AAFA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js ++new file mode 100644 ++index 0000000000..fa92225b09 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-source-index.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map ++new file mode 100644 ++index 0000000000..2efeb047db ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-source-index.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "ACAA,AFAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js ++new file mode 100644 ++index 0000000000..6e05849b6a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map ++new file mode 100644 ++index 0000000000..596c2f298b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-source-index.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AFAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js ++new file mode 100644 ++index 0000000000..0936ed7ea8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map ++new file mode 100644 ++index 0000000000..ff2103fe24 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-original-column-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAggggggE" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js ++new file mode 100644 ++index 0000000000..9b3aa5a361 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map ++new file mode 100644 ++index 0000000000..890f1c71fc ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-original-line-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAggggggEA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js ++new file mode 100644 ++index 0000000000..2e5fbca268 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map ++new file mode 100644 ++index 0000000000..86dedb114f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "sources": ["empty-original.js"], +++ "mappings": "ACAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js ++new file mode 100644 ++index 0000000000..3f4943e127 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map ++new file mode 100644 ++index 0000000000..e9f858c6e1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-source-index-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AggggggEAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js ++new file mode 100644 ++index 0000000000..4b868fac9c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map ++new file mode 100644 ++index 0000000000..c2af1165ad ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js ++new file mode 100644 ++index 0000000000..96045a7a11 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map ++new file mode 100644 ++index 0000000000..73cf00fa1c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js ++new file mode 100644 ++index 0000000000..9d5332a56c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map ++new file mode 100644 ++index 0000000000..5a34d25b64 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-with-zero-fields.js", +++ "sources": ["empty-original.js"], +++ "mappings": ",,,," +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js ++new file mode 100644 ++index 0000000000..2c2a0090ac ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-vlq-missing-continuation.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map ++new file mode 100644 ++index 0000000000..dd0e363ff4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "g" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js ++new file mode 100644 ++index 0000000000..d1b20b41a2 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-vlq-non-base64-char.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map ++new file mode 100644 ++index 0000000000..4fa1ac5768 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "A$%?!" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-missing.js b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js ++new file mode 100644 ++index 0000000000..58781fd887 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-missing.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map ++new file mode 100644 ++index 0000000000..82170bf784 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js ++new file mode 100644 ++index 0000000000..dc65f1972b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-a-list-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map ++new file mode 100644 ++index 0000000000..fe1edaeb96 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": ["source.js"], +++ "names": "not a list", +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js ++new file mode 100644 ++index 0000000000..d7251f78da ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-a-list-2.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map ++new file mode 100644 ++index 0000000000..3388d2bb71 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": ["source.js"], +++ "names": { "foo": 3 }, +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js ++new file mode 100644 ++index 0000000000..8dc7b4811a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-string.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map ++new file mode 100644 ++index 0000000000..c0feb0739a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": ["source.js"], +++ "names": [null, 3, true, false, {}, []], +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js b/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js ++new file mode 100644 ++index 0000000000..c339bc9d15 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js ++@@ -0,0 +1,4 @@ +++function baz() { +++ return "baz"; +++} +++baz(); ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json b/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json ++new file mode 100644 ++index 0000000000..0f7a3c1cb1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json ++@@ -0,0 +1,1540 @@ +++{ +++ "tests": [ +++ { +++ "name": "versionValid", +++ "description": "Test a simple source map with a valid version number", +++ "baseFile": "version-valid.js", +++ "sourceMapFile": "version-valid.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "versionMissing", +++ "description": "Test a source map that is missing a version field", +++ "baseFile": "version-missing.js", +++ "sourceMapFile": "version-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionNotANumber", +++ "description": "Test a source map with a version field that is not a number", +++ "baseFile": "version-not-a-number.js", +++ "sourceMapFile": "version-not-a-number.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionNumericString", +++ "description": "Test a source map with a version field that is a number as a string", +++ "baseFile": "version-numeric-string.js", +++ "sourceMapFile": "version-numeric-string.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooHigh", +++ "description": "Test a source map with an integer version field that is too high", +++ "baseFile": "version-too-high.js", +++ "sourceMapFile": "version-too-high.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooLow", +++ "description": "Test a source map with an integer version field that is too low", +++ "baseFile": "version-too-low.js", +++ "sourceMapFile": "version-too-low.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesMissing", +++ "description": "Test a source map that is missing a necessary sources field", +++ "baseFile": "sources-missing.js", +++ "sourceMapFile": "sources-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotAList1", +++ "description": "Test a source map with a sources field that is not a valid list (string)", +++ "baseFile": "sources-not-a-list-1.js", +++ "sourceMapFile": "sources-not-a-list-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotAList2", +++ "description": "Test a source map with a sources field that is not a valid list (object)", +++ "baseFile": "sources-not-a-list-2.js", +++ "sourceMapFile": "sources-not-a-list-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotStringOrNull", +++ "description": "Test a source map with a sources list that has non-string and non-null items", +++ "baseFile": "sources-not-string-or-null.js", +++ "sourceMapFile": "sources-not-string-or-null.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesAndSourcesContentBothNull", +++ "description": "Test a source map that has both null sources and sourcesContent entries", +++ "baseFile": "sources-and-sources-content-both-null.js", +++ "sourceMapFile": "sources-and-sources-content-both-null.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "fileNotAString1", +++ "description": "Test a source map with a file field that is not a valid string", +++ "baseFile": "file-not-a-string-1.js", +++ "sourceMapFile": "file-not-a-string-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "fileNotAString2", +++ "description": "Test a source map with a file field that is not a valid string", +++ "baseFile": "file-not-a-string-2.js", +++ "sourceMapFile": "file-not-a-string-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourceRootNotAString1", +++ "description": "Test a source map with a sourceRoot field that is not a valid string", +++ "baseFile": "source-root-not-a-string-1.js", +++ "sourceMapFile": "source-root-not-a-string-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourceRootNotAString2", +++ "description": "Test a source map with a sourceRoot field that is not a valid string", +++ "baseFile": "source-root-not-a-string-2.js", +++ "sourceMapFile": "source-root-not-a-string-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesMissing", +++ "description": "Test a source map that is missing a necessary names field", +++ "baseFile": "names-missing.js", +++ "sourceMapFile": "names-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotAList1", +++ "description": "Test a source map with a names field that is not a valid list (string)", +++ "baseFile": "names-not-a-list-1.js", +++ "sourceMapFile": "names-not-a-list-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotAList2", +++ "description": "Test a source map with a names field that is not a valid list (object)", +++ "baseFile": "names-not-a-list-2.js", +++ "sourceMapFile": "names-not-a-list-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotString", +++ "description": "Test a source map with a names list that has non-string items", +++ "baseFile": "names-not-string.js", +++ "sourceMapFile": "names-not-string.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "ignoreListEmpty", +++ "description": "Test a source map with an ignore list that has no items", +++ "baseFile": "ignore-list-empty.js", +++ "sourceMapFile": "ignore-list-empty.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "ignoreListValid1", +++ "description": "Test a source map with a simple valid ignore list", +++ "baseFile": "ignore-list-valid-1.js", +++ "sourceMapFile": "ignore-list-valid-1.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkIgnoreList", +++ "present": ["empty-original.js"] +++ } +++ ] +++ }, +++ { +++ "name": "ignoreListWrongType1", +++ "description": "Test a source map with an ignore list with the wrong type of items", +++ "baseFile": "ignore-list-wrong-type-1.js", +++ "sourceMapFile": "ignore-list-wrong-type-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "ignoreListWrongType2", +++ "description": "Test a source map with an ignore list with the wrong type of items", +++ "baseFile": "ignore-list-wrong-type-2.js", +++ "sourceMapFile": "ignore-list-wrong-type-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "ignoreListWrongType3", +++ "description": "Test a source map with an ignore list that is not a list", +++ "baseFile": "ignore-list-wrong-type-3.js", +++ "sourceMapFile": "ignore-list-wrong-type-3.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "ignoreListOutOfBounds", +++ "description": "Test a source map with an ignore list with an item with an out-of-bounds index", +++ "baseFile": "ignore-list-out-of-bounds.js", +++ "sourceMapFile": "ignore-list-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "unrecognizedProperty", +++ "description": "Test a source map that has an extra field not explicitly encoded in the spec", +++ "baseFile": "unrecognized-property.js", +++ "sourceMapFile": "unrecognized-property.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "invalidVLQDueToNonBase64Character", +++ "description": "Test a source map that has a mapping with an invalid non-base64 character", +++ "baseFile": "invalid-vlq-non-base64-char.js", +++ "sourceMapFile": "invalid-vlq-non-base64-char.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidVLQDueToMissingContinuationDigits", +++ "description": "Test a source map that has a mapping with an invalid VLQ that has a continuation bit but no continuing digits", +++ "baseFile": "invalid-vlq-missing-continuation.js", +++ "sourceMapFile": "invalid-vlq-missing-continuation.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingNotAString1", +++ "description": "Test a source map that has an invalid mapping that is not a string (number)", +++ "baseFile": "invalid-mapping-not-a-string-1.js", +++ "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingNotAString2", +++ "description": "Test a source map that has an invalid mapping that is not a string (array)", +++ "baseFile": "invalid-mapping-not-a-string-2.js", +++ "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentBadSeparator", +++ "description": "Test a source map that uses separator characters not recognized in the spec", +++ "baseFile": "invalid-mapping-bad-separator.js", +++ "sourceMapFile": "invalid-mapping-bad-separator.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithZeroFields", +++ "description": "Test a source map that has the wrong number (zero) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-zero-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithTwoFields", +++ "description": "Test a source map that has the wrong number (two) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-two-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithThreeFields", +++ "description": "Test a source map that has the wrong number (three) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-three-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", +++ "description": "Test a source map that has a source index field that is out of bounds of the sources field", +++ "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNameIndexOutOfBounds", +++ "description": "Test a source map that has a name index field that is out of bounds of the names field", +++ "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeColumn", +++ "description": "Test a source map that has an invalid negative non-relative column field", +++ "baseFile": "invalid-mapping-segment-negative-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeSourceIndex", +++ "description": "Test a source map that has an invalid negative non-relative source index field", +++ "baseFile": "invalid-mapping-segment-negative-source-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeOriginalLine", +++ "description": "Test a source map that has an invalid negative non-relative original line field", +++ "baseFile": "invalid-mapping-segment-negative-original-line.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeOriginalColumn", +++ "description": "Test a source map that has an invalid negative non-relative original column field", +++ "baseFile": "invalid-mapping-segment-negative-original-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeNameIndex", +++ "description": "Test a source map that has an invalid negative non-relative name index field", +++ "baseFile": "invalid-mapping-segment-negative-name-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeColumn", +++ "description": "Test a source map that has an invalid negative relative column field", +++ "baseFile": "invalid-mapping-segment-negative-relative-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeSourceIndex", +++ "description": "Test a source map that has an invalid negative relative source index field", +++ "baseFile": "invalid-mapping-segment-negative-relative-source-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-source-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalLine", +++ "description": "Test a source map that has an invalid negative relative original line field", +++ "baseFile": "invalid-mapping-segment-negative-relative-original-line.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-line.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalColumn", +++ "description": "Test a source map that has an invalid negative relative original column field", +++ "baseFile": "invalid-mapping-segment-negative-relative-original-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeNameIndex", +++ "description": "Test a source map that has an invalid negative relative name index field", +++ "baseFile": "invalid-mapping-segment-negative-relative-name-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-name-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithColumnExceeding32Bits", +++ "description": "Test a source map that has a column field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-column-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", +++ "description": "Test a source map that has a source index field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-source-index-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", +++ "description": "Test a source map that has a original line field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-original-line-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", +++ "description": "Test a source map that has an original column field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-original-column-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", +++ "description": "Test a source map that has a name index field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-name-index-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "validMappingFieldsWith32BitMaxValues", +++ "description": "Test a source map that has segment fields with max values representable in 32 bits", +++ "baseFile": "valid-mapping-boundary-values.js", +++ "sourceMapFile": "valid-mapping-boundary-values.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingLargeVLQ", +++ "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", +++ "baseFile": "valid-mapping-large-vlq.js", +++ "sourceMapFile": "valid-mapping-large-vlq.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingEmptyGroups", +++ "description": "Test a source map with a mapping that has many empty groups", +++ "baseFile": "valid-mapping-empty-groups.js", +++ "sourceMapFile": "valid-mapping-empty-groups.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingEmptyString", +++ "description": "Test a source map with an empty string mapping", +++ "baseFile": "valid-mapping-empty-string.js", +++ "sourceMapFile": "valid-mapping-empty-string.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "indexMapWrongTypeSections", +++ "description": "Test an index map with a sections field with the wrong type", +++ "baseFile": "index-map-wrong-type-sections.js", +++ "sourceMapFile": "index-map-wrong-type-sections.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapWrongTypeOffset", +++ "description": "Test an index map with an offset field with the wrong type", +++ "baseFile": "index-map-wrong-type-offset.js", +++ "sourceMapFile": "index-map-wrong-type-offset.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapWrongTypeMap", +++ "description": "Test an index map with a map field with the wrong type", +++ "baseFile": "index-map-wrong-type-map.js", +++ "sourceMapFile": "index-map-wrong-type-map.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapInvalidBaseMappings", +++ "description": "Test that an index map cannot also have a regular mappings field", +++ "baseFile": "index-map-invalid-base-mappings.js", +++ "sourceMapFile": "index-map-invalid-base-mappings.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapInvalidOverlap", +++ "description": "Test that an invalid index map with multiple sections that overlap", +++ "baseFile": "index-map-invalid-overlap.js", +++ "sourceMapFile": "index-map-invalid-overlap.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapInvalidOrder", +++ "description": "Test that an invalid index map with multiple sections in the wrong order", +++ "baseFile": "index-map-invalid-order.js", +++ "sourceMapFile": "index-map-invalid-order.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapMissingMap", +++ "description": "Test that an index map that is missing a section map", +++ "baseFile": "index-map-missing-map.js", +++ "sourceMapFile": "index-map-missing-map.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapInvalidSubMap", +++ "description": "Test that an index map that has an invalid section map", +++ "baseFile": "index-map-invalid-sub-map.js", +++ "sourceMapFile": "index-map-invalid-sub-map.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapMissingOffset", +++ "description": "Test that an index map that is missing a section offset", +++ "baseFile": "index-map-missing-offset.js", +++ "sourceMapFile": "index-map-missing-offset.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapMissingOffsetLine", +++ "description": "Test that an index map that is missing a section offset's line field", +++ "baseFile": "index-map-missing-offset-line.js", +++ "sourceMapFile": "index-map-missing-offset-line.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapMissingOffsetColumn", +++ "description": "Test that an index map that is missing a section offset's column field", +++ "baseFile": "index-map-missing-offset-column.js", +++ "sourceMapFile": "index-map-missing-offset-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapOffsetLineWrongType", +++ "description": "Test that an index map that has an offset line field with the wrong type of value", +++ "baseFile": "index-map-offset-line-wrong-type.js", +++ "sourceMapFile": "index-map-offset-line-wrong-type.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapOffsetColumnWrongType", +++ "description": "Test that an index map that has an offset column field with the wrong type of value", +++ "baseFile": "index-map-offset-column-wrong-type.js", +++ "sourceMapFile": "index-map-offset-column-wrong-type.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapEmptySections", +++ "description": "Test a trivial index map with no sections", +++ "baseFile": "index-map-empty-sections.js", +++ "sourceMapFile": "index-map-empty-sections.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "indexMapFileWrongType1", +++ "description": "Test an index map with a file field with the wrong type", +++ "baseFile": "index-map-file-wrong-type-1.js", +++ "sourceMapFile": "index-map-file-wrong-type-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapFileWrongType2", +++ "description": "Test an index map with a file field with the wrong type", +++ "baseFile": "index-map-file-wrong-type-2.js", +++ "sourceMapFile": "index-map-file-wrong-type-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "basicMapping", +++ "description": "Test a simple source map that has several valid mappings", +++ "baseFile": "basic-mapping.js", +++ "sourceMapFile": "basic-mapping.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "sourceRootResolution", +++ "description": "Similar to basic mapping test, but test resoultion of sources with a sourceRoot field", +++ "baseFile": "source-root-resolution.js", +++ "sourceMapFile": "source-root-resolution.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "theroot/basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "theroot/basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "sourceResolutionAbsoluteURL", +++ "description": "Test resoultion of sources with absolute URLs", +++ "baseFile": "source-resolution-absolute-url.js", +++ "sourceMapFile": "source-resolution-absolute-url.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "/baz/quux/basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "/baz/quux/basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "basicMappingWithIndexMap", +++ "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", +++ "baseFile": "basic-mapping-as-index-map.js", +++ "sourceMapFile": "basic-mapping-as-index-map.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "indexMapWithMissingFile", +++ "description": "Same as the basic mapping index map test but without the optional file field", +++ "baseFile": "index-map-missing-file.js", +++ "sourceMapFile": "index-map-missing-file.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "indexMapWithTwoConcatenatedSources", +++ "description": "Test an index map that has two sub-maps for concatenated sources", +++ "baseFile": "index-map-two-concatenated-sources.js", +++ "sourceMapFile": "index-map-two-concatenated-sources.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 62, +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 71, +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "baz" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 77, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 83, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 88, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 89, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": "baz" +++ } +++ ] +++ }, +++ { +++ "name": "sourcesNullSourcesContentNonNull", +++ "description": "Test a source map that has a null source but has a sourcesContent", +++ "baseFile": "sources-null-sources-content-non-null.js", +++ "sourceMapFile": "sources-null-sources-content-non-null.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": null, +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": null, +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "sourcesNonNullSourcesContentNull", +++ "description": "Test a source map that has a non-null source but has a null sourcesContent", +++ "baseFile": "sources-non-null-sources-content-null.js", +++ "sourceMapFile": "sources-non-null-sources-content-null.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "transitiveMapping", +++ "description": "Test a simple two-stage transitive mapping from a minified JS to a TypeScript source", +++ "baseFile": "transitive-mapping.js", +++ "sourceMapFile": "transitive-mapping.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 13, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 13, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 16, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 2, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 23, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 2, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 4, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 29, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 4, +++ "originalColumn": 4, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "transitiveMappingWithThreeSteps", +++ "description": "Test a three-stage transitive mapping from an un-minified JS to minified JS to a TypeScript source", +++ "baseFile": "transitive-mapping-three-steps.js", +++ "sourceMapFile": "transitive-mapping-three-steps.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 13, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 13, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 1, +++ "generatedColumn": 4, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 2, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 1, +++ "generatedColumn": 11, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 2, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 2, +++ "generatedColumn": 0, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 4, +++ "generatedColumn": 0, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 4, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 4, +++ "generatedColumn": 4, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 4, +++ "originalColumn": 4, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "vlqValidSingleDigit", +++ "description": "Test VLQ decoding for a single digit, no continuation VLQ", +++ "baseFile": "vlq-valid-single-digit.js", +++ "sourceMapFile": "vlq-valid-single-digit.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalSource": "vlq-valid-single-digit-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "vlqValidNegativeDigit", +++ "description": "Test VLQ decoding where there's a negative digit, no continuation bit", +++ "baseFile": "vlq-valid-negative-digit.js", +++ "sourceMapFile": "vlq-valid-negative-digit.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 2, +++ "generatedColumn": 15, +++ "originalSource": "vlq-valid-negative-digit-original.js", +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 2, +++ "generatedColumn": 2, +++ "originalSource": "vlq-valid-negative-digit-original.js", +++ "originalLine": 1, +++ "originalColumn": 1, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "vlqValidContinuationBitPresent1", +++ "description": "Test VLQ decoding where continuation bits are present (continuations are leading zero)", +++ "baseFile": "vlq-valid-continuation-bit-present-1.js", +++ "sourceMapFile": "vlq-valid-continuation-bit-present-1.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalSource": "vlq-valid-continuation-bit-present-1-original.js", +++ "originalLine": 0, +++ "originalColumn": 1, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "vlqValidContinuationBitPresent2", +++ "description": "Test VLQ decoding where continuation bits are present (continuations have non-zero bits)", +++ "baseFile": "vlq-valid-continuation-bit-present-2.js", +++ "sourceMapFile": "vlq-valid-continuation-bit-present-2.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 2, +++ "generatedColumn": 16, +++ "originalSource": "vlq-valid-continuation-bit-present-2-original.js", +++ "originalLine": 1, +++ "originalColumn": 1, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsSingleFieldSegment", +++ "description": "Test mapping semantics for a single field segment mapping", +++ "baseFile": "mapping-semantics-single-field-segment.js", +++ "sourceMapFile": "mapping-semantics-single-field-segment.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "mapping-semantics-single-field-segment-original.js", +++ "originalLine": 0, +++ "originalColumn": 1, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 2, +++ "originalSource": null, +++ "originalLine": null, +++ "originalColumn": null, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsFourFieldSegment", +++ "description": "Test mapping semantics for a four field segment mapping", +++ "baseFile": "mapping-semantics-four-field-segment.js", +++ "sourceMapFile": "mapping-semantics-four-field-segment.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-four-field-segment-original.js", +++ "originalLine": 2, +++ "originalColumn": 2, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsFiveFieldSegment", +++ "description": "Test mapping semantics for a five field segment mapping", +++ "baseFile": "mapping-semantics-five-field-segment.js", +++ "sourceMapFile": "mapping-semantics-five-field-segment.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-five-field-segment-original.js", +++ "originalLine": 2, +++ "originalColumn": 2, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsColumnReset", +++ "description": "Test that the generated column field resets to zero on new lines", +++ "baseFile": "mapping-semantics-column-reset.js", +++ "sourceMapFile": "mapping-semantics-column-reset.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-column-reset-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 1, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-column-reset-original.js", +++ "originalLine": 1, +++ "originalColumn": 0, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsRelative1", +++ "description": "Test that fields are calculated relative to previous ones", +++ "baseFile": "mapping-semantics-relative-1.js", +++ "sourceMapFile": "mapping-semantics-relative-1.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-relative-1-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 5, +++ "originalSource": "mapping-semantics-relative-1-original.js", +++ "originalLine": 0, +++ "originalColumn": 4, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsRelative2", +++ "description": "Test that fields are calculated relative to previous ones, across lines", +++ "baseFile": "mapping-semantics-relative-2.js", +++ "sourceMapFile": "mapping-semantics-relative-2.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-relative-2-original.js", +++ "originalLine": 0, +++ "originalColumn": 2, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 1, +++ "generatedColumn": 2, +++ "originalSource": "mapping-semantics-relative-2-original.js", +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": "bar" +++ } +++ ] +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js ++new file mode 100644 ++index 0000000000..9263eba549 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-and-sources-content-both-null.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map ++new file mode 100644 ++index 0000000000..09a7c1f369 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "sources": [null], +++ "sourcesContent": [null], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js ++new file mode 100644 ++index 0000000000..779b865e27 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-missing.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map ++new file mode 100644 ++index 0000000000..92aff4fb0e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "version" : 3, +++ "names": ["foo"], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js ++new file mode 100644 ++index 0000000000..939b568ba1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=sources-non-null-sources-content-null.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map ++new file mode 100644 ++index 0000000000..e573906b2d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "sources": ["basic-mapping-original.js"], +++ "sourcesContent": [null], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js ++new file mode 100644 ++index 0000000000..7e33b7e867 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-a-list-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map ++new file mode 100644 ++index 0000000000..26330517b9 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": "not a list", +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js ++new file mode 100644 ++index 0000000000..4021f763fc ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-a-list-2.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map ++new file mode 100644 ++index 0000000000..2ed85962fd ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": { "source.js": 3 }, +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js ++new file mode 100644 ++index 0000000000..7dca97a1da ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-string-or-null.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map ++new file mode 100644 ++index 0000000000..db25561966 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [3, {}, true, false, []], +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js ++new file mode 100644 ++index 0000000000..a760594ee9 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=sources-null-sources-content-non-null.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map ++new file mode 100644 ++index 0000000000..43af03903f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version":3, +++ "names": ["foo"], +++ "sources": [null], +++ "sourcesContent": ["function foo()\n{ return 42; }\nfunction bar()\n { return 24; }\nfoo();\nbar();"], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js ++new file mode 100644 ++index 0000000000..0a96699d6e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js ++@@ -0,0 +1,5 @@ +++function foo(x) { +++ return x; +++} +++foo("foo"); +++//# sourceMappingURL=transitive-mapping-original.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map ++new file mode 100644 ++index 0000000000..65af25c1eb ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "file" : "transitive-mapping-original.js", +++ "sourceRoot": "", +++ "sources": ["typescript-original.ts"], +++ "names": [], +++ "mappings": "AACA,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,CAAC,CAAC;AACX,CAAC;AACD,GAAG,CAAC,KAAK,CAAC,CAAC" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js ++new file mode 100644 ++index 0000000000..fd956164d3 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js ++@@ -0,0 +1,6 @@ +++function foo(x) { +++ return x; +++} +++ +++foo("foo"); +++//# sourceMappingURL=transitive-mapping-three-steps.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map ++new file mode 100644 ++index 0000000000..90459d90f6 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "file": "transitive-mapping-three-steps.js", +++ "sources": ["transitive-mapping.js"], +++ "names": ["foo", "x"], +++ "mappings": "AAAA,SAASA,IAAIC;IAAG,OAAOA;AAAC;;AAACD,IAAI,KAAK" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js ++new file mode 100644 ++index 0000000000..183c027f1b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js ++@@ -0,0 +1,2 @@ +++function foo(x){return x}foo("foo"); +++//# sourceMappingURL=transitive-mapping.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map ++new file mode 100644 ++index 0000000000..d6a6fa6672 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","x"], +++ "sources": ["transitive-mapping-original.js"], +++ "mappings":"AAAA,SAASA,IAAIC,GACT,OAAOA,CACX,CACAD,IAAI" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts b/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts ++new file mode 100644 ++index 0000000000..cd51c01ba1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts ++@@ -0,0 +1,5 @@ +++type FooArg = string | number; +++function foo(x : FooArg) { +++ return x; +++} +++foo("foo"); ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js ++new file mode 100644 ++index 0000000000..19dfb0e2e6 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=unrecognized-property.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map ++new file mode 100644 ++index 0000000000..40bee558a4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "", +++ "foobar": 42, +++ "unusedProperty": [1, 2, 3, 4] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js ++new file mode 100644 ++index 0000000000..3c49709e05 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-boundary-values.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map ++new file mode 100644 ++index 0000000000..4dd836e63d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "file": "valid-mapping-boundary-values.js", +++ "sources": ["empty-original.js"], +++ "mappings": "+/////DA+/////D+/////DA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js ++new file mode 100644 ++index 0000000000..a2b767b619 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-empty-groups.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map ++new file mode 100644 ++index 0000000000..643c9ae784 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "valid-mapping-empty-groups.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js ++new file mode 100644 ++index 0000000000..b0cd897813 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-large-vlq.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map ++new file mode 100644 ++index 0000000000..76e18704c4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": [], +++ "sources": ["valid-mapping-large-vlq.js"], +++ "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js ++new file mode 100644 ++index 0000000000..ee2acf0f5b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=valid-mapping-null-sources.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map ++new file mode 100644 ++index 0000000000..199cda9369 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo"], +++ "sources": [null], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-missing.js b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js ++new file mode 100644 ++index 0000000000..c32d1f1a1c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-missing.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map ++new file mode 100644 ++index 0000000000..49d8ce766e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js ++new file mode 100644 ++index 0000000000..ae2342e2ff ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-not-a-number.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map ++new file mode 100644 ++index 0000000000..a584d6e695 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3foo", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js ++new file mode 100644 ++index 0000000000..a55170885d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-numeric-string.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map ++new file mode 100644 ++index 0000000000..dbe52a7d0d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js ++new file mode 100644 ++index 0000000000..55f4e1a298 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-too-high.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map ++new file mode 100644 ++index 0000000000..ee23be32ff ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 4, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js ++new file mode 100644 ++index 0000000000..d9642920b3 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-too-low.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map ++new file mode 100644 ++index 0000000000..64ca7a6e2e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 2, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-valid.js b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js ++new file mode 100644 ++index 0000000000..82d0bfa1eb ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-valid.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map ++new file mode 100644 ++index 0000000000..1a163052d8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++-- ++2.39.2 ++ +diff --git a/LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch b/LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch +new file mode 100644 +index 000000000000..dc08ba5fadb4 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch +@@ -0,0 +1,46 @@ ++From bebeda0b8133fc8f44382e59edda9203c980e8f3 Mon Sep 17 00:00:00 2001 ++From: Asumu Takikawa ++Date: Thu, 11 Jul 2024 16:44:29 -0700 ++Subject: [PATCH 2/2] Add reverse mapping code to test ++ ++--- ++ front_end/core/sdk/SourceMapSpec.test.ts | 16 +++++++++++++++- ++ 1 file changed, 15 insertions(+), 1 deletion(-) ++ ++diff --git a/front_end/core/sdk/SourceMapSpec.test.ts b/front_end/core/sdk/SourceMapSpec.test.ts ++index 93b26a2e13..402b82e4c0 100644 ++--- a/front_end/core/sdk/SourceMapSpec.test.ts +++++ b/front_end/core/sdk/SourceMapSpec.test.ts ++@@ -12,7 +12,6 @@ ++ ++ **/ ++ ++-const {assert} = chai; ++ import type * as Platform from '../platform/platform.js'; ++ import {assertNotNullOrUndefined} from '../platform/platform.js'; ++ import { SourceMapV3, parseSourceMap } from './SourceMap.js'; ++@@ -170,6 +169,21 @@ describeWithEnvironment('SourceMapSpec', () => { ++ assert.strictEqual(nullish(actual.sourceURL), originalSource, 'unexpected source URL'); ++ assert.strictEqual(nullish(actual.sourceLineNumber), originalLine, 'unexpected source line number'); ++ assert.strictEqual(nullish(actual.sourceColumnNumber), originalColumn, 'unexpected source column number'); +++ +++ if (originalSource != null) { +++ let reverseEntries = sourceMap.findReverseEntries( +++ originalSource as Platform.DevToolsPath.UrlString, +++ originalLine, +++ originalColumn +++ ); +++ +++ const anyEntryMatched = reverseEntries.some((entry) => { +++ return entry.sourceURL === originalSource && +++ entry.sourceLineNumber === originalLine && +++ entry.sourceColumnNumber === originalColumn; +++ }); +++ assert.isTrue(anyEntryMatched, `expected any matching reverse lookup entry, got none`); +++ } ++ } ++ }); ++ } ++-- ++2.39.2 ++ +diff --git a/LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch b/LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch +new file mode 100644 +index 000000000000..a9e256e02f8a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch +@@ -0,0 +1,337 @@ ++From 8327515870d595ab04a111f6c37b84eab8a5010c Mon Sep 17 00:00:00 2001 ++From: Asumu Takikawa ++Date: Tue, 27 Feb 2024 18:22:45 -0800 ++Subject: [PATCH] WIP Firefox source map spec tests ++ ++--- ++ .../test/browser/browser.toml | 2 + ++ .../test/browser/browser_spec-source-map.js | 68 +++++++++++++++++++ ++ .../fixtures/basic-mapping-original.js | 8 +++ ++ .../test/browser/fixtures/basic-mapping.js | 1 + ++ .../browser/fixtures/basic-mapping.js.map | 6 ++ ++ .../fixtures/source-map-spec-tests.json | 60 ++++++++++++++++ ++ .../browser/fixtures/unrecognized-property.js | 1 + ++ .../fixtures/unrecognized-property.js.map | 8 +++ ++ .../browser/fixtures/version-not-a-number.js | 1 + ++ .../fixtures/version-not-a-number.js.map | 6 ++ ++ .../test/browser/fixtures/version-numbers.js | 6 ++ ++ .../test/browser/fixtures/version-too-high.js | 1 + ++ .../browser/fixtures/version-too-high.js.map | 6 ++ ++ .../test/browser/fixtures/version-too-low.js | 1 + ++ .../browser/fixtures/version-too-low.js.map | 6 ++ ++ .../test/browser/fixtures/version-valid.js | 1 + ++ .../browser/fixtures/version-valid.js.map | 6 ++ ++ 17 files changed, 188 insertions(+) ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/browser_spec-source-map.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping-original.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/source-map-spec-tests.json ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-numbers.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js.map ++ ++diff --git a/devtools/client/shared/source-map-loader/test/browser/browser.toml b/devtools/client/shared/source-map-loader/test/browser/browser.toml ++index 5a602e9eeb893..a670ab0acee89 100644 ++--- a/devtools/client/shared/source-map-loader/test/browser/browser.toml +++++ b/devtools/client/shared/source-map-loader/test/browser/browser.toml ++@@ -19,3 +19,5 @@ skip-if = [ ++ "http3", # Bug 1829298 ++ "http2", ++ ] +++ +++["browser_spec-source-map.js"] ++diff --git a/devtools/client/shared/source-map-loader/test/browser/browser_spec-source-map.js b/devtools/client/shared/source-map-loader/test/browser/browser_spec-source-map.js ++new file mode 100644 ++index 0000000000000..34695d6bd395b ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/browser_spec-source-map.js ++@@ -0,0 +1,68 @@ +++"use strict"; +++ +++const { +++ generatedToOriginalId, +++} = require("resource://devtools/client/shared/source-map-loader/utils/index.js"); +++ +++async function isValidSourceMap(base) { +++ try { +++ await fetchFixtureSourceMap(base); +++ } catch (exn) { +++ return false; +++ } +++ return true; +++} +++ +++async function checkMapping(testCase, action) { +++ const originalId = generatedToOriginalId(testCase.baseFile, `${URL_ROOT_SSL}fixtures/${action.originalSource}`); +++ const generatedLoc = await gSourceMapLoader.getGeneratedLocation({ +++ sourceId: originalId, +++ line: action.originalLine + 1, +++ column: action.originalColumn, +++ }); +++ Assert.ok(generatedLoc !== null, "Location lookup should not return null"); +++ Assert.equal(testCase.baseFile, generatedLoc.sourceId); +++ Assert.equal(action.generatedLine + 1, generatedLoc.line); +++ Assert.equal(action.generatedColumn, generatedLoc.column); +++} +++ +++const SPEC_TESTS_URI = `${URL_ROOT_SSL}fixtures/source-map-spec-tests.json` +++const testDescriptions = JSON.parse(read(SPEC_TESTS_URI)); +++ +++for (const testCase of testDescriptions.tests) { +++ async function testFunction() { +++ const baseName = testCase.baseFile.substring(0, testCase.baseFile.indexOf(".js")); +++ Assert.equal(testCase.sourceMapIsValid, await isValidSourceMap(baseName)); +++ +++ if (testCase.testActions) { +++ for (const action of testCase.testActions) { +++ if (action.actionType === "checkMapping") +++ await checkMapping(testCase, action); +++ } +++ } +++ }; +++ Object.defineProperty(testFunction, "name", { value: testCase.name }); +++ add_task(testFunction); +++} +++ +++function read(srcChromeURL) { +++ const scriptableStream = Cc[ +++ "@mozilla.org/scriptableinputstream;1" +++ ].getService(Ci.nsIScriptableInputStream); +++ +++ const channel = NetUtil.newChannel({ +++ uri: srcChromeURL, +++ loadUsingSystemPrincipal: true, +++ }); +++ const input = channel.open(); +++ scriptableStream.init(input); +++ +++ let data = ""; +++ while (input.available()) { +++ data = data.concat(scriptableStream.read(input.available())); +++ } +++ scriptableStream.close(); +++ input.close(); +++ +++ return data; +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping-original.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping-original.js ++new file mode 100644 ++index 0000000000000..301b186cb15e6 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping-original.js ++@@ -0,0 +1,8 @@ +++function foo() { +++ return 42; +++} +++function bar() { +++ return 24; +++} +++foo(); +++bar(); ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js ++new file mode 100644 ++index 0000000000000..9df72406be544 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js ++@@ -0,0 +1 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); ++\ No newline at end of file ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js.map ++new file mode 100644 ++index 0000000000000..12dc9679a4b1d ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/source-map-spec-tests.json b/devtools/client/shared/source-map-loader/test/browser/fixtures/source-map-spec-tests.json ++new file mode 100644 ++index 0000000000000..16d8442811655 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/source-map-spec-tests.json ++@@ -0,0 +1,60 @@ +++{ +++ "tests": [ +++ { +++ "name": "versionValid", +++ "baseFile": "version-valid.js", +++ "sourceMapFile": "version-valid.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "versionNotANumber", +++ "baseFile": "version-not-a-number.js", +++ "sourceMapFile": "version-not-a-number.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooHigh", +++ "baseFile": "version-too-high.js", +++ "sourceMapFile": "version-too-high.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooLow", +++ "baseFile": "version-too-low.js", +++ "sourceMapFile": "version-too-low.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "unrecognizedProperty", +++ "baseFile": "unrecognized-property.js", +++ "sourceMapFile": "unrecognized-property.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "basicMapping", +++ "baseFile": "basic-mapping.js", +++ "sourceMapFile": "basic-mapping.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "mappedName": "bar" +++ } +++ ] +++ } +++ ] +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js ++new file mode 100644 ++index 0000000000000..47303d1fcf302 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=unrecognized-property.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js.map ++new file mode 100644 ++index 0000000000000..40bee558a4ff9 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "", +++ "foobar": 42, +++ "unusedProperty": [1, 2, 3, 4] +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js ++new file mode 100644 ++index 0000000000000..5382a716e3a21 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=version-not-a-number.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js.map ++new file mode 100644 ++index 0000000000000..a584d6e695117 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3foo", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-numbers.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-numbers.js ++new file mode 100644 ++index 0000000000000..e79993b659db6 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-numbers.js ++@@ -0,0 +1,6 @@ +++// Test that invalid version numbers are rejected. +++ +++assert(isValidSourceMap("./version-valid.map")); +++assert(!isValidSourceMap("./version-not-a-number.map")); +++assert(!isValidSourceMap("./version-too-low.map")); +++assert(!isValidSourceMap("./version-too-high.map")); ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js ++new file mode 100644 ++index 0000000000000..04bfe7f62b7b9 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=version-too-high.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js.map ++new file mode 100644 ++index 0000000000000..ee23be32ff278 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 4, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js ++new file mode 100644 ++index 0000000000000..54b3526c6b5e2 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=version-too-low.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js.map ++new file mode 100644 ++index 0000000000000..64ca7a6e2e928 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 2, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js ++new file mode 100644 ++index 0000000000000..f8541f9efdc71 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=version-valid.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js.map ++new file mode 100644 ++index 0000000000000..1a163052d8fc8 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++-- ++2.39.2 ++ +diff --git a/LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js b/LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js +new file mode 100644 +index 000000000000..af18e9bca51d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js +@@ -0,0 +1,71 @@ ++"use strict"; ++ ++const { ++ generatedToOriginalId, ++} = require("resource://devtools/client/shared/source-map-loader/utils/index.js"); ++ ++async function checkValidity(isValid, base, testCase) { ++ try { ++ await fetchFixtureSourceMap(base); ++ const originalId = generatedToOriginalId(testCase.baseFile, "unused"); ++ await gSourceMapLoader.getOriginalRanges(originalId); ++ } catch (exn) { ++ Assert.ok(!isValid, "Source map loading failed with " + exn.message); ++ return; ++ } ++ Assert.ok(isValid, "Source map loading should have failed but did not"); ++} ++ ++async function checkMapping(testCase, action) { ++ const originalId = generatedToOriginalId(testCase.baseFile, `${URL_ROOT_SSL}fixtures/${action.originalSource}`); ++ const generatedLoc = await gSourceMapLoader.getGeneratedLocation({ ++ sourceId: originalId, ++ line: action.originalLine + 1, ++ column: action.originalColumn, ++ }); ++ Assert.ok(generatedLoc !== null, "Location lookup should not return null"); ++ Assert.equal(testCase.baseFile, generatedLoc.sourceId); ++ Assert.equal(action.generatedLine + 1, generatedLoc.line); ++ Assert.equal(action.generatedColumn, generatedLoc.column); ++} ++ ++const SPEC_TESTS_URI = `${URL_ROOT_SSL}fixtures/source-map-spec-tests.json` ++const testDescriptions = JSON.parse(read(SPEC_TESTS_URI)); ++ ++for (const testCase of testDescriptions.tests) { ++ // The following uses a hack to ensure the test case name is used in stack traces. ++ const testFunction = {[testCase.name]: async function() { ++ const baseName = testCase.baseFile.substring(0, testCase.baseFile.indexOf(".js")); ++ await checkValidity(testCase.sourceMapIsValid, baseName, testCase); ++ ++ if (testCase.testActions) { ++ for (const action of testCase.testActions) { ++ if (action.actionType === "checkMapping") ++ await checkMapping(testCase, action); ++ } ++ } ++ }}[testCase.name]; ++ add_task(testFunction); ++} ++ ++function read(srcChromeURL) { ++ const scriptableStream = Cc[ ++ "@mozilla.org/scriptableinputstream;1" ++ ].getService(Ci.nsIScriptableInputStream); ++ ++ const channel = NetUtil.newChannel({ ++ uri: srcChromeURL, ++ loadUsingSystemPrincipal: true, ++ }); ++ const input = channel.open(); ++ scriptableStream.init(input); ++ ++ let data = ""; ++ while (input.available()) { ++ data = data.concat(scriptableStream.read(input.available())); ++ } ++ scriptableStream.close(); ++ input.close(); ++ ++ return data; ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js +new file mode 100644 +index 000000000000..b9fae380437d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=basic-mapping-as-index-map.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map +new file mode 100644 +index 000000000000..c0ad870ed2ba +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "file": "basic-mapping-as-index-map.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js +new file mode 100644 +index 000000000000..301b186cb15e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js +@@ -0,0 +1,8 @@ ++function foo() { ++ return 42; ++} ++function bar() { ++ return 24; ++} ++foo(); ++bar(); +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js +new file mode 100644 +index 000000000000..2e479a4175b8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=basic-mapping.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map +new file mode 100644 +index 000000000000..12dc9679a4b1 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version":3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js +new file mode 100644 +index 000000000000..d049f870450a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=file-not-a-string-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map +new file mode 100644 +index 000000000000..85e973d881df +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "file": [], ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js +new file mode 100644 +index 000000000000..07b8152c0c6c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=file-not-a-string-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map +new file mode 100644 +index 000000000000..a5b6b1f9d94f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "file": 235324, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js +new file mode 100644 +index 000000000000..385a5c3501b2 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-empty.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map +new file mode 100644 +index 000000000000..7297863a9be8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js +new file mode 100644 +index 000000000000..567174a707ef +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-out-of-bounds-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map +new file mode 100644 +index 000000000000..fb2566bb419b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [1] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js +new file mode 100644 +index 000000000000..4216d9a67315 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-out-of-bounds-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map +new file mode 100644 +index 000000000000..41371a76a896 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [-1] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js +new file mode 100644 +index 000000000000..ea64a5565a63 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-valid-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map +new file mode 100644 +index 000000000000..98eebdf7f655 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [0] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js +new file mode 100644 +index 000000000000..8b40bd384767 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map +new file mode 100644 +index 000000000000..688740aba843 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": ["not a number"] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js +new file mode 100644 +index 000000000000..35c77911648e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map +new file mode 100644 +index 000000000000..ca1d30de2d36 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": ["0"] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js +new file mode 100644 +index 000000000000..8735d4175804 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-3.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map +new file mode 100644 +index 000000000000..1ac167d56c4e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": 0 ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js +new file mode 100644 +index 000000000000..35db5acc432b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-4.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map +new file mode 100644 +index 000000000000..c1a27efe980d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [0.5] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js +new file mode 100644 +index 000000000000..abe9f7f30816 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-empty-sections.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map +new file mode 100644 +index 000000000000..f3efabbe00c3 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map +@@ -0,0 +1,4 @@ ++{ ++ "version": 3, ++ "sections": [] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js +new file mode 100644 +index 000000000000..48bb12855bf5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=index-map-file-wrong-type-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map +new file mode 100644 +index 000000000000..dd39b5a2b13c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "file": [], ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js +new file mode 100644 +index 000000000000..c002ba726a51 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=index-map-file-wrong-type-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map +new file mode 100644 +index 000000000000..0ee0a406be8d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "file": 2345234234, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js +new file mode 100644 +index 000000000000..e90bef083c49 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-base-mappings.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map +new file mode 100644 +index 000000000000..b489c1f080b1 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "mappings": "AAAA", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js +new file mode 100644 +index 000000000000..263fa3c6e0b9 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-order.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map +new file mode 100644 +index 000000000000..82da69df720e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map +@@ -0,0 +1,23 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 1, "column": 4 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js +new file mode 100644 +index 000000000000..9aff8dc6203a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-overlap.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map +new file mode 100644 +index 000000000000..8d42546fd899 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map +@@ -0,0 +1,23 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js +new file mode 100644 +index 000000000000..284e8d77e659 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-sub-map.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map +new file mode 100644 +index 000000000000..4020ae30c576 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map +@@ -0,0 +1,13 @@ ++{ ++ "version": 3, ++ "file": "index-map-invalid-sub-map.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": "3", ++ "mappings": 7 ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js +new file mode 100644 +index 000000000000..be2a93cb77cd +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=index-map-missing-file.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map +new file mode 100644 +index 000000000000..8a6d4b5dc788 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js +new file mode 100644 +index 000000000000..86c8e9a2535a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-map.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map +new file mode 100644 +index 000000000000..3bce47e852cf +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js +new file mode 100644 +index 000000000000..fe6917403f18 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map +new file mode 100644 +index 000000000000..aa48bbb99317 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js +new file mode 100644 +index 000000000000..ba8614e412ce +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset-line.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map +new file mode 100644 +index 000000000000..3d60444ea74f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js +new file mode 100644 +index 000000000000..9ca2cf3fb515 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map +new file mode 100644 +index 000000000000..7285138bf51e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map +@@ -0,0 +1,13 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js +new file mode 100644 +index 000000000000..ed1e9ec5d5b8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-offset-column-wrong-type.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map +new file mode 100644 +index 000000000000..b43e79a9dd85 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": true }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js +new file mode 100644 +index 000000000000..d58f2aff993e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-offset-line-wrong-type.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map +new file mode 100644 +index 000000000000..81dbcd6ec434 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": true, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js +new file mode 100644 +index 000000000000..b8702d7187c9 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar();function baz(){return"baz"}baz(); ++//# sourceMappingURL=index-map-two-concatenated-sources.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map +new file mode 100644 +index 000000000000..f67f5de3c5d8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map +@@ -0,0 +1,24 @@ ++{ ++ "version": 3, ++ "file": "index-map-two-concatenated-sources.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 62 }, ++ "map": { ++ "version": 3, ++ "names": ["baz"], ++ "sources": ["second-source-original.js"], ++ "mappings":"AAAA,SAASA,MACP,MAAO,KACT,CACAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js +new file mode 100644 +index 000000000000..d31d6d6358b4 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-map.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map +new file mode 100644 +index 000000000000..0963f623d761 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map +@@ -0,0 +1,9 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": "not a map" ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js +new file mode 100644 +index 000000000000..048e1246f8b0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-offset.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map +new file mode 100644 +index 000000000000..fbc6e4e67887 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": "not an offset", ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js +new file mode 100644 +index 000000000000..011eca806ed6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-sections.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map +new file mode 100644 +index 000000000000..dbfb4ead3001 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map +@@ -0,0 +1,4 @@ ++{ ++ "version": 3, ++ "sections": "not a sections list" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js +new file mode 100644 +index 000000000000..25338aca30ce +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-bad-separator.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map +new file mode 100644 +index 000000000000..5f4f5b92330a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA.SAASA:MACP" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js +new file mode 100644 +index 000000000000..cb38e2fe9d7b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map +new file mode 100644 +index 000000000000..5bf3e2a9d85b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-not-a-string-1.js", ++ "sources": ["empty-original.js"], ++ "mappings": 5 ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js +new file mode 100644 +index 000000000000..3d84abd6c6b4 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map +new file mode 100644 +index 000000000000..4527e7f7641c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-not-a-string-2.js", ++ "sources": ["empty-original.js"], ++ "mappings": [1, 2, 3, 4] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js +new file mode 100644 +index 000000000000..55591f874b1b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map +new file mode 100644 +index 000000000000..b4c059e0151b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-column-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "ggggggE" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js +new file mode 100644 +index 000000000000..2a6b434eff58 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map +new file mode 100644 +index 000000000000..8dd2ea6c2da0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "file": "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js +new file mode 100644 +index 000000000000..709e34dbd326 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map +new file mode 100644 +index 000000000000..c7bf5b98d120 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-name-index-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAggggggE" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js +new file mode 100644 +index 000000000000..a202152d6fdf +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map +new file mode 100644 +index 000000000000..403878bfa47a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-column.js", ++ "sources": ["empty-original.js"], ++ "mappings": "F" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js +new file mode 100644 +index 000000000000..3e3f63420467 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map +new file mode 100644 +index 000000000000..b94f63646e46 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-name-index.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js +new file mode 100644 +index 000000000000..f21d5342b395 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map +new file mode 100644 +index 000000000000..011c639d3f91 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-original-column.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js +new file mode 100644 +index 000000000000..b37309601ce0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map +new file mode 100644 +index 000000000000..e7ec993eebda +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-original-line.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAFA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js +new file mode 100644 +index 000000000000..94b835d6877c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map +new file mode 100644 +index 000000000000..414884072b55 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-column.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "C,F" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js +new file mode 100644 +index 000000000000..c965c5f011f5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-name-index.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map +new file mode 100644 +index 000000000000..1fbbcfcd323e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-name-index.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AAAAC,AAAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js +new file mode 100644 +index 000000000000..493a6ec88a39 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map +new file mode 100644 +index 000000000000..7e62895651fa +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-original-column.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AAAC,AAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js +new file mode 100644 +index 000000000000..ca8329fb98f0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-line.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map +new file mode 100644 +index 000000000000..86b0fb3a04cc +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-original-line.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AACA,AAFA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js +new file mode 100644 +index 000000000000..fa92225b0963 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-source-index.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map +new file mode 100644 +index 000000000000..2efeb047db61 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-source-index.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "ACAA,AFAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js +new file mode 100644 +index 000000000000..6e05849b6a03 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map +new file mode 100644 +index 000000000000..596c2f298bbe +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-source-index.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AFAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js +new file mode 100644 +index 000000000000..0936ed7ea8fd +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map +new file mode 100644 +index 000000000000..ff2103fe24fe +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-original-column-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAggggggE" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js +new file mode 100644 +index 000000000000..9b3aa5a361ae +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map +new file mode 100644 +index 000000000000..890f1c71fc5b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-original-line-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAggggggEA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js +new file mode 100644 +index 000000000000..2e5fbca26825 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map +new file mode 100644 +index 000000000000..86dedb114fa9 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "sources": ["empty-original.js"], ++ "mappings": "ACAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js +new file mode 100644 +index 000000000000..3f4943e1272d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map +new file mode 100644 +index 000000000000..e9f858c6e15d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-source-index-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AggggggEAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js +new file mode 100644 +index 000000000000..4b868fac9c5e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map +new file mode 100644 +index 000000000000..c2af1165ad8f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js +new file mode 100644 +index 000000000000..96045a7a11dd +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map +new file mode 100644 +index 000000000000..73cf00fa1c96 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js +new file mode 100644 +index 000000000000..9d5332a56ca5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map +new file mode 100644 +index 000000000000..5a34d25b645e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-with-zero-fields.js", ++ "sources": ["empty-original.js"], ++ "mappings": ",,,," ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js +new file mode 100644 +index 000000000000..2c2a0090aca6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-vlq-missing-continuation.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map +new file mode 100644 +index 000000000000..dd0e363ff473 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "g" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js +new file mode 100644 +index 000000000000..d1b20b41a29f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-vlq-non-base64-char.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map +new file mode 100644 +index 000000000000..4fa1ac576885 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "A$%?!" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js +new file mode 100644 +index 000000000000..b64482d09843 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js +@@ -0,0 +1,3 @@ ++ foo ++ bar ++//# sourceMappingURL=mapping-semantics-column-reset.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map +new file mode 100644 +index 000000000000..97bc9b91a43d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["mapping-semantics-column-reset-original.js"], ++ "sourcesContent": ["foo\nbar"], ++ "mappings": "CAAA;CACA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js +new file mode 100644 +index 000000000000..0f6602d61503 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js +@@ -0,0 +1,2 @@ ++foo ++//# sourceMappingURL=mapping-semantics-five-field-segment.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map +new file mode 100644 +index 000000000000..d0504f511dad +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": ["unused", "mapping-semantics-five-field-segment-original.js"], ++ "sourcesContent": ["", "\n\n foo"], ++ "mappings": "CCEEA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js +new file mode 100644 +index 000000000000..3dcbee9294c0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js +@@ -0,0 +1,2 @@ ++foo ++//# sourceMappingURL=mapping-semantics-four-field-segment.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map +new file mode 100644 +index 000000000000..9e01ac4b6c58 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["unused", "mapping-semantics-four-field-segment-original.js"], ++ "sourcesContent": ["", "\n\n foo"], ++ "mappings": "CCEE" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js +new file mode 100644 +index 000000000000..281870cc50e7 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js +@@ -0,0 +1,2 @@ ++ 42; 24; ++//# sourceMappingURL=mapping-semantics-relative-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map +new file mode 100644 +index 000000000000..6570031f8983 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["unused", "mapping-semantics-relative-1-original.js"], ++ "sourcesContent": ["", "42; 24;"], ++ "mappings": "CCAA,IAAI" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js +new file mode 100644 +index 000000000000..f4bff1c75bcc +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js +@@ -0,0 +1,3 @@ ++ foo ++ bar ++//# sourceMappingURL=mapping-semantics-relative-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map +new file mode 100644 +index 000000000000..d6845233f912 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo", "bar"], ++ "sources": ["unused", "mapping-semantics-relative-2-original.js"], ++ "sourcesContent": ["", " foo\n bar"], ++ "mappings": "CCAEA;EACAC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js +new file mode 100644 +index 000000000000..ca06b7c58d88 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js +@@ -0,0 +1,2 @@ ++ 3 ++//# sourceMappingURL=mapping-semantics-single-field-segment.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map +new file mode 100644 +index 000000000000..8260d63085d7 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["mapping-semantics-single-field-segment-original.js"], ++ "sourcesContent": ["3 3"], ++ "mappings": "AAAC,E" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js b/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js +new file mode 100644 +index 000000000000..58781fd88705 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-missing.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map +new file mode 100644 +index 000000000000..475f4e309b26 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent" : [""], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js +new file mode 100644 +index 000000000000..dc65f1972b5a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-a-list-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map +new file mode 100644 +index 000000000000..fe1edaeb96ad +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": "not a list", ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js +new file mode 100644 +index 000000000000..d7251f78da84 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-a-list-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map +new file mode 100644 +index 000000000000..3388d2bb7109 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": { "foo": 3 }, ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js +new file mode 100644 +index 000000000000..8dc7b4811a3e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-string.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map +new file mode 100644 +index 000000000000..c0feb0739aec +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": [null, 3, true, false, {}, []], ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js b/LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js +new file mode 100644 +index 000000000000..c339bc9d15da +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js +@@ -0,0 +1,4 @@ ++function baz() { ++ return "baz"; ++} ++baz(); +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js b/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js +new file mode 100644 +index 000000000000..7ab34b6bd0fa +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=source-resolution-absolute-url.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map +new file mode 100644 +index 000000000000..195dc42ecea3 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "file": "source-root-resolution.js", ++ "names": ["foo", "bar"], ++ "sources": ["/baz/quux/basic-mapping-original.js"], ++ "sourcesContent": ["function foo() {\nreturn 42;\n }\n function bar() {\n return 24;\n }\n foo();\n bar();"], ++ "mappings": "AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js +new file mode 100644 +index 000000000000..f176f3143a4a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=source-root-not-a-string-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map +new file mode 100644 +index 000000000000..e297f5c03e50 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sourceRoot": [], ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js +new file mode 100644 +index 000000000000..f176f3143a4a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=source-root-not-a-string-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map +new file mode 100644 +index 000000000000..d5705ebfb8e9 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sourceRoot": -10923409, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js +new file mode 100644 +index 000000000000..15a1a4c95026 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=source-root-resolution.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map +new file mode 100644 +index 000000000000..b2067265c02e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map +@@ -0,0 +1,9 @@ ++{ ++ "version": 3, ++ "sourceRoot": "theroot", ++ "file": "source-root-resolution.js", ++ "names": ["foo", "bar"], ++ "sources": ["basic-mapping-original.js"], ++ "sourcesContent": ["function foo() {\n return 42;\n }\n function bar() {\n return 24;\n }\n foo();\n bar();"], ++ "mappings": "AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js +new file mode 100644 +index 000000000000..9263eba549f5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-and-sources-content-both-null.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map +new file mode 100644 +index 000000000000..09a7c1f3698c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": [null], ++ "sourcesContent": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js +new file mode 100644 +index 000000000000..779b865e2769 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-missing.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map +new file mode 100644 +index 000000000000..92aff4fb0e74 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "version" : 3, ++ "names": ["foo"], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js +new file mode 100644 +index 000000000000..939b568ba142 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=sources-non-null-sources-content-null.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map +new file mode 100644 +index 000000000000..e573906b2d71 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": ["basic-mapping-original.js"], ++ "sourcesContent": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js +new file mode 100644 +index 000000000000..7e33b7e86725 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-a-list-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map +new file mode 100644 +index 000000000000..26330517b988 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": "not a list", ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js +new file mode 100644 +index 000000000000..4021f763fc88 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-a-list-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map +new file mode 100644 +index 000000000000..2ed85962fddf +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": { "source.js": 3 }, ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js +new file mode 100644 +index 000000000000..7dca97a1dab5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-string-or-null.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map +new file mode 100644 +index 000000000000..db2556196605 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [3, {}, true, false, []], ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js +new file mode 100644 +index 000000000000..a760594ee9bd +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=sources-null-sources-content-non-null.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map +new file mode 100644 +index 000000000000..43af03903f64 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version":3, ++ "names": ["foo"], ++ "sources": [null], ++ "sourcesContent": ["function foo()\n{ return 42; }\nfunction bar()\n { return 24; }\nfoo();\nbar();"], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js +new file mode 100644 +index 000000000000..0a96699d6e25 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js +@@ -0,0 +1,5 @@ ++function foo(x) { ++ return x; ++} ++foo("foo"); ++//# sourceMappingURL=transitive-mapping-original.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map +new file mode 100644 +index 000000000000..65af25c1ebbe +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "file" : "transitive-mapping-original.js", ++ "sourceRoot": "", ++ "sources": ["typescript-original.ts"], ++ "names": [], ++ "mappings": "AACA,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,CAAC,CAAC;AACX,CAAC;AACD,GAAG,CAAC,KAAK,CAAC,CAAC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js +new file mode 100644 +index 000000000000..fd956164d349 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js +@@ -0,0 +1,6 @@ ++function foo(x) { ++ return x; ++} ++ ++foo("foo"); ++//# sourceMappingURL=transitive-mapping-three-steps.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map +new file mode 100644 +index 000000000000..90459d90f6a0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "file": "transitive-mapping-three-steps.js", ++ "sources": ["transitive-mapping.js"], ++ "names": ["foo", "x"], ++ "mappings": "AAAA,SAASA,IAAIC;IAAG,OAAOA;AAAC;;AAACD,IAAI,KAAK" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js +new file mode 100644 +index 000000000000..183c027f1bb8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js +@@ -0,0 +1,2 @@ ++function foo(x){return x}foo("foo"); ++//# sourceMappingURL=transitive-mapping.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map +new file mode 100644 +index 000000000000..d6a6fa6672d4 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","x"], ++ "sources": ["transitive-mapping-original.js"], ++ "mappings":"AAAA,SAASA,IAAIC,GACT,OAAOA,CACX,CACAD,IAAI" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts b/LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts +new file mode 100644 +index 000000000000..cd51c01ba129 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts +@@ -0,0 +1,5 @@ ++type FooArg = string | number; ++function foo(x : FooArg) { ++ return x; ++} ++foo("foo"); +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js b/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js +new file mode 100644 +index 000000000000..19dfb0e2e6c7 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=unrecognized-property.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map +new file mode 100644 +index 000000000000..40bee558a4ff +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "", ++ "foobar": 42, ++ "unusedProperty": [1, 2, 3, 4] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js +new file mode 100644 +index 000000000000..3c49709e05ac +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-boundary-values.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map +new file mode 100644 +index 000000000000..4dd836e63d8f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "file": "valid-mapping-boundary-values.js", ++ "sources": ["empty-original.js"], ++ "mappings": "+/////DA+/////D+/////DA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js +new file mode 100644 +index 000000000000..a2b767b619a0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-empty-groups.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map +new file mode 100644 +index 000000000000..643c9ae78481 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "valid-mapping-empty-groups.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js +new file mode 100644 +index 000000000000..83fc1bf3ac73 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-empty-string.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map +new file mode 100644 +index 000000000000..a35268d8f5b8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "valid-mapping-empty-string.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js +new file mode 100644 +index 000000000000..b0cd8978132a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-large-vlq.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map +new file mode 100644 +index 000000000000..76e18704c4b1 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["valid-mapping-large-vlq.js"], ++ "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js +new file mode 100644 +index 000000000000..c32d1f1a1cc6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-missing.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map +new file mode 100644 +index 000000000000..49d8ce766edb +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js +new file mode 100644 +index 000000000000..ae2342e2ffe5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-not-a-number.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map +new file mode 100644 +index 000000000000..a584d6e69511 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : "3foo", ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js +new file mode 100644 +index 000000000000..a55170885da6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-numeric-string.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map +new file mode 100644 +index 000000000000..dbe52a7d0df6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : "3", ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js +new file mode 100644 +index 000000000000..55f4e1a298fa +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-too-high.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map +new file mode 100644 +index 000000000000..ee23be32ff27 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 4, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js +new file mode 100644 +index 000000000000..d9642920b313 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-too-low.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map +new file mode 100644 +index 000000000000..64ca7a6e2e92 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 2, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js +new file mode 100644 +index 000000000000..82d0bfa1eb2a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-valid.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map +new file mode 100644 +index 000000000000..1a163052d8fc +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js +new file mode 100644 +index 000000000000..511e7be18ae5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js +@@ -0,0 +1,2 @@ ++ 3 ++//# sourceMappingURL=vlq-valid-continuation-bit-present-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map +new file mode 100644 +index 000000000000..f4acb4b41837 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["vlq-valid-continuation-bit-present-1-original.js"], ++ "sourcesContent": [" 3"], ++ "mappings": "+gAgAgAigA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js +new file mode 100644 +index 000000000000..0c879ce052ad +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js +@@ -0,0 +1,4 @@ ++ ++ ++ 3 ++//# sourceMappingURL=vlq-valid-continuation-bit-present-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map +new file mode 100644 +index 000000000000..a975cf8591ff +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["vlq-valid-continuation-bit-present-2-original.js"], ++ "sourcesContent": ["\n 3"], ++ "mappings": ";;gBACC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js +new file mode 100644 +index 000000000000..d8e795090eff +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js +@@ -0,0 +1,4 @@ ++ ++ ++ 4; 3 ++//# sourceMappingURL=vlq-valid-negative-digit.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map +new file mode 100644 +index 000000000000..71dec0d65a1a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["vlq-valid-negative-digit-original.js"], ++ "sourcesContent": ["\n 4;3"], ++ "mappings": ";;eACG,bAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js +new file mode 100644 +index 000000000000..54c59aae1fcb +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js +@@ -0,0 +1,2 @@ ++ 3 ++//# sourceMappingURL=vlq-valid-single-digit.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map +new file mode 100644 +index 000000000000..9e35a7a0a6a5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["vlq-valid-single-digit-original.js"], ++ "sourcesContent": ["3"], ++ "mappings": "eAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json b/LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json +new file mode 100644 +index 000000000000..4601502fffd6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json +@@ -0,0 +1,1554 @@ ++{ ++ "tests": [ ++ { ++ "name": "versionValid", ++ "description": "Test a simple source map with a valid version number", ++ "baseFile": "version-valid.js", ++ "sourceMapFile": "version-valid.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "versionMissing", ++ "description": "Test a source map that is missing a version field", ++ "baseFile": "version-missing.js", ++ "sourceMapFile": "version-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionNotANumber", ++ "description": "Test a source map with a version field that is not a number", ++ "baseFile": "version-not-a-number.js", ++ "sourceMapFile": "version-not-a-number.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionNumericString", ++ "description": "Test a source map with a version field that is a number as a string", ++ "baseFile": "version-numeric-string.js", ++ "sourceMapFile": "version-numeric-string.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionTooHigh", ++ "description": "Test a source map with an integer version field that is too high", ++ "baseFile": "version-too-high.js", ++ "sourceMapFile": "version-too-high.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionTooLow", ++ "description": "Test a source map with an integer version field that is too low", ++ "baseFile": "version-too-low.js", ++ "sourceMapFile": "version-too-low.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesMissing", ++ "description": "Test a source map that is missing a necessary sources field", ++ "baseFile": "sources-missing.js", ++ "sourceMapFile": "sources-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotAList1", ++ "description": "Test a source map with a sources field that is not a valid list (string)", ++ "baseFile": "sources-not-a-list-1.js", ++ "sourceMapFile": "sources-not-a-list-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotAList2", ++ "description": "Test a source map with a sources field that is not a valid list (object)", ++ "baseFile": "sources-not-a-list-2.js", ++ "sourceMapFile": "sources-not-a-list-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotStringOrNull", ++ "description": "Test a source map with a sources list that has non-string and non-null items", ++ "baseFile": "sources-not-string-or-null.js", ++ "sourceMapFile": "sources-not-string-or-null.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesAndSourcesContentBothNull", ++ "description": "Test a source map that has both null sources and sourcesContent entries", ++ "baseFile": "sources-and-sources-content-both-null.js", ++ "sourceMapFile": "sources-and-sources-content-both-null.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "fileNotAString1", ++ "description": "Test a source map with a file field that is not a valid string", ++ "baseFile": "file-not-a-string-1.js", ++ "sourceMapFile": "file-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "fileNotAString2", ++ "description": "Test a source map with a file field that is not a valid string", ++ "baseFile": "file-not-a-string-2.js", ++ "sourceMapFile": "file-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourceRootNotAString1", ++ "description": "Test a source map with a sourceRoot field that is not a valid string", ++ "baseFile": "source-root-not-a-string-1.js", ++ "sourceMapFile": "source-root-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourceRootNotAString2", ++ "description": "Test a source map with a sourceRoot field that is not a valid string", ++ "baseFile": "source-root-not-a-string-2.js", ++ "sourceMapFile": "source-root-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesMissing", ++ "description": "Test a source map that is missing the optional names field", ++ "baseFile": "names-missing.js", ++ "sourceMapFile": "names-missing.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "namesNotAList1", ++ "description": "Test a source map with a names field that is not a valid list (string)", ++ "baseFile": "names-not-a-list-1.js", ++ "sourceMapFile": "names-not-a-list-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotAList2", ++ "description": "Test a source map with a names field that is not a valid list (object)", ++ "baseFile": "names-not-a-list-2.js", ++ "sourceMapFile": "names-not-a-list-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotString", ++ "description": "Test a source map with a names list that has non-string items", ++ "baseFile": "names-not-string.js", ++ "sourceMapFile": "names-not-string.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListEmpty", ++ "description": "Test a source map with an ignore list that has no items", ++ "baseFile": "ignore-list-empty.js", ++ "sourceMapFile": "ignore-list-empty.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "ignoreListValid1", ++ "description": "Test a source map with a simple valid ignore list", ++ "baseFile": "ignore-list-valid-1.js", ++ "sourceMapFile": "ignore-list-valid-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkIgnoreList", ++ "present": ["empty-original.js"] ++ } ++ ] ++ }, ++ { ++ "name": "ignoreListWrongType1", ++ "description": "Test a source map with an ignore list with the wrong type of items", ++ "baseFile": "ignore-list-wrong-type-1.js", ++ "sourceMapFile": "ignore-list-wrong-type-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType2", ++ "description": "Test a source map with an ignore list with the wrong type of items", ++ "baseFile": "ignore-list-wrong-type-2.js", ++ "sourceMapFile": "ignore-list-wrong-type-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType3", ++ "description": "Test a source map with an ignore list that is not a list", ++ "baseFile": "ignore-list-wrong-type-3.js", ++ "sourceMapFile": "ignore-list-wrong-type-3.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType4", ++ "description": "Test a source map with an ignore list with a negative index", ++ "baseFile": "ignore-list-wrong-type-4.js", ++ "sourceMapFile": "ignore-list-wrong-type-4.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListOutOfBounds1", ++ "description": "Test a source map with an ignore list with an item with an out-of-bounds index (too big)", ++ "baseFile": "ignore-list-out-of-bounds-1.js", ++ "sourceMapFile": "ignore-list-out-of-bounds-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListOutOfBounds2", ++ "description": "Test a source map with an ignore list with an item with an out-of-bounds index (too low)", ++ "baseFile": "ignore-list-out-of-bounds-2.js", ++ "sourceMapFile": "ignore-list-out-of-bounds-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "unrecognizedProperty", ++ "description": "Test a source map that has an extra field not explicitly encoded in the spec", ++ "baseFile": "unrecognized-property.js", ++ "sourceMapFile": "unrecognized-property.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "invalidVLQDueToNonBase64Character", ++ "description": "Test a source map that has a mapping with an invalid non-base64 character", ++ "baseFile": "invalid-vlq-non-base64-char.js", ++ "sourceMapFile": "invalid-vlq-non-base64-char.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidVLQDueToMissingContinuationDigits", ++ "description": "Test a source map that has a mapping with an invalid VLQ that has a continuation bit but no continuing digits", ++ "baseFile": "invalid-vlq-missing-continuation.js", ++ "sourceMapFile": "invalid-vlq-missing-continuation.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingNotAString1", ++ "description": "Test a source map that has an invalid mapping that is not a string (number)", ++ "baseFile": "invalid-mapping-not-a-string-1.js", ++ "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingNotAString2", ++ "description": "Test a source map that has an invalid mapping that is not a string (array)", ++ "baseFile": "invalid-mapping-not-a-string-2.js", ++ "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentBadSeparator", ++ "description": "Test a source map that uses separator characters not recognized in the spec", ++ "baseFile": "invalid-mapping-bad-separator.js", ++ "sourceMapFile": "invalid-mapping-bad-separator.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithZeroFields", ++ "description": "Test a source map that has the wrong number (zero) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-zero-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithTwoFields", ++ "description": "Test a source map that has the wrong number (two) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-two-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithThreeFields", ++ "description": "Test a source map that has the wrong number (three) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-three-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", ++ "description": "Test a source map that has a source index field that is out of bounds of the sources field", ++ "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNameIndexOutOfBounds", ++ "description": "Test a source map that has a name index field that is out of bounds of the names field", ++ "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeColumn", ++ "description": "Test a source map that has an invalid negative non-relative column field", ++ "baseFile": "invalid-mapping-segment-negative-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeSourceIndex", ++ "description": "Test a source map that has an invalid negative non-relative source index field", ++ "baseFile": "invalid-mapping-segment-negative-source-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeOriginalLine", ++ "description": "Test a source map that has an invalid negative non-relative original line field", ++ "baseFile": "invalid-mapping-segment-negative-original-line.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeOriginalColumn", ++ "description": "Test a source map that has an invalid negative non-relative original column field", ++ "baseFile": "invalid-mapping-segment-negative-original-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeNameIndex", ++ "description": "Test a source map that has an invalid negative non-relative name index field", ++ "baseFile": "invalid-mapping-segment-negative-name-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeColumn", ++ "description": "Test a source map that has an invalid negative relative column field", ++ "baseFile": "invalid-mapping-segment-negative-relative-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeSourceIndex", ++ "description": "Test a source map that has an invalid negative relative source index field", ++ "baseFile": "invalid-mapping-segment-negative-relative-source-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-source-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalLine", ++ "description": "Test a source map that has an invalid negative relative original line field", ++ "baseFile": "invalid-mapping-segment-negative-relative-original-line.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalColumn", ++ "description": "Test a source map that has an invalid negative relative original column field", ++ "baseFile": "invalid-mapping-segment-negative-relative-original-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeNameIndex", ++ "description": "Test a source map that has an invalid negative relative name index field", ++ "baseFile": "invalid-mapping-segment-negative-relative-name-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-name-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithColumnExceeding32Bits", ++ "description": "Test a source map that has a column field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-column-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", ++ "description": "Test a source map that has a source index field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-source-index-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", ++ "description": "Test a source map that has a original line field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-original-line-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", ++ "description": "Test a source map that has an original column field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-original-column-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", ++ "description": "Test a source map that has a name index field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-name-index-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "validMappingFieldsWith32BitMaxValues", ++ "description": "Test a source map that has segment fields with max values representable in 32 bits", ++ "baseFile": "valid-mapping-boundary-values.js", ++ "sourceMapFile": "valid-mapping-boundary-values.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingLargeVLQ", ++ "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", ++ "baseFile": "valid-mapping-large-vlq.js", ++ "sourceMapFile": "valid-mapping-large-vlq.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingEmptyGroups", ++ "description": "Test a source map with a mapping that has many empty groups", ++ "baseFile": "valid-mapping-empty-groups.js", ++ "sourceMapFile": "valid-mapping-empty-groups.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingEmptyString", ++ "description": "Test a source map with an empty string mapping", ++ "baseFile": "valid-mapping-empty-string.js", ++ "sourceMapFile": "valid-mapping-empty-string.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "indexMapWrongTypeSections", ++ "description": "Test an index map with a sections field with the wrong type", ++ "baseFile": "index-map-wrong-type-sections.js", ++ "sourceMapFile": "index-map-wrong-type-sections.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapWrongTypeOffset", ++ "description": "Test an index map with an offset field with the wrong type", ++ "baseFile": "index-map-wrong-type-offset.js", ++ "sourceMapFile": "index-map-wrong-type-offset.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapWrongTypeMap", ++ "description": "Test an index map with a map field with the wrong type", ++ "baseFile": "index-map-wrong-type-map.js", ++ "sourceMapFile": "index-map-wrong-type-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidBaseMappings", ++ "description": "Test that an index map cannot also have a regular mappings field", ++ "baseFile": "index-map-invalid-base-mappings.js", ++ "sourceMapFile": "index-map-invalid-base-mappings.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidOverlap", ++ "description": "Test that an invalid index map with multiple sections that overlap", ++ "baseFile": "index-map-invalid-overlap.js", ++ "sourceMapFile": "index-map-invalid-overlap.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidOrder", ++ "description": "Test that an invalid index map with multiple sections in the wrong order", ++ "baseFile": "index-map-invalid-order.js", ++ "sourceMapFile": "index-map-invalid-order.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingMap", ++ "description": "Test that an index map that is missing a section map", ++ "baseFile": "index-map-missing-map.js", ++ "sourceMapFile": "index-map-missing-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidSubMap", ++ "description": "Test that an index map that has an invalid section map", ++ "baseFile": "index-map-invalid-sub-map.js", ++ "sourceMapFile": "index-map-invalid-sub-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffset", ++ "description": "Test that an index map that is missing a section offset", ++ "baseFile": "index-map-missing-offset.js", ++ "sourceMapFile": "index-map-missing-offset.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffsetLine", ++ "description": "Test that an index map that is missing a section offset's line field", ++ "baseFile": "index-map-missing-offset-line.js", ++ "sourceMapFile": "index-map-missing-offset-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffsetColumn", ++ "description": "Test that an index map that is missing a section offset's column field", ++ "baseFile": "index-map-missing-offset-column.js", ++ "sourceMapFile": "index-map-missing-offset-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapOffsetLineWrongType", ++ "description": "Test that an index map that has an offset line field with the wrong type of value", ++ "baseFile": "index-map-offset-line-wrong-type.js", ++ "sourceMapFile": "index-map-offset-line-wrong-type.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapOffsetColumnWrongType", ++ "description": "Test that an index map that has an offset column field with the wrong type of value", ++ "baseFile": "index-map-offset-column-wrong-type.js", ++ "sourceMapFile": "index-map-offset-column-wrong-type.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapEmptySections", ++ "description": "Test a trivial index map with no sections", ++ "baseFile": "index-map-empty-sections.js", ++ "sourceMapFile": "index-map-empty-sections.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "indexMapFileWrongType1", ++ "description": "Test an index map with a file field with the wrong type", ++ "baseFile": "index-map-file-wrong-type-1.js", ++ "sourceMapFile": "index-map-file-wrong-type-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapFileWrongType2", ++ "description": "Test an index map with a file field with the wrong type", ++ "baseFile": "index-map-file-wrong-type-2.js", ++ "sourceMapFile": "index-map-file-wrong-type-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "basicMapping", ++ "description": "Test a simple source map that has several valid mappings", ++ "baseFile": "basic-mapping.js", ++ "sourceMapFile": "basic-mapping.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "sourceRootResolution", ++ "description": "Similar to basic mapping test, but test resoultion of sources with a sourceRoot field", ++ "baseFile": "source-root-resolution.js", ++ "sourceMapFile": "source-root-resolution.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "theroot/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "theroot/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "sourceResolutionAbsoluteURL", ++ "description": "Test resoultion of sources with absolute URLs", ++ "baseFile": "source-resolution-absolute-url.js", ++ "sourceMapFile": "source-resolution-absolute-url.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "/baz/quux/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "/baz/quux/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "basicMappingWithIndexMap", ++ "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", ++ "baseFile": "basic-mapping-as-index-map.js", ++ "sourceMapFile": "basic-mapping-as-index-map.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "indexMapWithMissingFile", ++ "description": "Same as the basic mapping index map test but without the optional file field", ++ "baseFile": "index-map-missing-file.js", ++ "sourceMapFile": "index-map-missing-file.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "indexMapWithTwoConcatenatedSources", ++ "description": "Test an index map that has two sub-maps for concatenated sources", ++ "baseFile": "index-map-two-concatenated-sources.js", ++ "sourceMapFile": "index-map-two-concatenated-sources.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 62, ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 71, ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "baz" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 77, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 83, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 88, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 89, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": "baz" ++ } ++ ] ++ }, ++ { ++ "name": "sourcesNullSourcesContentNonNull", ++ "description": "Test a source map that has a null source but has a sourcesContent", ++ "baseFile": "sources-null-sources-content-non-null.js", ++ "sourceMapFile": "sources-null-sources-content-non-null.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": null, ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": null, ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "sourcesNonNullSourcesContentNull", ++ "description": "Test a source map that has a non-null source but has a null sourcesContent", ++ "baseFile": "sources-non-null-sources-content-null.js", ++ "sourceMapFile": "sources-non-null-sources-content-null.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "transitiveMapping", ++ "description": "Test a simple two-stage transitive mapping from a minified JS to a TypeScript source", ++ "baseFile": "transitive-mapping.js", ++ "sourceMapFile": "transitive-mapping.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 13, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 13, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 16, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 23, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 29, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "transitiveMappingWithThreeSteps", ++ "description": "Test a three-stage transitive mapping from an un-minified JS to minified JS to a TypeScript source", ++ "baseFile": "transitive-mapping-three-steps.js", ++ "sourceMapFile": "transitive-mapping-three-steps.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 13, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 13, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 1, ++ "generatedColumn": 4, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 1, ++ "generatedColumn": 11, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 2, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 4, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 4, ++ "generatedColumn": 4, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidSingleDigit", ++ "description": "Test VLQ decoding for a single digit, no continuation VLQ", ++ "baseFile": "vlq-valid-single-digit.js", ++ "sourceMapFile": "vlq-valid-single-digit.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-single-digit-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidNegativeDigit", ++ "description": "Test VLQ decoding where there's a negative digit, no continuation bit", ++ "baseFile": "vlq-valid-negative-digit.js", ++ "sourceMapFile": "vlq-valid-negative-digit.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-negative-digit-original.js", ++ "originalLine": 1, ++ "originalColumn": 3, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 2, ++ "originalSource": "vlq-valid-negative-digit-original.js", ++ "originalLine": 1, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidContinuationBitPresent1", ++ "description": "Test VLQ decoding where continuation bits are present (continuations are leading zero)", ++ "baseFile": "vlq-valid-continuation-bit-present-1.js", ++ "sourceMapFile": "vlq-valid-continuation-bit-present-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-continuation-bit-present-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidContinuationBitPresent2", ++ "description": "Test VLQ decoding where continuation bits are present (continuations have non-zero bits)", ++ "baseFile": "vlq-valid-continuation-bit-present-2.js", ++ "sourceMapFile": "vlq-valid-continuation-bit-present-2.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 16, ++ "originalSource": "vlq-valid-continuation-bit-present-2-original.js", ++ "originalLine": 1, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsSingleFieldSegment", ++ "description": "Test mapping semantics for a single field segment mapping", ++ "baseFile": "mapping-semantics-single-field-segment.js", ++ "sourceMapFile": "mapping-semantics-single-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "mapping-semantics-single-field-segment-original.js", ++ "originalLine": 0, ++ "originalColumn": 1, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 2, ++ "originalSource": null, ++ "originalLine": null, ++ "originalColumn": null, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsFourFieldSegment", ++ "description": "Test mapping semantics for a four field segment mapping", ++ "baseFile": "mapping-semantics-four-field-segment.js", ++ "sourceMapFile": "mapping-semantics-four-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-four-field-segment-original.js", ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsFiveFieldSegment", ++ "description": "Test mapping semantics for a five field segment mapping", ++ "baseFile": "mapping-semantics-five-field-segment.js", ++ "sourceMapFile": "mapping-semantics-five-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-five-field-segment-original.js", ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsColumnReset", ++ "description": "Test that the generated column field resets to zero on new lines", ++ "baseFile": "mapping-semantics-column-reset.js", ++ "sourceMapFile": "mapping-semantics-column-reset.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-column-reset-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 1, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-column-reset-original.js", ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsRelative1", ++ "description": "Test that fields are calculated relative to previous ones", ++ "baseFile": "mapping-semantics-relative-1.js", ++ "sourceMapFile": "mapping-semantics-relative-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-relative-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 5, ++ "originalSource": "mapping-semantics-relative-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsRelative2", ++ "description": "Test that fields are calculated relative to previous ones, across lines", ++ "baseFile": "mapping-semantics-relative-2.js", ++ "sourceMapFile": "mapping-semantics-relative-2.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-relative-2-original.js", ++ "originalLine": 0, ++ "originalColumn": 2, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 1, ++ "generatedColumn": 2, ++ "originalSource": "mapping-semantics-relative-2-original.js", ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": "bar" ++ } ++ ] ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch b/LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch +new file mode 100644 +index 000000000000..050bf042bac6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch +@@ -0,0 +1,1649 @@ ++From d2ac7108de0b2a76e072ba8d7d4a9e733d3782ef Mon Sep 17 00:00:00 2001 ++From: Asumu Takikawa ++Date: Mon, 11 Mar 2024 13:41:31 -0700 ++Subject: [PATCH] Add harness for source maps spec tests ++ ++Need a short description (OOPS!). ++Need the bug URL (OOPS!). ++ ++Reviewed by NOBODY (OOPS!). ++ ++Explanation of why this fixes the bug (OOPS!). ++ ++* LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map: Added. ++* LayoutTests/inspector/model/resources/basic-mapping-original.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/basic-mapping.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/basic-mapping.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js: Added. ++* LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map: Added. ++* LayoutTests/inspector/model/resources/names-missing.js: Added. ++* LayoutTests/inspector/model/resources/names-missing.js.map: Added. ++* LayoutTests/inspector/model/resources/names-not-a-list-1.js: Added. ++* LayoutTests/inspector/model/resources/names-not-a-list-1.js.map: Added. ++* LayoutTests/inspector/model/resources/names-not-a-list-2.js: Added. ++* LayoutTests/inspector/model/resources/names-not-a-list-2.js.map: Added. ++* LayoutTests/inspector/model/resources/source-map-spec-tests.json: Added. ++* LayoutTests/inspector/model/resources/sources-missing.js: Added. ++* LayoutTests/inspector/model/resources/sources-missing.js.map: Added. ++* LayoutTests/inspector/model/resources/sources-not-a-list-1.js: Added. ++* LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map: Added. ++* LayoutTests/inspector/model/resources/sources-not-a-list-2.js: Added. ++* LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map: Added. ++* LayoutTests/inspector/model/resources/unrecognized-property.js: Added. ++* LayoutTests/inspector/model/resources/unrecognized-property.js.map: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-null-sources.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map: Added. ++* LayoutTests/inspector/model/resources/version-not-a-number.js: Added. ++* LayoutTests/inspector/model/resources/version-not-a-number.js.map: Added. ++* LayoutTests/inspector/model/resources/version-numeric-string.js: Added. ++* LayoutTests/inspector/model/resources/version-numeric-string.js.map: Added. ++* LayoutTests/inspector/model/resources/version-too-high.js: Added. ++* LayoutTests/inspector/model/resources/version-too-high.js.map: Added. ++* LayoutTests/inspector/model/resources/version-too-low.js: Added. ++* LayoutTests/inspector/model/resources/version-too-low.js.map: Added. ++* LayoutTests/inspector/model/resources/version-valid.js: Added. ++* LayoutTests/inspector/model/resources/version-valid.js.map: Added. ++* LayoutTests/inspector/model/source-map-spec-expected.txt: Added. ++* LayoutTests/inspector/model/source-map-spec.html: Added. ++--- ++ .../resources/basic-mapping-as-index-map.js | 2 + ++ .../basic-mapping-as-index-map.js.map | 23 + ++ .../model/resources/basic-mapping-original.js | 8 + ++ .../model/resources/basic-mapping.js | 2 + ++ .../model/resources/basic-mapping.js.map | 6 + ++ .../invalid-mapping-bad-separator.js | 2 + ++ .../invalid-mapping-bad-separator.js.map | 6 + ++ .../invalid-mapping-not-a-string-1.js | 1 + ++ .../invalid-mapping-not-a-string-1.js.map | 7 + ++ .../invalid-mapping-not-a-string-2.js | 1 + ++ .../invalid-mapping-not-a-string-2.js.map | 7 + ++ ...nvalid-mapping-segment-column-too-large.js | 1 + ++ ...id-mapping-segment-column-too-large.js.map | 7 + ++ ...apping-segment-name-index-out-of-bounds.js | 1 + ++ ...ng-segment-name-index-out-of-bounds.js.map | 7 + ++ ...id-mapping-segment-name-index-too-large.js | 1 + ++ ...apping-segment-name-index-too-large.js.map | 7 + ++ ...invalid-mapping-segment-negative-column.js | 1 + ++ ...lid-mapping-segment-negative-column.js.map | 7 + ++ ...lid-mapping-segment-negative-name-index.js | 1 + ++ ...mapping-segment-negative-name-index.js.map | 7 + ++ ...apping-segment-negative-original-column.js | 1 + ++ ...ng-segment-negative-original-column.js.map | 7 + ++ ...-mapping-segment-negative-original-line.js | 1 + ++ ...ping-segment-negative-original-line.js.map | 7 + ++ ...d-mapping-segment-negative-source-index.js | 1 + ++ ...pping-segment-negative-source-index.js.map | 7 + ++ ...pping-segment-original-column-too-large.js | 1 + ++ ...g-segment-original-column-too-large.js.map | 7 + ++ ...mapping-segment-original-line-too-large.js | 1 + ++ ...ing-segment-original-line-too-large.js.map | 7 + ++ ...ping-segment-source-index-out-of-bounds.js | 1 + ++ ...-segment-source-index-out-of-bounds.js.map | 7 + ++ ...-mapping-segment-source-index-too-large.js | 1 + ++ ...ping-segment-source-index-too-large.js.map | 7 + ++ ...valid-mapping-segment-with-three-fields.js | 2 + ++ ...d-mapping-segment-with-three-fields.js.map | 6 + ++ ...invalid-mapping-segment-with-two-fields.js | 2 + ++ ...lid-mapping-segment-with-two-fields.js.map | 6 + ++ ...nvalid-mapping-segment-with-zero-fields.js | 1 + ++ ...id-mapping-segment-with-zero-fields.js.map | 7 + ++ .../resources/invalid-vlq-non-base64-char.js | 1 + ++ .../invalid-vlq-non-base64-char.js.map | 6 + ++ .../model/resources/names-missing.js | 1 + ++ .../model/resources/names-missing.js.map | 5 + ++ .../model/resources/names-not-a-list-1.js | 1 + ++ .../model/resources/names-not-a-list-1.js.map | 6 + ++ .../model/resources/names-not-a-list-2.js | 1 + ++ .../model/resources/names-not-a-list-2.js.map | 6 + ++ .../resources/source-map-spec-tests.json | 503 ++++++++++++++++++ ++ .../model/resources/sources-missing.js | 1 + ++ .../model/resources/sources-missing.js.map | 5 + ++ .../model/resources/sources-not-a-list-1.js | 1 + ++ .../resources/sources-not-a-list-1.js.map | 6 + ++ .../model/resources/sources-not-a-list-2.js | 1 + ++ .../resources/sources-not-a-list-2.js.map | 6 + ++ .../model/resources/unrecognized-property.js | 1 + ++ .../resources/unrecognized-property.js.map | 8 + ++ .../valid-mapping-boundary-values.js | 1 + ++ .../valid-mapping-boundary-values.js.map | 7 + ++ .../resources/valid-mapping-empty-groups.js | 1 + ++ .../valid-mapping-empty-groups.js.map | 7 + ++ .../resources/valid-mapping-large-vlq.js | 1 + ++ .../resources/valid-mapping-large-vlq.js.map | 6 + ++ .../resources/valid-mapping-null-sources.js | 2 + ++ .../valid-mapping-null-sources.js.map | 6 + ++ .../model/resources/version-not-a-number.js | 1 + ++ .../resources/version-not-a-number.js.map | 6 + ++ .../model/resources/version-numeric-string.js | 1 + ++ .../resources/version-numeric-string.js.map | 6 + ++ .../model/resources/version-too-high.js | 1 + ++ .../model/resources/version-too-high.js.map | 6 + ++ .../model/resources/version-too-low.js | 1 + ++ .../model/resources/version-too-low.js.map | 6 + ++ .../model/resources/version-valid.js | 1 + ++ .../model/resources/version-valid.js.map | 6 + ++ .../model/source-map-spec-expected.txt | 22 + ++ .../inspector/model/source-map-spec.html | 83 +++ ++ 78 files changed, 915 insertions(+) ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping-original.js ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping.js ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/names-missing.js ++ create mode 100644 LayoutTests/inspector/model/resources/names-missing.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/names-not-a-list-1.js ++ create mode 100644 LayoutTests/inspector/model/resources/names-not-a-list-1.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/names-not-a-list-2.js ++ create mode 100644 LayoutTests/inspector/model/resources/names-not-a-list-2.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/source-map-spec-tests.json ++ create mode 100644 LayoutTests/inspector/model/resources/sources-missing.js ++ create mode 100644 LayoutTests/inspector/model/resources/sources-missing.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/sources-not-a-list-1.js ++ create mode 100644 LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/sources-not-a-list-2.js ++ create mode 100644 LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/unrecognized-property.js ++ create mode 100644 LayoutTests/inspector/model/resources/unrecognized-property.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-null-sources.js ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-not-a-number.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-not-a-number.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-numeric-string.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-numeric-string.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-too-high.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-too-high.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-too-low.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-too-low.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-valid.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-valid.js.map ++ create mode 100644 LayoutTests/inspector/model/source-map-spec-expected.txt ++ create mode 100644 LayoutTests/inspector/model/source-map-spec.html ++ ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js b/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js ++new file mode 100644 ++index 000000000000..b9fae380437d ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=basic-mapping-as-index-map.js.map ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map b/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map ++new file mode 100644 ++index 000000000000..12053a5698a6 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map ++@@ -0,0 +1,23 @@ +++{ +++ "version": "3", +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": "3", +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA" +++ } +++ }, +++ { +++ "offset": { "line": 0, "column": 34 }, +++ "map": { +++ "version": "3", +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAGSC,MACP,OAAO,EACT,CACAD,MACAC" +++ } +++ } +++ ] +++} ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping-original.js b/LayoutTests/inspector/model/resources/basic-mapping-original.js ++new file mode 100644 ++index 000000000000..301b186cb15e ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping-original.js ++@@ -0,0 +1,8 @@ +++function foo() { +++ return 42; +++} +++function bar() { +++ return 24; +++} +++foo(); +++bar(); ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping.js b/LayoutTests/inspector/model/resources/basic-mapping.js ++new file mode 100644 ++index 000000000000..2e479a4175b8 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=basic-mapping.js.map ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping.js.map b/LayoutTests/inspector/model/resources/basic-mapping.js.map ++new file mode 100644 ++index 000000000000..12dc9679a4b1 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js b/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js ++new file mode 100644 ++index 000000000000..25338aca30ce ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-bad-separator.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map ++new file mode 100644 ++index 000000000000..5f4f5b92330a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA.SAASA:MACP" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js ++new file mode 100644 ++index 000000000000..cb38e2fe9d7b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map ++new file mode 100644 ++index 000000000000..5bf3e2a9d85b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-not-a-string-1.js", +++ "sources": ["empty-original.js"], +++ "mappings": 5 +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js ++new file mode 100644 ++index 000000000000..3d84abd6c6b4 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map ++new file mode 100644 ++index 000000000000..4527e7f7641c ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-not-a-string-2.js", +++ "sources": ["empty-original.js"], +++ "mappings": [1, 2, 3, 4] +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js ++new file mode 100644 ++index 000000000000..55591f874b1b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map ++new file mode 100644 ++index 000000000000..b4c059e0151b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-column-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "ggggggE" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js ++new file mode 100644 ++index 000000000000..2a6b434eff58 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map ++new file mode 100644 ++index 000000000000..8dd2ea6c2da0 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "file": "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAC" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js ++new file mode 100644 ++index 000000000000..709e34dbd326 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map ++new file mode 100644 ++index 000000000000..c7bf5b98d120 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-name-index-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAggggggE" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js ++new file mode 100644 ++index 000000000000..a202152d6fdf ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map ++new file mode 100644 ++index 000000000000..403878bfa47a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-column.js", +++ "sources": ["empty-original.js"], +++ "mappings": "F" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js ++new file mode 100644 ++index 000000000000..3e3f63420467 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map ++new file mode 100644 ++index 000000000000..b94f63646e46 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-name-index.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAF" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js ++new file mode 100644 ++index 000000000000..f21d5342b395 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map ++new file mode 100644 ++index 000000000000..011c639d3f91 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-original-column.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAF" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js ++new file mode 100644 ++index 000000000000..b37309601ce0 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map ++new file mode 100644 ++index 000000000000..e7ec993eebda ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-original-line.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAFA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js ++new file mode 100644 ++index 000000000000..6e05849b6a03 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map ++new file mode 100644 ++index 000000000000..596c2f298bbe ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-source-index.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AFAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js ++new file mode 100644 ++index 000000000000..0936ed7ea8fd ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map ++new file mode 100644 ++index 000000000000..ff2103fe24fe ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-original-column-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAggggggE" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js ++new file mode 100644 ++index 000000000000..9b3aa5a361ae ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map ++new file mode 100644 ++index 000000000000..890f1c71fc5b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-original-line-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAggggggEA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js ++new file mode 100644 ++index 000000000000..2e5fbca26825 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map ++new file mode 100644 ++index 000000000000..86dedb114fa9 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "sources": ["empty-original.js"], +++ "mappings": "ACAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js ++new file mode 100644 ++index 000000000000..3f4943e1272d ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map ++new file mode 100644 ++index 000000000000..e9f858c6e15d ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-source-index-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AggggggEAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js ++new file mode 100644 ++index 000000000000..4b868fac9c5e ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map ++new file mode 100644 ++index 000000000000..c2af1165ad8f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js ++new file mode 100644 ++index 000000000000..96045a7a11dd ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map ++new file mode 100644 ++index 000000000000..73cf00fa1c96 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js ++new file mode 100644 ++index 000000000000..9d5332a56ca5 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map ++new file mode 100644 ++index 000000000000..5a34d25b645e ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-with-zero-fields.js", +++ "sources": ["empty-original.js"], +++ "mappings": ",,,," +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js b/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js ++new file mode 100644 ++index 000000000000..d1b20b41a29f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-vlq-non-base64-char.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map b/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map ++new file mode 100644 ++index 000000000000..4fa1ac576885 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "A$%?!" +++} ++diff --git a/LayoutTests/inspector/model/resources/names-missing.js b/LayoutTests/inspector/model/resources/names-missing.js ++new file mode 100644 ++index 000000000000..58781fd88705 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-missing.js.map ++diff --git a/LayoutTests/inspector/model/resources/names-missing.js.map b/LayoutTests/inspector/model/resources/names-missing.js.map ++new file mode 100644 ++index 000000000000..7dc1b929e485 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "version" : "3", +++ "sources": ["empty-original.js"], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/names-not-a-list-1.js b/LayoutTests/inspector/model/resources/names-not-a-list-1.js ++new file mode 100644 ++index 000000000000..dc65f1972b5a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-not-a-list-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-a-list-1.js.map ++diff --git a/LayoutTests/inspector/model/resources/names-not-a-list-1.js.map b/LayoutTests/inspector/model/resources/names-not-a-list-1.js.map ++new file mode 100644 ++index 000000000000..843f7cc2e6fd ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-not-a-list-1.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": ["source.js"], +++ "names": "not a list", +++ "mappings": "AAAAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/names-not-a-list-2.js b/LayoutTests/inspector/model/resources/names-not-a-list-2.js ++new file mode 100644 ++index 000000000000..d7251f78da84 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-not-a-list-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-a-list-2.js.map ++diff --git a/LayoutTests/inspector/model/resources/names-not-a-list-2.js.map b/LayoutTests/inspector/model/resources/names-not-a-list-2.js.map ++new file mode 100644 ++index 000000000000..cd7a42a74c4f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-not-a-list-2.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": ["source.js"], +++ "names": { "foo": 3 }, +++ "mappings": "AAAAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/source-map-spec-tests.json b/LayoutTests/inspector/model/resources/source-map-spec-tests.json ++new file mode 100644 ++index 000000000000..3091a3c93273 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/source-map-spec-tests.json ++@@ -0,0 +1,503 @@ +++{ +++ "tests": [ +++ { +++ "name": "versionValid", +++ "description": "Test a simple source map with a valid version number", +++ "baseFile": "version-valid.js", +++ "sourceMapFile": "version-valid.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "versionNotANumber", +++ "description": "Test a source map with a version field that is not a number", +++ "baseFile": "version-not-a-number.js", +++ "sourceMapFile": "version-not-a-number.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionNumericString", +++ "description": "Test a source map with a version field that is a number as a string", +++ "baseFile": "version-numeric-string.js", +++ "sourceMapFile": "version-numeric-string.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooHigh", +++ "description": "Test a source map with an integer version field that is too high", +++ "baseFile": "version-too-high.js", +++ "sourceMapFile": "version-too-high.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooLow", +++ "description": "Test a source map with an integer version field that is too low", +++ "baseFile": "version-too-low.js", +++ "sourceMapFile": "version-too-low.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesMissing", +++ "description": "Test a source map that is missing a necessary sources field", +++ "baseFile": "sources-missing.js", +++ "sourceMapFile": "sources-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotAList1", +++ "description": "Test a source map with a sources field that is not a valid list (string)", +++ "baseFile": "sources-not-a-list-1.js", +++ "sourceMapFile": "sources-not-a-list-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotAList2", +++ "description": "Test a source map with a sources field that is not a valid list (object)", +++ "baseFile": "sources-not-a-list-2.js", +++ "sourceMapFile": "sources-not-a-list-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesMissing", +++ "description": "Test a source map that is missing a necessary names field", +++ "baseFile": "names-missing.js", +++ "sourceMapFile": "names-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotAList1", +++ "description": "Test a source map with a names field that is not a valid list (string)", +++ "baseFile": "names-not-a-list-1.js", +++ "sourceMapFile": "names-not-a-list-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotAList2", +++ "description": "Test a source map with a names field that is not a valid list (object)", +++ "baseFile": "names-not-a-list-2.js", +++ "sourceMapFile": "names-not-a-list-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "unrecognizedProperty", +++ "description": "Test a source map that has an extra field not explicitly encoded in the spec", +++ "baseFile": "unrecognized-property.js", +++ "sourceMapFile": "unrecognized-property.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "invalidVLQDueToNonBase64Character", +++ "description": "Test a source map that has a mapping with an invalid non-base64 character", +++ "baseFile": "invalid-vlq-non-base64-char.js", +++ "sourceMapFile": "invalid-vlq-non-base64-char.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingNotAString1", +++ "description": "Test a source map that has an invalid mapping that is not a string (number)", +++ "baseFile": "invalid-mapping-not-a-string-1.js", +++ "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingNotAString2", +++ "description": "Test a source map that has an invalid mapping that is not a string (array)", +++ "baseFile": "invalid-mapping-not-a-string-2.js", +++ "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentBadSeparator", +++ "description": "Test a source map that uses separator characters not recognized in the spec", +++ "baseFile": "invalid-mapping-bad-separator.js", +++ "sourceMapFile": "invalid-mapping-bad-separator.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithZeroFields", +++ "description": "Test a source map that has the wrong number (zero) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-zero-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithTwoFields", +++ "description": "Test a source map that has the wrong number (two) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-two-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithThreeFields", +++ "description": "Test a source map that has the wrong number (three) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-three-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", +++ "description": "Test a source map that has a source index field that is out of bounds of the sources field", +++ "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNameIndexOutOfBounds", +++ "description": "Test a source map that has a name index field that is out of bounds of the names field", +++ "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeColumn", +++ "description": "Test a source map that has an invalid negative non-relative column field", +++ "baseFile": "invalid-mapping-segment-negative-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeSourceIndex", +++ "description": "Test a source map that has an invalid negative non-relative source index field", +++ "baseFile": "invalid-mapping-segment-negative-source-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeOriginalLine", +++ "description": "Test a source map that has an invalid negative non-relative original line field", +++ "baseFile": "invalid-mapping-segment-negative-original-line.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeOriginalColumn", +++ "description": "Test a source map that has an invalid negative non-relative original column field", +++ "baseFile": "invalid-mapping-segment-negative-original-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeNameIndex", +++ "description": "Test a source map that has an invalid negative non-relative name index field", +++ "baseFile": "invalid-mapping-segment-negative-name-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithColumnExceeding32Bits", +++ "description": "Test a source map that has a column field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-column-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", +++ "description": "Test a source map that has a source index field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-source-index-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", +++ "description": "Test a source map that has a original line field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-original-line-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", +++ "description": "Test a source map that has an original column field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-original-column-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", +++ "description": "Test a source map that has a name index field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-name-index-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "validMappingFieldsWith32BitMaxValues", +++ "description": "Test a source map that has segment fields with max values representable in 32 bits", +++ "baseFile": "valid-mapping-boundary-values.js", +++ "sourceMapFile": "valid-mapping-boundary-values.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingLargeVLQ", +++ "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", +++ "baseFile": "valid-mapping-large-vlq.js", +++ "sourceMapFile": "valid-mapping-large-vlq.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingEmptyGroups", +++ "description": "Test a source map with a mapping that has many empty groups", +++ "baseFile": "valid-mapping-empty-groups.js", +++ "sourceMapFile": "valid-mapping-empty-groups.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "basicMapping", +++ "description": "Test a simple source map that has several valid mappings", +++ "baseFile": "basic-mapping.js", +++ "sourceMapFile": "basic-mapping.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "basicMappingWithIndexMap", +++ "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", +++ "baseFile": "basic-mapping-as-index-map.js", +++ "sourceMapFile": "basic-mapping-as-index-map.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "validMappingNullSources", +++ "description": "Test a source map that has null sources", +++ "baseFile": "valid-mapping-null-sources.js", +++ "sourceMapFile": "valid-mapping-null-sources.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": null, +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": null, +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ } +++ ] +++} ++diff --git a/LayoutTests/inspector/model/resources/sources-missing.js b/LayoutTests/inspector/model/resources/sources-missing.js ++new file mode 100644 ++index 000000000000..779b865e2769 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-missing.js.map ++diff --git a/LayoutTests/inspector/model/resources/sources-missing.js.map b/LayoutTests/inspector/model/resources/sources-missing.js.map ++new file mode 100644 ++index 000000000000..61122fcb3f25 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "version" : "3", +++ "names": ["foo"], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/sources-not-a-list-1.js b/LayoutTests/inspector/model/resources/sources-not-a-list-1.js ++new file mode 100644 ++index 000000000000..7e33b7e86725 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-not-a-list-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-a-list-1.js.map ++diff --git a/LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map b/LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map ++new file mode 100644 ++index 000000000000..b2e24787bc16 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": "not a list", +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/sources-not-a-list-2.js b/LayoutTests/inspector/model/resources/sources-not-a-list-2.js ++new file mode 100644 ++index 000000000000..4021f763fc88 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-not-a-list-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-a-list-2.js.map ++diff --git a/LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map b/LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map ++new file mode 100644 ++index 000000000000..6a6a8635729c ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": { "source.js": 3 }, +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/unrecognized-property.js b/LayoutTests/inspector/model/resources/unrecognized-property.js ++new file mode 100644 ++index 000000000000..19dfb0e2e6c7 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/unrecognized-property.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=unrecognized-property.js.map ++diff --git a/LayoutTests/inspector/model/resources/unrecognized-property.js.map b/LayoutTests/inspector/model/resources/unrecognized-property.js.map ++new file mode 100644 ++index 000000000000..40bee558a4ff ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/unrecognized-property.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "", +++ "foobar": 42, +++ "unusedProperty": [1, 2, 3, 4] +++} ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js b/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js ++new file mode 100644 ++index 000000000000..3c49709e05ac ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-boundary-values.js.map ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map b/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map ++new file mode 100644 ++index 000000000000..4dd836e63d8f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "file": "valid-mapping-boundary-values.js", +++ "sources": ["empty-original.js"], +++ "mappings": "+/////DA+/////D+/////DA" +++} ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js b/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js ++new file mode 100644 ++index 000000000000..a2b767b619a0 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-empty-groups.js.map ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map b/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map ++new file mode 100644 ++index 000000000000..53be4ae4ae91 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "valid-mapping-empty-groups.js", +++ "sources": ["empty-original.js"], +++ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" +++} ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js b/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js ++new file mode 100644 ++index 000000000000..b0cd8978132a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-large-vlq.js.map ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map b/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map ++new file mode 100644 ++index 000000000000..76e18704c4b1 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": [], +++ "sources": ["valid-mapping-large-vlq.js"], +++ "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" +++} ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js b/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js ++new file mode 100644 ++index 000000000000..ee2acf0f5b2f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=valid-mapping-null-sources.js.map ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map b/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map ++new file mode 100644 ++index 000000000000..199cda936955 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo"], +++ "sources": [null], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-not-a-number.js b/LayoutTests/inspector/model/resources/version-not-a-number.js ++new file mode 100644 ++index 000000000000..ae2342e2ffe5 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-not-a-number.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-not-a-number.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-not-a-number.js.map b/LayoutTests/inspector/model/resources/version-not-a-number.js.map ++new file mode 100644 ++index 000000000000..a584d6e69511 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-not-a-number.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3foo", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-numeric-string.js b/LayoutTests/inspector/model/resources/version-numeric-string.js ++new file mode 100644 ++index 000000000000..a55170885da6 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-numeric-string.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-numeric-string.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-numeric-string.js.map b/LayoutTests/inspector/model/resources/version-numeric-string.js.map ++new file mode 100644 ++index 000000000000..dbe52a7d0df6 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-numeric-string.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-too-high.js b/LayoutTests/inspector/model/resources/version-too-high.js ++new file mode 100644 ++index 000000000000..55f4e1a298fa ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-too-high.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-too-high.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-too-high.js.map b/LayoutTests/inspector/model/resources/version-too-high.js.map ++new file mode 100644 ++index 000000000000..ee23be32ff27 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-too-high.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 4, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-too-low.js b/LayoutTests/inspector/model/resources/version-too-low.js ++new file mode 100644 ++index 000000000000..d9642920b313 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-too-low.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-too-low.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-too-low.js.map b/LayoutTests/inspector/model/resources/version-too-low.js.map ++new file mode 100644 ++index 000000000000..64ca7a6e2e92 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-too-low.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 2, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-valid.js b/LayoutTests/inspector/model/resources/version-valid.js ++new file mode 100644 ++index 000000000000..82d0bfa1eb2a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-valid.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-valid.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-valid.js.map b/LayoutTests/inspector/model/resources/version-valid.js.map ++new file mode 100644 ++index 000000000000..1a163052d8fc ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-valid.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/source-map-spec-expected.txt b/LayoutTests/inspector/model/source-map-spec-expected.txt ++new file mode 100644 ++index 000000000000..c74ab5bcfb32 ++--- /dev/null +++++ b/LayoutTests/inspector/model/source-map-spec-expected.txt ++@@ -0,0 +1,22 @@ +++Ensure a source map loads for resources with sourceMappingURLs. +++ +++ +++== Running test suite: SourceMapSpec +++-- Running test case: SourceMapSpec +++PASS: Resource should have loaded 1 SourceMap. +++PASS: SourceMap should be a WI.SourceMap instance. +++PASS: Resource may or may not load a SourceMap. +++PASS: Resource may or may not load a SourceMap. +++PASS: Resource may or may not load a SourceMap. +++PASS: Resource may or may not load a SourceMap. +++PASS: Resource should have loaded 1 SourceMap. +++PASS: SourceMap should be a WI.SourceMap instance. +++PASS: Resource should have loaded 1 SourceMap. +++PASS: SourceMap should be a WI.SourceMap instance. +++PASS: expectEqual(0, 0) +++PASS: expectEqual(9, 9) +++PASS: expectEqual("basic-mapping-original.js", "basic-mapping-original.js") +++PASS: expectEqual(3, 3) +++PASS: expectEqual(9, 9) +++PASS: expectEqual("basic-mapping-original.js", "basic-mapping-original.js") +++ ++diff --git a/LayoutTests/inspector/model/source-map-spec.html b/LayoutTests/inspector/model/source-map-spec.html ++new file mode 100644 ++index 000000000000..b30b1dd526fc ++--- /dev/null +++++ b/LayoutTests/inspector/model/source-map-spec.html ++@@ -0,0 +1,83 @@ +++ +++ +++ +++ +++ +++ +++ +++

Ensure a source map loads for resources with sourceMappingURLs.

+++ +++ ++-- ++2.39.2 ++ +diff --git a/LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html b/LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html +new file mode 100644 +index 000000000000..b30b1dd526fc +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html +@@ -0,0 +1,83 @@ ++ ++ ++ ++ ++ ++ ++ ++

Ensure a source map loads for resources with sourceMappingURLs.

++ ++ +diff --git a/LayoutTests/inspector/model/source-map-spec-expected.txt b/LayoutTests/inspector/model/source-map-spec-expected.txt +new file mode 100644 +index 000000000000..fd0094a8ac46 +--- /dev/null ++++ b/LayoutTests/inspector/model/source-map-spec-expected.txt +@@ -0,0 +1,828 @@ ++Run source map specification consumer test cases. ++ ++ ++== Running test suite: SourceMapSpec ++-- Running test case: SourceMapSpec ++versionValid ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++versionMissing ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++versionNotANumber ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++versionNumericString ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++versionTooHigh ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++versionTooLow ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++sourcesMissing ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++sourcesNotAList1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++sourcesNotAList2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++sourcesNotStringOrNull ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++sourcesAndSourcesContentBothNull ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++fileNotAString1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++fileNotAString2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++sourceRootNotAString1 ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++sourceRootNotAString2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++namesMissing ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++namesNotAList1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++namesNotAList2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++namesNotString ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListEmpty ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++ignoreListValid1 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++Ignore list test ignored (unsupported) ++ignoreListWrongType1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListWrongType2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListWrongType3 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListWrongType4 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++ignoreListOutOfBounds1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListOutOfBounds2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++unrecognizedProperty ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++invalidVLQDueToNonBase64Character ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidVLQDueToMissingContinuationDigits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingNotAString1 ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++invalidMappingNotAString2 ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++invalidMappingSegmentBadSeparator ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithZeroFields ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++invalidMappingSegmentWithTwoFields ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++invalidMappingSegmentWithThreeFields ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++invalidMappingSegmentWithSourceIndexOutOfBounds ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNameIndexOutOfBounds ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeSourceIndex ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeOriginalLine ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeOriginalColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeNameIndex ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeSourceIndex ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeOriginalLine ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeOriginalColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeNameIndex ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithColumnExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithSourceIndexExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithOriginalLineExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithOriginalColumnExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNameIndexExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++validMappingFieldsWith32BitMaxValues ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++validMappingLargeVLQ ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++validMappingEmptyGroups ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++validMappingEmptyString ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++indexMapWrongTypeSections ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapWrongTypeOffset ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapWrongTypeMap ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapInvalidBaseMappings ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapInvalidOverlap ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapInvalidOrder ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapMissingMap ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapInvalidSubMap ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapMissingOffset ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapMissingOffsetLine ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapMissingOffsetColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapOffsetLineWrongType ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapOffsetColumnWrongType ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapEmptySections ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++indexMapFileWrongType1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapFileWrongType2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++basicMapping ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 22) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 24) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 25) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 34) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 40) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 47) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 49) should be mapped ++PASS: Original line: 5, expected: 5 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 50) should be mapped ++PASS: Original line: 6, expected: 6 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 56) should be mapped ++PASS: Original line: 7, expected: 7 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++sourceRootResolution ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++FAIL: Original source: basic-mapping-original.js, expected: theroot/basic-mapping-original.js ++ Expected: "theroot/basic-mapping-original.js" ++ Actual: "basic-mapping-original.js" ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++FAIL: Original source: basic-mapping-original.js, expected: theroot/basic-mapping-original.js ++ Expected: "theroot/basic-mapping-original.js" ++ Actual: "basic-mapping-original.js" ++sourceResolutionAbsoluteURL ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++FAIL: Original source: basic-mapping-original.js, expected: /baz/quux/basic-mapping-original.js ++ Expected: "/baz/quux/basic-mapping-original.js" ++ Actual: "basic-mapping-original.js" ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++FAIL: Original source: basic-mapping-original.js, expected: /baz/quux/basic-mapping-original.js ++ Expected: "/baz/quux/basic-mapping-original.js" ++ Actual: "basic-mapping-original.js" ++basicMappingWithIndexMap ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 22) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 24) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 25) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 34) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 40) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 47) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 49) should be mapped ++PASS: Original line: 5, expected: 5 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 50) should be mapped ++PASS: Original line: 6, expected: 6 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 56) should be mapped ++PASS: Original line: 7, expected: 7 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++indexMapWithMissingFile ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 22) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 24) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 25) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 34) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 40) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 47) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 49) should be mapped ++PASS: Original line: 5, expected: 5 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 50) should be mapped ++PASS: Original line: 6, expected: 6 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 56) should be mapped ++PASS: Original line: 7, expected: 7 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++indexMapWithTwoConcatenatedSources ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 22) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 24) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 25) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 34) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 40) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 47) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 49) should be mapped ++PASS: Original line: 5, expected: 5 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 50) should be mapped ++PASS: Original line: 6, expected: 6 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 56) should be mapped ++PASS: Original line: 7, expected: 7 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 62) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 71) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 77) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 83) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 88) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 89) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++sourcesNullSourcesContentNonNull ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++FAIL: Original source: sources-null-sources-content-non-null.js.map, expected: null ++ Expected: null ++ Actual: "sources-null-sources-content-non-null.js.map" ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++FAIL: Original source: sources-null-sources-content-non-null.js.map, expected: null ++ Expected: null ++ Actual: "sources-null-sources-content-non-null.js.map" ++sourcesNonNullSourcesContentNull ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++transitiveMapping ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++transitiveMappingWithThreeSteps ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++vlqValidSingleDigit ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: vlq-valid-single-digit-original.js, expected: vlq-valid-single-digit-original.js ++vlqValidNegativeDigit ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (2, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++FAIL: Original column: 1, expected: 3 ++ Expected: 3 ++ Actual: 1 ++PASS: Original source: vlq-valid-negative-digit-original.js, expected: vlq-valid-negative-digit-original.js ++PASS: Test location (2, 2) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 1, expected: 1 ++PASS: Original source: vlq-valid-negative-digit-original.js, expected: vlq-valid-negative-digit-original.js ++vlqValidContinuationBitPresent1 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 1, expected: 1 ++PASS: Original source: vlq-valid-continuation-bit-present-1-original.js, expected: vlq-valid-continuation-bit-present-1-original.js ++vlqValidContinuationBitPresent2 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (2, 16) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 1, expected: 1 ++PASS: Original source: vlq-valid-continuation-bit-present-2-original.js, expected: vlq-valid-continuation-bit-present-2-original.js ++mappingSemanticsSingleFieldSegment ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 1, expected: 1 ++PASS: Original source: mapping-semantics-single-field-segment-original.js, expected: mapping-semantics-single-field-segment-original.js ++PASS: Test location (0, 2) should be mapped ++FAIL: Original line: 0, expected: null ++ Expected: null ++ Actual: 0 ++FAIL: Original column: 1, expected: null ++ Expected: null ++ Actual: 1 ++FAIL: Original source: mapping-semantics-single-field-segment-original.js, expected: null ++ Expected: null ++ Actual: "mapping-semantics-single-field-segment-original.js" ++mappingSemanticsFourFieldSegment ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: mapping-semantics-four-field-segment-original.js, expected: mapping-semantics-four-field-segment-original.js ++mappingSemanticsFiveFieldSegment ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: mapping-semantics-five-field-segment-original.js, expected: mapping-semantics-five-field-segment-original.js ++mappingSemanticsColumnReset ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: mapping-semantics-column-reset-original.js, expected: mapping-semantics-column-reset-original.js ++PASS: Test location (1, 1) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: mapping-semantics-column-reset-original.js, expected: mapping-semantics-column-reset-original.js ++mappingSemanticsRelative1 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: mapping-semantics-relative-1-original.js, expected: mapping-semantics-relative-1-original.js ++PASS: Test location (0, 5) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 4, expected: 4 ++PASS: Original source: mapping-semantics-relative-1-original.js, expected: mapping-semantics-relative-1-original.js ++mappingSemanticsRelative2 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: mapping-semantics-relative-2-original.js, expected: mapping-semantics-relative-2-original.js ++PASS: Test location (1, 2) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: mapping-semantics-relative-2-original.js, expected: mapping-semantics-relative-2-original.js ++ +diff --git a/LayoutTests/inspector/model/source-map-spec.html b/LayoutTests/inspector/model/source-map-spec.html +new file mode 100644 +index 000000000000..08979e569710 +--- /dev/null ++++ b/LayoutTests/inspector/model/source-map-spec.html +@@ -0,0 +1,87 @@ ++ ++ ++ ++ ++ ++ ++ ++

Run source map specification consumer test cases.

++ ++ +-- +2.39.2 + diff --git a/test/test426/README.md b/test/test426/README.md new file mode 100644 index 00000000000000..edf4b3a95b8e96 --- /dev/null +++ b/test/test426/README.md @@ -0,0 +1,17 @@ +# test426 (Source Map Tests) + +The tests here are drivers for running the [Source Map Tests][]. This test +suite ensures that the Node.js source map implementation conforms to the +[Source Map Specification][] ([ECMA426][]). + +The [`test/fixtures/test426`](../fixtures/test426/) contains a copy of the set of +[Source Map Tests][] suite. The last updated hash is: + +* + +See the json files in [the `status` folder](./status) for prerequisites, +expected failures, and support status for specific tests. + +[ECMA426]: https://tc39.es/ecma426/ +[Source Map Specification]: https://github.com/tc39/ecma426 +[Source Map Tests]: https://github.com/tc39/source-map-tests diff --git a/test/test426/status/source-map-spec-tests.json b/test/test426/status/source-map-spec-tests.json new file mode 100644 index 00000000000000..967da8e59679af --- /dev/null +++ b/test/test426/status/source-map-spec-tests.json @@ -0,0 +1,14 @@ +{ + "sourceRootResolution": { + "testActions": { + "skip": "sourceRoot is not supported" + } + }, + "mappingSemanticsSingleFieldSegment": { + "testActions": { + "1": { + "skip": "Might be incorrect test" + } + } + } +} diff --git a/test/test426/test-source-map-spec.mjs b/test/test426/test-source-map-spec.mjs new file mode 100644 index 00000000000000..5f59405128a822 --- /dev/null +++ b/test/test426/test-source-map-spec.mjs @@ -0,0 +1,59 @@ +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; + +import assert from 'node:assert'; +import test from 'node:test'; +import { SourceMap } from 'node:module'; +import { readFileSync } from 'node:fs'; +import path from 'node:path'; + +const specJson = fixtures.readSync('test426/source-map-spec-tests.json', 'utf8'); +const spec = JSON.parse(specJson); + +const kStatus = JSON.parse(readFileSync(path.join(import.meta.dirname, 'status/source-map-spec-tests.json'), 'utf8')); + +const kActionRunner = { + checkMapping, +}; + +spec.tests.forEach((testSpec) => { + const sourceMapJson = fixtures.readSync(['test426/resources', testSpec.sourceMapFile], 'utf8'); + const sourceMapPayload = JSON.parse(sourceMapJson); + + test(testSpec.name, async (t) => { + let sourceMap; + try { + sourceMap = new SourceMap(sourceMapPayload); + } catch { + // Be lenient with invalid source maps. Some source maps are invalid spec-wise, + // let's try the best to parse them. Maybe a strict parsing mode can be introduced + // for future-proof source map format. + assert.ok(!testSpec.sourceMapIsValid); + return; + } + assert.ok(sourceMap); + + const subtests = (testSpec.testActions ?? []).map((action, idx) => { + const testRunner = kActionRunner[action.actionType]; + const testName = `action#${idx} - ${action.actionType}`; + if (testRunner == null) { + return t.test(testName, { + todo: true, + }); + } + const skip = kStatus[testSpec.name]?.testActions?.skip || kStatus[testSpec.name]?.testActions?.[idx]?.skip; + return t.test(testName, { + skip, + }, testRunner.bind(null, sourceMap, action)); + }); + + await Promise.all(subtests); + }); +}); + +function checkMapping(sourceMap, action) { + const result = sourceMap.findEntry(action.generatedLine, action.generatedColumn); + assert.strictEqual(result.originalSource, action.originalSource); + assert.strictEqual(result.originalLine, action.originalLine); + assert.strictEqual(result.originalColumn, action.originalColumn); +} diff --git a/test/test426/testcfg.py b/test/test426/testcfg.py new file mode 100644 index 00000000000000..235311f0dddde8 --- /dev/null +++ b/test/test426/testcfg.py @@ -0,0 +1,6 @@ +import sys, os +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +import testpy + +def GetConfiguration(context, root): + return testpy.ParallelTestConfiguration(context, root, 'test426')