| Index: third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js b/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2777d68e4f390f3b7365c405964db311925c4e62
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js
|
| @@ -0,0 +1,29 @@
|
| +// Copyright 2017 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.
|
| +
|
| +TestRunner.addResult("Tests that console is cleared upon requestClearMessages call.\n");
|
| +
|
| +TestRunner.loadPanel("console")
|
| + .then(test);
|
| +
|
| +function log() {
|
| + // Fill console.
|
| + console.log("one");
|
| + console.log("two");
|
| + console.log("three");
|
| +}
|
| +
|
| +async function test() {
|
| + await TestRunner.evaluateInPagePromise(`(${log.toString()})()`);
|
| + TestRunner.addResult("=== Before clear ===");
|
| + TestRunner.dumpConsoleMessages();
|
| +
|
| + Console.ConsoleView.clearConsole();
|
| + TestRunner.deprecatedRunAfterPendingDispatches(callback);
|
| + function callback() {
|
| + TestRunner.addResult("=== After clear ===");
|
| + TestRunner.dumpConsoleMessages();
|
| + TestRunner.completeTest();
|
| + }
|
| +}
|
|
|