d9806cec94
Aligns console.count() behavior with spec, which says the default label should be "default" when the label provided is not defined. Bug: chromium:700624 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ie58af210d300ef3151082b23187dd18e356f5de8 Reviewed-on: https://chromium-review.googlesource.com/780620 Commit-Queue: Erik Luo <luoe@chromium.org> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#49804}
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
let {session, contextGroup, Protocol} = InspectorTest.start('Checks console methods');
|
|
|
|
contextGroup.setupInjectedScriptEnvironment();
|
|
contextGroup.addScript(`
|
|
function testFunction() {
|
|
console.debug('debug');
|
|
console.error('error');
|
|
console.info('info');
|
|
console.log('log');
|
|
console.warn('warn');
|
|
console.dir('dir');
|
|
console.dirxml('dirxml');
|
|
console.table([[1,2],[3,4]]);
|
|
console.table([[1,2],[3,4]], [1,2]);
|
|
console.trace('trace');
|
|
console.trace();
|
|
console.group();
|
|
console.groupEnd();
|
|
console.groupCollapsed();
|
|
console.clear('clear');
|
|
console.clear();
|
|
console.count('count');
|
|
function foo() {
|
|
console.count();
|
|
}
|
|
foo();
|
|
foo();
|
|
console.count();
|
|
console.count(undefined);
|
|
console.count('default');
|
|
}
|
|
//# sourceURL=test.js`, 7, 26);
|
|
|
|
Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage);
|
|
Protocol.Runtime.enable();
|
|
Protocol.Runtime.evaluate({ expression: 'testFunction()' })
|
|
.then(InspectorTest.completeTest);
|