mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Wrap more of the referrer-policy tests in testharness.js.
This commit is contained in:
parent
bffe2a699e
commit
3cd6df1ef9
30 changed files with 540 additions and 583 deletions
|
@ -33,22 +33,18 @@ function runSvgTests(testProperties, testDescription, testFunction) {
|
|||
property: property,
|
||||
};
|
||||
|
||||
testFunction(current);
|
||||
current.test.step(function() { testFunction(current) });
|
||||
|
||||
let check_url = url_prefix + "svg.py" + "?id=" + current.id +
|
||||
"&report-headers";
|
||||
current.test.step_timeout(
|
||||
queryXhr.bind(this, check_url,
|
||||
function(message) {
|
||||
current.test.step(function() {
|
||||
assert_own_property(message, "headers");
|
||||
assert_own_property(message, "referrer");
|
||||
assert_equals(message.referrer, current.expected);
|
||||
});
|
||||
current.test.done();
|
||||
}),
|
||||
800);
|
||||
|
||||
current.test.step_timeout(function() {
|
||||
queryXhr(check_url, function(message) {
|
||||
assert_own_property(message, "headers");
|
||||
assert_own_property(message, "referrer");
|
||||
assert_equals(message.referrer, current.expected);
|
||||
current.test.done();
|
||||
}, null, null, current.test);
|
||||
}, 800);
|
||||
};
|
||||
|
||||
add_result_callback(runNextTest);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue