Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js

Issue 2742623002: DevTools: improve test infrastructure w/ devtools driving the test (Closed)
Patch Set: fixup Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 TestRunner.addResult("Tests that console is cleared upon requestClearMessages ca ll.\n");
5
6 TestRunner.loadPanels(["console"])
7 .then(() => TestRunner.loadLazyModules(["source_frame"]))
8 .then(test);
9
10 function log() {
11 // Fill console.
12 console.log("one");
13 console.log("two");
14 console.log("three");
15 }
16
17 async function test() {
18 await TestRunner.evaluateInPagePromise(`(${log.toString()})()`);
19 TestRunner.addResult("=== Before clear ===");
20 TestRunner.dumpConsoleMessages();
21
22 Console.ConsoleView.clearConsole();
23 TestRunner.deprecatedRunAfterPendingDispatches(callback);
24 function callback() {
25 TestRunner.addResult("=== After clear ===");
26 TestRunner.dumpConsoleMessages();
27 TestRunner.completeTest();
28 }
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698