mirror of
https://github.com/servo/servo.git
synced 2025-08-13 17:35:36 +01:00
Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d
This commit is contained in:
parent
3f07cfec7c
commit
578498ba24
4001 changed files with 159517 additions and 30260 deletions
|
@ -12,7 +12,6 @@ policies and contribution forms [3].
|
|||
// Helper Functions for NavigationTiming W3C tests
|
||||
//
|
||||
|
||||
var performanceNamespace = window.performance;
|
||||
var timingAttributes = [
|
||||
'connectEnd',
|
||||
'connectStart',
|
||||
|
@ -36,32 +35,6 @@ var timingAttributes = [
|
|||
'unloadEventStart'
|
||||
];
|
||||
|
||||
var namespace_check = false;
|
||||
|
||||
//
|
||||
// All test() functions in the WebPerf test suite should use wp_test() instead.
|
||||
//
|
||||
// wp_test() validates the window.performance namespace exists prior to running tests and
|
||||
// immediately shows a single failure if it does not.
|
||||
//
|
||||
|
||||
function wp_test(func, msg, properties)
|
||||
{
|
||||
// only run the namespace check once
|
||||
if (!namespace_check)
|
||||
{
|
||||
namespace_check = true;
|
||||
|
||||
if (performanceNamespace === undefined || performanceNamespace == null)
|
||||
{
|
||||
// show a single error that window.performance is undefined
|
||||
test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.", {author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
}
|
||||
}
|
||||
|
||||
test(func, msg, properties);
|
||||
}
|
||||
|
||||
function test_namespace(child_name, skip_root)
|
||||
{
|
||||
if (skip_root === undefined) {
|
||||
|
@ -129,16 +102,6 @@ function sleep_milliseconds(n)
|
|||
// Common helper functions
|
||||
//
|
||||
|
||||
function test_true(value, msg, properties)
|
||||
{
|
||||
wp_test(function () { assert_true(value, msg); }, msg, properties);
|
||||
}
|
||||
|
||||
function test_equals(value, equals, msg, properties)
|
||||
{
|
||||
wp_test(function () { assert_equals(value, equals, msg); }, msg, properties);
|
||||
}
|
||||
|
||||
function test_greater_than(value, greater_than, msg, properties)
|
||||
{
|
||||
wp_test(function () { assert_true(value > greater_than, msg); }, msg, properties);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue