Commit fd8a5495 authored by Dominic Farolino's avatar Dominic Farolino Committed by Commit Bot

Prepare to remove deprecated console methods

This CL removes layout tests for deprecated console methods as well as
removes expectation files for failing console WPTs that assert the
non-existence of these methods. These need removed so that the v8
auto-roll with the removed console methods don't fail the chromium
layout tests. Also this CL removes the test expectations for console
WPTs that assert the non-existence of these deprecated methods, but
marks the tests as skipped for now, until the v8 changes are in
chromium.

R=kozyatinskiy@chromium.org

Bug: 706804
Change-Id: If11e0c6a26d6ccc29474fb0148900d034cd40b86
Reviewed-on: https://chromium-review.googlesource.com/1103937Reviewed-by: default avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Dominic Farolino <domfarolino@gmail.com>
Cr-Commit-Position: refs/heads/master@{#567994}
parent 10c14ca4
......@@ -76,7 +76,6 @@ crbug.com/729136 [ Linux ] webaudio/mixing.html [ Timeout ]
crbug.com/739365 [ Linux ] virtual/layout_ng/fast/block/float/assert-when-moving-float.html [ Skip ]
# Tests timing out on WebKit Linux Trusty MSAN
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/console-timeline.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-layout/timeline-layout-with-invalidations.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.js [ Pass Timeout ]
......
......@@ -3852,6 +3852,8 @@ crbug.com/709227 external/wpt/offscreen-canvas/the-offscreen-canvas/size.attribu
crbug.com/709227 external/wpt/offscreen-canvas/the-offscreen-canvas/size.attributes.parse.percent.worker.html [ Failure ]
crbug.com/709227 external/wpt/offscreen-canvas/the-offscreen-canvas/size.attributes.parse.trailingjunk.worker.html [ Failure ]
crbug.com/709227 external/wpt/user-timing/invoke_with_timing_attributes.worker.html [ Failure ]
crbug.com/706804 external/wpt/console/console-tests-historical.any.html [ Skip ]
crbug.com/706804 external/wpt/console/console-tests-historical.any.worker.html [ Skip ]
# Timeouts
crbug.com/709227 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-idb.any.worker.html [ Timeout ]
......
This is a testharness.js-based test.
FAIL 'timeline' function should not exist on the console object assert_equals: console.timeline should be undefined expected (undefined) undefined but got (function) function "function timeline() { [native code] }"
FAIL 'timelineEnd' function should not exist on the console object assert_equals: console.timelineEnd should be undefined expected (undefined) undefined but got (function) function "function timelineEnd() { [native code] }"
FAIL 'markTimeline' function should not exist on the console object assert_equals: console.markTimeline should be undefined expected (undefined) undefined but got (function) function "function markTimeline() { [native code] }"
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL 'timeline' function should not exist on the console object assert_equals: console.timeline should be undefined expected (undefined) undefined but got (function) function "function timeline() { [native code] }"
FAIL 'timelineEnd' function should not exist on the console object assert_equals: console.timelineEnd should be undefined expected (undefined) undefined but got (function) function "function timelineEnd() { [native code] }"
FAIL 'markTimeline' function should not exist on the console object assert_equals: console.markTimeline should be undefined expected (undefined) undefined but got (function) function "function markTimeline() { [native code] }"
Harness: the test ran to completion.
Tests console.timeline and timelineEnd commands.
Tests console.time and timeEnd methods.
Running: testStartStopTimeline
timestamp 0
Timeline 'one'
one
timestamp 1
Timeline 'one'
one
timestamp 2
Running: testStartStopMultiple
timestamp 0
Timeline 'one'
one
timestamp 1
Timeline 'two'
Timeline 'two'
two
two
timestamp 2
Timeline 'one'
one
timestamp 3
timestamp 4
timestamp 5
Running: testStartMultipleStopInsideEvals
timestamp 0
Timeline 'one'
one
timestamp 1
Timeline 'two'
two
timestamp 2
timestamp 3
Timeline 'two'
two
timestamp 4
timestamp 5
Timeline 'one'
one
timestamp 6 - FAIL
Running: testStopUnknown
timestamp 0
Timeline 'one'
one
timestamp 1
timestamp 2
Timeline 'one'
one
timestamp 3
Running: testStartFromPanel
timestamp 0
Timeline 'one'
one
timestamp 1
Timeline 'one'
one
timestamp 2
Running: testStopFromPanel
timestamp 0
Timeline 'one'
one
timestamp 1
Timeline 'two'
two
timestamp 2
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Tests console.timeline and timelineEnd commands.\n`);
TestRunner.addResult(`Tests console.time and timeEnd methods.\n`);
await TestRunner.loadModule('console_test_runner');
await TestRunner.loadModule('performance_test_runner');
await TestRunner.showPanel('timeline');
......@@ -11,70 +11,70 @@
function startStopTimeline()
{
console.timeStamp("timestamp 0");
console.timeline("one");
console.time("one");
console.timeStamp("timestamp 1");
console.timelineEnd("one");
console.timeEnd("one");
console.timeStamp("timestamp 2");
}
function startStopMultiple()
{
console.timeStamp("timestamp 0");
console.timeline("one");
console.time("one");
console.timeStamp("timestamp 1");
console.timeline("one");
console.timeline("two");
console.timeline("two");
console.timelineEnd("two");
console.time("one");
console.time("two");
console.time("two");
console.timeEnd("two");
console.timeStamp("timestamp 2");
console.timelineEnd("one");
console.timeEnd("one");
console.timeStamp("timestamp 3");
console.timelineEnd("two");
console.timeEnd("two");
console.timeStamp("timestamp 4");
console.timelineEnd("one");
console.timeEnd("one");
console.timeStamp("timestamp 5");
}
function startMultiple()
{
console.timeStamp("timestamp 0");
console.timeline("one");
console.time("one");
console.timeStamp("timestamp 1");
console.timeline("two");
console.time("two");
console.timeStamp("timestamp 2");
}
function stopTwo()
{
console.timeStamp("timestamp 3");
console.timelineEnd("two");
console.timeEnd("two");
console.timeStamp("timestamp 4");
}
function stopOne()
{
console.timeStamp("timestamp 5");
console.timelineEnd("one");
console.timeEnd("one");
console.timeStamp("timestamp 6 - FAIL");
}
function stopUnknown()
{
console.timeStamp("timestamp 0");
console.timeline("one");
console.time("one");
console.timeStamp("timestamp 1");
console.timelineEnd("two");
console.timeEnd("two");
console.timeStamp("timestamp 2");
console.timelineEnd("one");
console.timeEnd("one");
console.timeStamp("timestamp 3");
}
function startTimeline()
{
console.timeStamp("timestamp 0");
console.timeline("one");
console.time("one");
console.timeStamp("timestamp 1");
console.timeline("two");
console.time("two");
console.timeStamp("timestamp 2");
}
`);
......
Tests the Timeline API mark feature
TimeStamp Properties:
{
data : {
frame : <string>
message : "MARK TIMELINE"
}
endTime : <number>
frameId : <string>
startTime : <number>
type : "TimeStamp"
}
Text details for TimeStamp: MARK TIMELINE
// 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 the Timeline API mark feature\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.showPanel('timeline');
await TestRunner.evaluateInPagePromise(`
function performActions()
{
console.markTimeline("MARK TIMELINE");
}
`);
PerformanceTestRunner.performActionsAndPrint('performActions()', 'TimeStamp');
})();
......@@ -12,7 +12,7 @@ function performActions()
var promise = new Promise((fulfill) => window.callWhenDone = fulfill);
var content = "" +
"var fn2 = function() {" +
" console.markTimeline(\\"Script evaluated\\");" +
" console.timeStamp(\\"Script evaluated\\");" +
" window.callWhenDone();" +
"};\\\\n" +
"var fn1 = function() {" +
......
Tests checks that deprecation messages for console.
'console.timeline' is deprecated. Please use 'console.time' instead.
'console.timelineEnd' is deprecated. Please use 'console.timeEnd' instead.
'console.markTimeline' is deprecated. Please use 'console.timeStamp' instead.
(async function(testRunner) {
var {page, session, dp} = await testRunner.startBlank(`Tests checks that deprecation messages for console.`);
var messagesLeft = 3;
dp.Runtime.onConsoleAPICalled(data => {
var text = data.params.args[0].value;
if (text.indexOf('deprecated') === -1)
return;
testRunner.log(text);
if (!--messagesLeft)
testRunner.completeTest();
});
dp.Runtime.enable();
var deprecatedMethods = [
`console.timeline('42')`,
`console.timeline('42')`,
`console.timeline('42')`, // three calls should produce one warning message
`console.timelineEnd('42')`,
`console.markTimeline('42')`,
];
dp.Runtime.evaluate({ expression: deprecatedMethods.join(';') });
})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment