Commit 221a1780 authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@0fe9f012a8ee5503b728a379705a6c5286ba1e96

Using wpt-import in Chromium a823163b.
With Chromium commits locally applied on WPT:
73f5acd5 "[css-typed-om] Rejig CSSResourceValue hierarchy."
a14d168b "Reland "Add WPT tests for feature policy""


Build: https://ci.chromium.org/buildbot/chromium.infra.cron/wpt-importer/12689

Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

TBR=danyao

No-Export: true
Change-Id: If6fad2545ccf05fff82a8d44d16775f002887aee
Reviewed-on: https://chromium-review.googlesource.com/936162
Commit-Queue: Blink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Reviewed-by: default avatarBlink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538992}
parent 825e3d69
<!doctype html>
<meta charset="utf-8">
<title>Default iterator objects</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
const iterator1 = new URLSearchParams()[Symbol.iterator]();
const iterator2 = new URLSearchParams().keys();
const iterator3 = new URLSearchParams().values();
const iterator4 = new URLSearchParams().entries();
assert_equals(Object.getPrototypeOf(iterator1), Object.getPrototypeOf(iterator2));
assert_equals(Object.getPrototypeOf(iterator1), Object.getPrototypeOf(iterator3));
assert_equals(Object.getPrototypeOf(iterator1), Object.getPrototypeOf(iterator4));
}, "Default iterator objects for an interface have the same prototype");
test(() => {
const iterator = new URLSearchParams().entries();
assert_equals(Object.prototype.toString.call(iterator), "[object URLSearchParams Iterator]");
}, "Object.prototype.toString returns correct value");
test(() => {
const iterator = new URLSearchParams().entries();
assert_equals(iterator[Symbol.toStringTag], "URLSearchParams Iterator");
assert_equals(Object.getOwnPropertyDescriptor(iterator, Symbol.toStringTag), undefined);
}, "@@toStringTag has correct value from prototype");
</script>
<!doctype html>
<meta charset="utf-8">
<title>Iterator prototype objects</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));
const iteratorProto = Object.getPrototypeOf(new URLSearchParams().entries());
assert_equals(Object.getPrototypeOf(iteratorProto), esIteratorPrototype);
}, "Has %IteratorPrototype% as prototype");
test(() => {
const iteratorProto = Object.getPrototypeOf(new URLSearchParams().entries());
const desc = Object.getOwnPropertyDescriptor(iteratorProto, "next");
assert_equals(typeof desc.value, "function");
assert_equals(desc.writable, true);
assert_equals(desc.enumerable, true);
assert_equals(desc.configurable, true);
}, "next() exists and is writable, enumerable, and configurable");
test(() => {
const usp = new URLSearchParams();
const iteratorProto = Object.getPrototypeOf(usp.entries());
assert_throws(new TypeError(), () => {
iteratorProto.next();
});
assert_throws(new TypeError(), () => {
iteratorProto.next.call(undefined);
});
assert_throws(new TypeError(), () => {
iteratorProto.next.call(42);
});
assert_throws(new TypeError(), () => {
iteratorProto.next.call(new Headers().entries());
});
}, "next() throws TypeError when called on ineligible receiver");
test(() => {
const iteratorProto = Object.getPrototypeOf(new URLSearchParams().entries());
assert_equals(Object.prototype.toString.call(iteratorProto), "[object URLSearchParams Iterator]");
}, "Object.prototype.toString returns correct value");
test(() => {
const iteratorProto = Object.getPrototypeOf(new URLSearchParams().entries());
assert_equals(Object.getOwnPropertyDescriptor(iteratorProto, Symbol.toStringTag).value, "URLSearchParams Iterator");
// Property attributes have not yet been fully spec'd.
}, "@@toStringTag has correct value");
test(() => {
const iteratorProto1 = Object.getPrototypeOf(new URLSearchParams().entries());
const iteratorProto2 = Object.getPrototypeOf(new Headers().entries());
assert_not_equals(iteratorProto1, iteratorProto2);
}, "Is specific to an interface");
</script>
[Constructor(optional SensorOptions options), SecureContext, Exposed=Window] [Constructor(optional GeolocationSensorOptions options), SecureContext, Exposed=Window]
interface GeolocationSensor : Sensor { interface GeolocationSensor : Sensor {
static Promise<GeolocationSensorReading> read(optional ReadOptions readOptions);
readonly attribute unrestricted double? latitude; readonly attribute unrestricted double? latitude;
readonly attribute unrestricted double? longitude; readonly attribute unrestricted double? longitude;
readonly attribute unrestricted double? altitude; readonly attribute unrestricted double? altitude;
...@@ -8,3 +9,22 @@ interface GeolocationSensor : Sensor { ...@@ -8,3 +9,22 @@ interface GeolocationSensor : Sensor {
readonly attribute unrestricted double? heading; readonly attribute unrestricted double? heading;
readonly attribute unrestricted double? speed; readonly attribute unrestricted double? speed;
}; };
dictionary GeolocationSensorOptions : SensorOptions {
// placeholder for GeolocationSensor-specific options
};
dictionary ReadOptions : GeolocationSensorOptions {
AbortSignal? signal;
};
dictionary GeolocationSensorReading {
DOMHighResTimeStamp? timestamp;
double? latitude;
double? longitude;
double? altitude;
double? accuracy;
double? altitudeAccuracy;
double? heading;
double? speed;
};
This is a testharness.js-based test.
PASS Default iterator objects for an interface have the same prototype
FAIL Object.prototype.toString returns correct value assert_equals: expected "[object URLSearchParams Iterator]" but got "[object Iterator]"
FAIL @@toStringTag has correct value from prototype assert_equals: expected "URLSearchParams Iterator" but got "Iterator"
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Has %IteratorPrototype% as prototype
PASS next() exists and is writable, enumerable, and configurable
FAIL next() throws TypeError when called on ineligible receiver assert_throws: function "() => {
iteratorProto.next.call(new Headers().entries());
}" did not throw
FAIL Object.prototype.toString returns correct value assert_equals: expected "[object URLSearchParams Iterator]" but got "[object Iterator]"
FAIL @@toStringTag has correct value assert_equals: expected "URLSearchParams Iterator" but got "Iterator"
FAIL Is specific to an interface assert_not_equals: got disallowed value object "[object Iterator]"
Harness: the test ran to completion.
...@@ -28,6 +28,8 @@ FAIL GeolocationSensor interface object name assert_own_property: self does not ...@@ -28,6 +28,8 @@ FAIL GeolocationSensor interface object name assert_own_property: self does not
FAIL GeolocationSensor interface: existence and properties of interface prototype object assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: existence and properties of interface prototype object assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
FAIL GeolocationSensor interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
FAIL GeolocationSensor interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
FAIL GeolocationSensor interface: operation read(ReadOptions) assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
PASS Unscopable handled correctly for read(ReadOptions) on GeolocationSensor
FAIL GeolocationSensor interface: attribute latitude assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: attribute latitude assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
PASS Unscopable handled correctly for latitude property on GeolocationSensor PASS Unscopable handled correctly for latitude property on GeolocationSensor
FAIL GeolocationSensor interface: attribute longitude assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: attribute longitude assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
...@@ -44,6 +46,8 @@ FAIL GeolocationSensor interface: attribute speed assert_own_property: self does ...@@ -44,6 +46,8 @@ FAIL GeolocationSensor interface: attribute speed assert_own_property: self does
PASS Unscopable handled correctly for speed property on GeolocationSensor PASS Unscopable handled correctly for speed property on GeolocationSensor
FAIL GeolocationSensor must be primary interface of new GeolocationSensor assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL GeolocationSensor must be primary interface of new GeolocationSensor assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL Stringification of new GeolocationSensor assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL Stringification of new GeolocationSensor assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "read(ReadOptions)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: calling read(ReadOptions) on new GeolocationSensor with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "latitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "latitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "longitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "longitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "altitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "altitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
......
This is a testharness.js-based test.
PASS Default iterator objects for an interface have the same prototype
FAIL Object.prototype.toString returns correct value assert_equals: expected "[object URLSearchParams Iterator]" but got "[object Iterator]"
FAIL @@toStringTag has correct value from prototype assert_equals: expected "URLSearchParams Iterator" but got "Iterator"
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Has %IteratorPrototype% as prototype
PASS next() exists and is writable, enumerable, and configurable
FAIL next() throws TypeError when called on ineligible receiver assert_throws: function "() => {
iteratorProto.next.call(new Headers().entries());
}" did not throw
FAIL Object.prototype.toString returns correct value assert_equals: expected "[object URLSearchParams Iterator]" but got "[object Iterator]"
FAIL @@toStringTag has correct value assert_equals: expected "URLSearchParams Iterator" but got "Iterator"
FAIL Is specific to an interface assert_not_equals: got disallowed value object "[object Iterator]"
Harness: the test ran to completion.
...@@ -28,6 +28,8 @@ FAIL GeolocationSensor interface object name assert_own_property: self does not ...@@ -28,6 +28,8 @@ FAIL GeolocationSensor interface object name assert_own_property: self does not
FAIL GeolocationSensor interface: existence and properties of interface prototype object assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: existence and properties of interface prototype object assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
FAIL GeolocationSensor interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
FAIL GeolocationSensor interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
FAIL GeolocationSensor interface: operation read(ReadOptions) assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
PASS Unscopable handled correctly for read(ReadOptions) on GeolocationSensor
FAIL GeolocationSensor interface: attribute latitude assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: attribute latitude assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
PASS Unscopable handled correctly for latitude property on GeolocationSensor PASS Unscopable handled correctly for latitude property on GeolocationSensor
FAIL GeolocationSensor interface: attribute longitude assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing FAIL GeolocationSensor interface: attribute longitude assert_own_property: self does not have own property "GeolocationSensor" expected property "GeolocationSensor" missing
...@@ -44,6 +46,8 @@ FAIL GeolocationSensor interface: attribute speed assert_own_property: self does ...@@ -44,6 +46,8 @@ FAIL GeolocationSensor interface: attribute speed assert_own_property: self does
PASS Unscopable handled correctly for speed property on GeolocationSensor PASS Unscopable handled correctly for speed property on GeolocationSensor
FAIL GeolocationSensor must be primary interface of new GeolocationSensor assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL GeolocationSensor must be primary interface of new GeolocationSensor assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL Stringification of new GeolocationSensor assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL Stringification of new GeolocationSensor assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "read(ReadOptions)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: calling read(ReadOptions) on new GeolocationSensor with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "latitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "latitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "longitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "longitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "altitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined" FAIL GeolocationSensor interface: new GeolocationSensor must inherit property "altitude" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: GeolocationSensor is not defined"
......
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