2024-03-30 09:54:35 +01:00
|
|
|
// Copyright 2023 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.
|
|
|
|
|
|
|
|
const {session, contextGroup, Protocol} =
|
2024-04-18 07:06:43 +02:00
|
|
|
InspectorTest.start('Checks that accessing command line API functions are considered side-effecty (except $*)');
|
2024-03-30 09:54:35 +01:00
|
|
|
|
|
|
|
(async () => {
|
2024-04-18 07:06:43 +02:00
|
|
|
let { result } = await Protocol.Runtime.evaluate({
|
2024-03-30 09:54:35 +01:00
|
|
|
expression: 'debug',
|
|
|
|
includeCommandLineAPI: true,
|
|
|
|
throwOnSideEffect: true,
|
|
|
|
});
|
|
|
|
InspectorTest.logMessage(result);
|
|
|
|
|
2024-04-18 07:06:43 +02:00
|
|
|
({ result } = await Protocol.Runtime.evaluate({
|
|
|
|
expression: '$0',
|
|
|
|
includeCommandLineAPI: true,
|
|
|
|
throwOnSideEffect: true,
|
|
|
|
}));
|
|
|
|
InspectorTest.logMessage(result);
|
|
|
|
|
2024-03-30 09:54:35 +01:00
|
|
|
InspectorTest.completeTest();
|
|
|
|
})();
|