mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
test: update wpt resources
Refs: https://github.com/web-platform-tests/wpt/pull/26824 PR-URL: https://github.com/nodejs/node/pull/36659 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
6259ddeb8c
commit
32b87f223e
5 files changed
+94
-27
No files matched your search
Vendored
+1
-1
@@ -13,7 +13,7 @@ Last update:
|
||||
- console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console
|
||||
- encoding: https://github.com/web-platform-tests/wpt/tree/3c9820d1cc/encoding
|
||||
- url: https://github.com/web-platform-tests/wpt/tree/1783c9bccf/url
|
||||
- resources: https://github.com/web-platform-tests/wpt/tree/001e50de41/resources
|
||||
- resources: https://github.com/web-platform-tests/wpt/tree/351a99782b/resources
|
||||
- interfaces: https://github.com/web-platform-tests/wpt/tree/8719553b2d/interfaces
|
||||
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing
|
||||
- html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/264f12bc7b/html/webappapis/timers
|
||||
|
||||
+57
-9
@@ -281,9 +281,12 @@
|
||||
* pointer source
|
||||
* @returns {Actions}
|
||||
*/
|
||||
pointerDown: function({button=this.ButtonType.LEFT, sourceName=null}={}) {
|
||||
pointerDown: function({button=this.ButtonType.LEFT, sourceName=null,
|
||||
width, height, pressure, tangentialPressure,
|
||||
tiltX, tiltY, twist, altitudeAngle, azimuthAngle}={}) {
|
||||
let source = this.getSource("pointer", sourceName);
|
||||
source.pointerDown(this, button);
|
||||
source.pointerDown(this, button, width, height, pressure, tangentialPressure,
|
||||
tiltX, tiltY, twist, altitudeAngle, azimuthAngle);
|
||||
return this;
|
||||
},
|
||||
|
||||
@@ -314,9 +317,13 @@
|
||||
* @returns {Actions}
|
||||
*/
|
||||
pointerMove: function(x, y,
|
||||
{origin="viewport", duration, sourceName=null}={}) {
|
||||
{origin="viewport", duration, sourceName=null,
|
||||
width, height, pressure, tangentialPressure,
|
||||
tiltX, tiltY, twist, altitudeAngle, azimuthAngle}={}) {
|
||||
let source = this.getSource("pointer", sourceName);
|
||||
source.pointerMove(this, x, y, duration, origin);
|
||||
source.pointerMove(this, x, y, duration, origin, width, height, pressure,
|
||||
tangentialPressure, tiltX, tiltY, twist, altitudeAngle,
|
||||
azimuthAngle);
|
||||
return this;
|
||||
},
|
||||
|
||||
@@ -424,6 +431,38 @@
|
||||
this.actions = new Map();
|
||||
}
|
||||
|
||||
function setPointerProperties(action, width, height, pressure, tangentialPressure,
|
||||
tiltX, tiltY, twist, altitudeAngle, azimuthAngle) {
|
||||
if (width) {
|
||||
action.width = width;
|
||||
}
|
||||
if (height) {
|
||||
action.height = height;
|
||||
}
|
||||
if (pressure) {
|
||||
action.pressure = pressure;
|
||||
}
|
||||
if (tangentialPressure) {
|
||||
action.tangentialPressure = tangentialPressure;
|
||||
}
|
||||
if (tiltX) {
|
||||
action.tiltX = tiltX;
|
||||
}
|
||||
if (tiltY) {
|
||||
action.tiltY = tiltY;
|
||||
}
|
||||
if (twist) {
|
||||
action.twist = twist;
|
||||
}
|
||||
if (altitudeAngle) {
|
||||
action.altitudeAngle = altitudeAngle;
|
||||
}
|
||||
if (azimuthAngle) {
|
||||
action.azimuthAngle = azimuthAngle;
|
||||
}
|
||||
return action;
|
||||
}
|
||||
|
||||
PointerSource.prototype = {
|
||||
serialize: function(tickCount) {
|
||||
if (!this.actions.size) {
|
||||
@@ -441,12 +480,16 @@
|
||||
return data;
|
||||
},
|
||||
|
||||
pointerDown: function(actions, button) {
|
||||
pointerDown: function(actions, button, width, height, pressure, tangentialPressure,
|
||||
tiltX, tiltY, twist, altitudeAngle, azimuthAngle) {
|
||||
let tick = actions.tickIdx;
|
||||
if (this.actions.has(tick)) {
|
||||
tick = actions.addTick().tickIdx;
|
||||
}
|
||||
this.actions.set(tick, {type: "pointerDown", button});
|
||||
let actionProperties = setPointerProperties({type: "pointerDown", button}, width, height,
|
||||
pressure, tangentialPressure, tiltX, tiltY,
|
||||
twist, altitudeAngle, azimuthAngle);
|
||||
this.actions.set(tick, actionProperties);
|
||||
},
|
||||
|
||||
pointerUp: function(actions, button) {
|
||||
@@ -457,15 +500,20 @@
|
||||
this.actions.set(tick, {type: "pointerUp", button});
|
||||
},
|
||||
|
||||
pointerMove: function(actions, x, y, duration, origin) {
|
||||
pointerMove: function(actions, x, y, duration, origin, width, height, pressure,
|
||||
tangentialPressure, tiltX, tiltY, twist, altitudeAngle, azimuthAngle) {
|
||||
let tick = actions.tickIdx;
|
||||
if (this.actions.has(tick)) {
|
||||
tick = actions.addTick().tickIdx;
|
||||
}
|
||||
this.actions.set(tick, {type: "pointerMove", x, y, origin});
|
||||
let moveAction = {type: "pointerMove", x, y, origin};
|
||||
if (duration) {
|
||||
this.actions.get(tick).duration = duration;
|
||||
moveAction.duration = duration;
|
||||
}
|
||||
let actionProperties = setPointerProperties(moveAction, width, height, pressure,
|
||||
tangentialPressure, tiltX, tiltY, twist,
|
||||
altitudeAngle, azimuthAngle);
|
||||
this.actions.set(tick, actionProperties);
|
||||
},
|
||||
|
||||
addPause: function(actions, duration) {
|
||||
|
||||
+22
@@ -146,6 +146,24 @@
|
||||
y: centerPoint[1]});
|
||||
},
|
||||
|
||||
/**
|
||||
* Deletes all cookies.
|
||||
*
|
||||
* This matches the behaviour of the {@link
|
||||
* https://w3c.github.io/webdriver/#delete-all-cookies|WebDriver
|
||||
* Delete All Cookies command}.
|
||||
*
|
||||
* @param {WindowProxy} context - Browsing context in which
|
||||
* to run the call, or null for the current
|
||||
* browsing context.
|
||||
*
|
||||
* @returns {Promise} fulfilled after cookies are deleted, or rejected in
|
||||
* the cases the WebDriver command errors
|
||||
*/
|
||||
delete_all_cookies: function(context=null) {
|
||||
return window.test_driver_internal.delete_all_cookies(context);
|
||||
},
|
||||
|
||||
/**
|
||||
* Send keys to an element
|
||||
*
|
||||
@@ -458,6 +476,10 @@
|
||||
});
|
||||
},
|
||||
|
||||
delete_all_cookies: function(context=null) {
|
||||
return Promise.reject(new Error("unimplemented"));
|
||||
},
|
||||
|
||||
send_keys: function(element, keys) {
|
||||
if (this.in_automation) {
|
||||
return Promise.reject(new Error('Not implemented'));
|
||||
|
||||
+13
-16
@@ -2956,22 +2956,16 @@ policies and contribution forms [3].
|
||||
}
|
||||
|
||||
function sanitize_unpaired_surrogates(str) {
|
||||
return str.replace(/([\ud800-\udbff])(?![\udc00-\udfff])/g,
|
||||
function(_, unpaired)
|
||||
{
|
||||
return code_unit_str(unpaired);
|
||||
})
|
||||
// This replacement is intentionally implemented without an
|
||||
// ES2018 negative lookbehind assertion to support runtimes
|
||||
// which do not yet implement that language feature.
|
||||
.replace(/(^|[^\ud800-\udbff])([\udc00-\udfff])/g,
|
||||
function(_, previous, unpaired) {
|
||||
if (/[\udc00-\udfff]/.test(previous)) {
|
||||
previous = code_unit_str(previous);
|
||||
}
|
||||
|
||||
return previous + code_unit_str(unpaired);
|
||||
});
|
||||
return str.replace(
|
||||
/([\ud800-\udbff]+)(?![\udc00-\udfff])|(^|[^\ud800-\udbff])([\udc00-\udfff]+)/g,
|
||||
function(_, low, prefix, high) {
|
||||
var output = prefix || ""; // prefix may be undefined
|
||||
var string = low || high; // only one of these alternates can match
|
||||
for (var i = 0; i < string.length; i++) {
|
||||
output += code_unit_str(string[i]);
|
||||
}
|
||||
return output;
|
||||
});
|
||||
}
|
||||
|
||||
function sanitize_all_unpaired_surrogates(tests) {
|
||||
@@ -3612,6 +3606,9 @@ policies and contribution forms [3].
|
||||
|
||||
function AssertionError(message)
|
||||
{
|
||||
if (typeof message == "string") {
|
||||
message = sanitize_unpaired_surrogates(message);
|
||||
}
|
||||
this.message = message;
|
||||
this.stack = this.get_stack();
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -12,7 +12,7 @@
|
||||
"path": "url"
|
||||
},
|
||||
"resources": {
|
||||
"commit": "001e50de41dc35820774b27e31f77a165f4c0b9b",
|
||||
"commit": "351a99782b9677706b5dc0dd78e85978fa4ab130",
|
||||
"path": "resources"
|
||||
},
|
||||
"interfaces": {
|
||||
|
||||
Reference in new issue
Block a user