v8/test/inspector/runtime/regress-1078205.js
Yang Guo ef12c74b7f [inspector] fix sourceURL magic comment parsing
R=szuend@chromium.org

Fixed: chromium:1078205
Change-Id: I16f8e19a249692fd16fd53a9a56a8f4cfed8b5c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2185134
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67634}
2020-05-07 05:04:49 +00:00

35 lines
1.2 KiB
JavaScript

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
let {session, contextGroup, Protocol} = InspectorTest.start(
'Test malformed sourceURL magic comment.');
(async function test() {
await Protocol.Debugger.enable();
InspectorTest.logMessage(await Protocol.Runtime.evaluate({
expression: "JSON.parse('//')",
generatePreview: true,
}));
InspectorTest.logMessage(await Protocol.Runtime.evaluate({
expression: "JSON.parse('//#')",
generatePreview: true,
}));
InspectorTest.logMessage(await Protocol.Runtime.evaluate({
expression: "JSON.parse('//# ')",
generatePreview: true,
}));
InspectorTest.logMessage(await Protocol.Runtime.evaluate({
expression: "JSON.parse('//# sourceURL')",
generatePreview: true,
}));
InspectorTest.logMessage(await Protocol.Runtime.evaluate({
expression: "JSON.parse('//# sourceURL=')",
generatePreview: true,
}));
InspectorTest.logMessage(await Protocol.Runtime.evaluate({
expression: "JSON.parse('//# sourceURL=\"')",
generatePreview: true,
}));
InspectorTest.completeTest();
})();