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

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

Issue 2975523002: DevTools: add console test helpers to new test runner & migrate a console test (Closed)
Patch Set: cleanup Created 3 years, 5 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (async function() { 5 (async function() {
6 TestRunner.addResult("Tests that console is cleared upon requestClearMessages call.\n"); 6 TestRunner.addResult("Tests that console is cleared upon requestClearMessages call.\n");
7 7
8 await TestRunner.loadPanel("console"); 8 await TestRunner.loadPanel("console");
9 await TestRunner.loadModule("console_test_runner"); 9 await TestRunner.loadModule("console_test_runner");
10 10
11 function log() { 11 function log() {
12 // Fill console. 12 // Fill console.
13 console.log("one"); 13 console.log("one");
14 console.log("two"); 14 console.log("two");
15 console.log("three"); 15 console.log("three");
16 } 16 }
17 17
18 await TestRunner.evaluateInPagePromise(`(${log.toString()})()`); 18 await TestRunner.evaluateInPagePromise(`(${log.toString()})()`);
19 TestRunner.addResult("=== Before clear ==="); 19 TestRunner.addResult("=== Before clear ===");
20 ConsoleTestRunner.dumpConsoleMessages(); 20 ConsoleTestRunner.dumpConsoleMessages();
21 21
22 Console.ConsoleView.clearConsole(); 22 Console.ConsoleView.clearConsole();
23 TestRunner.deprecatedRunAfterPendingDispatches(callback); 23 TestRunner.deprecatedRunAfterPendingDispatches(callback);
24 function callback() { 24 function callback() {
25 TestRunner.addResult("=== After clear ==="); 25 TestRunner.addResult("=== After clear ===");
26 ConsoleTestRunner.dumpConsoleMessages(); 26 ConsoleTestRunner.dumpConsoleMessages();
27 TestRunner.completeTest(); 27 TestRunner.completeTest();
28 } 28 }
29 })(); 29 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698