mirror of
https://github.com/servo/servo.git
synced 2025-09-11 15:38:24 +01:00
Update web-platform-tests and CSS tests.
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
This commit is contained in:
parent
fb4f421c8b
commit
296fa2512b
21852 changed files with 2080936 additions and 892894 deletions
|
@ -12,7 +12,7 @@ policies and contribution forms [3].
|
|||
// Helper Functions for NavigationTiming W3C tests
|
||||
//
|
||||
|
||||
var performanceNamespace = window.performance;
|
||||
var performanceNamespace = self.performance;
|
||||
var timingAttributes = [
|
||||
'connectEnd',
|
||||
'connectStart',
|
||||
|
@ -38,6 +38,21 @@ var timingAttributes = [
|
|||
|
||||
var namespace_check = false;
|
||||
|
||||
function has_required_interfaces()
|
||||
{
|
||||
if (window.performance.mark == undefined ||
|
||||
window.performance.clearMarks == undefined ||
|
||||
window.performance.measure == undefined ||
|
||||
window.performance.clearMeasures == undefined ||
|
||||
window.performance.getEntriesByName == undefined ||
|
||||
window.performance.getEntriesByType == undefined ||
|
||||
window.performance.getEntries == undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// All test() functions in the WebPerf test suite should use wp_test() instead.
|
||||
//
|
||||
|
|
|
@ -25,13 +25,7 @@
|
|||
function onload_test()
|
||||
{
|
||||
// test for existance of User Timing and Performance Timeline interface
|
||||
if (window.performance.mark == undefined ||
|
||||
window.performance.clearMarks == undefined ||
|
||||
window.performance.measure == undefined ||
|
||||
window.performance.clearMeasures == undefined ||
|
||||
window.performance.getEntriesByName == undefined ||
|
||||
window.performance.getEntriesByType == undefined ||
|
||||
window.performance.getEntries == undefined)
|
||||
if (!has_required_interfaces())
|
||||
{
|
||||
test_true(false,
|
||||
"The User Timing and Performance Timeline interfaces, which are required for this test, " +
|
||||
|
|
|
@ -25,13 +25,7 @@
|
|||
function onload_test()
|
||||
{
|
||||
// test for existance of User Timing and Performance Timeline interface
|
||||
if (window.performance.mark == undefined ||
|
||||
window.performance.clearMarks == undefined ||
|
||||
window.performance.measure == undefined ||
|
||||
window.performance.clearMeasures == undefined ||
|
||||
window.performance.getEntriesByName == undefined ||
|
||||
window.performance.getEntriesByType == undefined ||
|
||||
window.performance.getEntries == undefined)
|
||||
if (!has_required_interfaces())
|
||||
{
|
||||
test_true(false,
|
||||
"The User Timing and Performance Timeline interfaces, which are required for this test, " +
|
||||
|
|
|
@ -36,13 +36,7 @@
|
|||
function onload_test()
|
||||
{
|
||||
// test for existance of User Timing and Performance Timeline interface
|
||||
if (window.performance.mark == undefined ||
|
||||
window.performance.clearMarks == undefined ||
|
||||
window.performance.measure == undefined ||
|
||||
window.performance.clearMeasures == undefined ||
|
||||
window.performance.getEntriesByName == undefined ||
|
||||
window.performance.getEntriesByType == undefined ||
|
||||
window.performance.getEntries == undefined)
|
||||
if (!has_required_interfaces())
|
||||
{
|
||||
test_true(false,
|
||||
"The User Timing and Performance Timeline interfaces, which are required for this test, " +
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>exception test of performance.mark and performance.measure</title>
|
||||
<meta rel="help" href="http://www.w3.org/TR/user-timing/#extensions-performance-interface"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
test_namespace();
|
||||
|
||||
test(function() {
|
||||
for (var i in timingAttributes) {
|
||||
assert_throws("SyntaxError", function() { window.performance.mark(timingAttributes[i]); });
|
||||
assert_throws("SyntaxError", function() { window.performance.measure(timingAttributes[i]); });
|
||||
}
|
||||
}, "performance.mark and performance.measure should throw if used with timing attribute values");
|
||||
|
||||
fetch_tests_from_worker(new Worker("test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.js"));
|
||||
|
||||
done();
|
||||
|
||||
</script>
|
||||
<h1>Description</h1>
|
||||
<p>This test validates exception scenarios of invoking mark() and measure() with timing attributes as value.</p>
|
||||
<div id="log"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,14 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
importScripts("resources/webperftestharness.js");
|
||||
|
||||
test(function() {
|
||||
for (var i in timingAttributes) {
|
||||
performance.mark(timingAttributes[i]);
|
||||
performance.clearMarks(timingAttributes[i]);
|
||||
|
||||
performance.measure(timingAttributes[i]);
|
||||
performance.clearMeasures(timingAttributes[i]);
|
||||
}
|
||||
}, "performance.mark and performance.measure should not throw if used with timing attribute values in workers");
|
||||
|
||||
done();
|
|
@ -10,30 +10,6 @@
|
|||
<script src="resources/webperftestharness.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
// navigation timing attributes
|
||||
var timingAttributes = [
|
||||
'connectEnd',
|
||||
'connectStart',
|
||||
'domComplete',
|
||||
'domContentLoadedEventEnd',
|
||||
'domContentLoadedEventStart',
|
||||
'domInteractive',
|
||||
'domLoading',
|
||||
'domainLookupEnd',
|
||||
'domainLookupStart',
|
||||
'fetchStart',
|
||||
'loadEventEnd',
|
||||
'loadEventStart',
|
||||
'navigationStart',
|
||||
'redirectEnd',
|
||||
'redirectStart',
|
||||
'requestStart',
|
||||
'responseEnd',
|
||||
'responseStart',
|
||||
'unloadEventEnd',
|
||||
'unloadEventStart'
|
||||
];
|
||||
|
||||
// test data
|
||||
var markExceptionThrown = false;
|
||||
|
||||
|
@ -44,13 +20,7 @@
|
|||
function onload_test()
|
||||
{
|
||||
// test for existance of User Timing and Performance Timeline interface
|
||||
if (window.performance.mark == undefined ||
|
||||
window.performance.clearMarks == undefined ||
|
||||
window.performance.measure == undefined ||
|
||||
window.performance.clearMeasures == undefined ||
|
||||
window.performance.getEntriesByName == undefined ||
|
||||
window.performance.getEntriesByType == undefined ||
|
||||
window.performance.getEntries == undefined)
|
||||
if (!has_required_interfaces())
|
||||
{
|
||||
test_true(false,
|
||||
"The User Timing and Performance Timeline interfaces, which are required for this test, " +
|
||||
|
|
|
@ -75,13 +75,7 @@
|
|||
function onload_test()
|
||||
{
|
||||
// test for existance of User Timing and Performance Timeline interface
|
||||
if (window.performance.mark == undefined ||
|
||||
window.performance.clearMarks == undefined ||
|
||||
window.performance.measure == undefined ||
|
||||
window.performance.clearMeasures == undefined ||
|
||||
window.performance.getEntriesByName == undefined ||
|
||||
window.performance.getEntriesByType == undefined ||
|
||||
window.performance.getEntries == undefined)
|
||||
if (!has_required_interfaces())
|
||||
{
|
||||
test_true(false,
|
||||
"The User Timing and Performance Timeline interfaces, which are required for this test, " +
|
||||
|
|
|
@ -10,30 +10,6 @@
|
|||
<script src="resources/webperftestharness.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
// navigation timing attributes
|
||||
var timingAttributes = [
|
||||
'connectEnd',
|
||||
'connectStart',
|
||||
'domComplete',
|
||||
'domContentLoadedEventEnd',
|
||||
'domContentLoadedEventStart',
|
||||
'domInteractive',
|
||||
'domLoading',
|
||||
'domainLookupEnd',
|
||||
'domainLookupStart',
|
||||
'fetchStart',
|
||||
'loadEventEnd',
|
||||
'loadEventStart',
|
||||
'navigationStart',
|
||||
'redirectEnd',
|
||||
'redirectStart',
|
||||
'requestStart',
|
||||
'responseEnd',
|
||||
'responseStart',
|
||||
'unloadEventEnd',
|
||||
'unloadEventStart'
|
||||
];
|
||||
|
||||
// test data
|
||||
var zeroedNavTimingAtt = undefined;
|
||||
|
||||
|
@ -44,13 +20,7 @@
|
|||
function onload_test()
|
||||
{
|
||||
// test for existance of User Timing and Performance Timeline interface
|
||||
if (window.performance.mark == undefined ||
|
||||
window.performance.clearMarks == undefined ||
|
||||
window.performance.measure == undefined ||
|
||||
window.performance.clearMeasures == undefined ||
|
||||
window.performance.getEntriesByName == undefined ||
|
||||
window.performance.getEntriesByType == undefined ||
|
||||
window.performance.getEntries == undefined)
|
||||
if (!has_required_interfaces())
|
||||
{
|
||||
test_true(false,
|
||||
"The User Timing and Performance Timeline interfaces, which are required for this test, " +
|
||||
|
|
|
@ -11,30 +11,6 @@
|
|||
<script src="resources/webperftestharness.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
// navigation timing attributes
|
||||
var timingAttributes = [
|
||||
'connectEnd',
|
||||
'connectStart',
|
||||
'domComplete',
|
||||
'domContentLoadedEventEnd',
|
||||
'domContentLoadedEventStart',
|
||||
'domInteractive',
|
||||
'domLoading',
|
||||
'domainLookupEnd',
|
||||
'domainLookupStart',
|
||||
'fetchStart',
|
||||
'loadEventEnd',
|
||||
'loadEventStart',
|
||||
'navigationStart',
|
||||
'redirectEnd',
|
||||
'redirectStart',
|
||||
'requestStart',
|
||||
'responseEnd',
|
||||
'responseStart',
|
||||
'unloadEventEnd',
|
||||
'unloadEventStart'
|
||||
];
|
||||
|
||||
// test data
|
||||
var startMarkName = "mark_start";
|
||||
var startMarkValue;
|
||||
|
@ -96,13 +72,7 @@
|
|||
function onload_test()
|
||||
{
|
||||
// test for existance of User Timing and Performance Timeline interface
|
||||
if (window.performance.mark == undefined ||
|
||||
window.performance.clearMarks == undefined ||
|
||||
window.performance.measure == undefined ||
|
||||
window.performance.clearMeasures == undefined ||
|
||||
window.performance.getEntriesByName == undefined ||
|
||||
window.performance.getEntriesByType == undefined ||
|
||||
window.performance.getEntries == undefined)
|
||||
if (!has_required_interfaces())
|
||||
{
|
||||
test_true(false,
|
||||
"The User Timing and Performance Timeline interfaces, which are required for this test, " +
|
||||
|
@ -206,7 +176,7 @@
|
|||
// test duration, allow for an acceptable threshold in the difference between the actual duration and the
|
||||
// expected value for the duration
|
||||
test_true(Math.abs(measureEntry.duration - expectedDuration) <= testThreshold, measureEntryCommand +
|
||||
".duration is aproximately correct (up to " + testThreshold + "ms difference allowed)");
|
||||
".duration is approximately correct (up to " + testThreshold + "ms difference allowed)");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue