mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-19 21:14:44 +08:00
R=aerotwist@chromium.org Bug: 1187573 Change-Id: Ib1c1f50649926dfce1bf401b6dc9f3ee235bf26c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2786946 Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Paul Lewis <aerotwist@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
22 lines
727 B
JavaScript
22 lines
727 B
JavaScript
// Copyright 2019 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.
|
|
|
|
(async function() {
|
|
TestRunner.addResult('Tests that console inputs are evaluated in REPL mode\n');
|
|
|
|
await TestRunner.loadTestModule('console_test_runner');
|
|
await TestRunner.showPanel('console');
|
|
|
|
TestRunner.addSniffer(TestRunner.RuntimeAgent, 'invoke_evaluate', function(args) {
|
|
TestRunner.addResult('Called RuntimeAgent.invoke_evaluate');
|
|
TestRunner.addResult("Value of 'replMode': " + args.replMode);
|
|
});
|
|
|
|
ConsoleTestRunner.evaluateInConsole('let a = 1; let a = 2;', step2);
|
|
|
|
function step2() {
|
|
TestRunner.completeTest();
|
|
}
|
|
})();
|