| // 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. |
| |
| (async function() { |
| TestRunner.addResult( |
| `Tests how debugger presents special properties of closures, bound functions and object wrappers.`); |
| await TestRunner.loadModule('console_test_runner'); |
| await TestRunner.showPanel('sources'); |
| await TestRunner.evaluateInPagePromise(` |
| console.dir(Object(true)); |
| console.dir((function(a,b) { return a + b; })); |
| console.dir((function(a,b) { return a + b; }).bind({}, 2)); |
| console.dir((function*() { yield [1,2,3] })); |
| `); |
| |
| ConsoleTestRunner.expandConsoleMessages(dumpConsoleMessages); |
| |
| async function dumpConsoleMessages() { |
| await ConsoleTestRunner.dumpConsoleMessages( |
| false, false, TestRunner.textContentWithLineBreaks); |
| TestRunner.completeTest(); |
| } |
| })(); |