Chromium Code Reviews| OLD | NEW |
|---|---|
| (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"); | |
|
dgozman
2017/04/25 21:08:28
nit: let's have an empty line after copyright.
chenwilliam
2017/06/15 01:01:05
Done.
| |
| 5 | |
| 6 TestRunner.loadPanels(["console"]) | |
|
chenwilliam
2017/04/25 01:09:07
We can make this even fancier and wrap each test s
dgozman
2017/04/25 21:08:28
I'm all for it. It would make reusing frontend for
chenwilliam
2017/06/15 01:01:05
Done.
| |
| 7 .then(() => TestRunner.loadLazyModules(["source_frame"])) | |
|
dgozman
2017/04/25 21:08:28
Why do we do this? I'd prefer this to be handled b
chenwilliam
2017/06/15 01:01:05
This was to reduce flakiness: https://codereview.c
| |
| 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 } | |
| OLD | NEW |