Diff
Modified: trunk/LayoutTests/ChangeLog (265293 => 265294)
--- trunk/LayoutTests/ChangeLog 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/ChangeLog 2020-08-05 18:48:28 UTC (rev 265294)
@@ -1,3 +1,17 @@
+2020-08-05 Alexey Shvayka <[email protected]>
+
+ Re-sync web-platform-tests (2 dirs + 2 files)
+ https://bugs.webkit.org/show_bug.cgi?id=215173
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ Remove a duplicate test added in r259800 that was manually exported [1] and synced.
+
+ [1]: https://github.com/web-platform-tests/wpt/pull/23101
+
+ * js/getOwnPropertyDescriptor-host-object-proxy-expected.txt: Removed.
+ * js/getOwnPropertyDescriptor-host-object-proxy.html: Removed.
+
2020-08-04 Simon Fraser <[email protected]>
Update event regions only once per frame
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (265293 => 265294)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-08-05 18:48:28 UTC (rev 265294)
@@ -1,3 +1,18 @@
+2020-08-05 Alexey Shvayka <[email protected]>
+
+ Re-sync web-platform-tests (2 dirs + 2 files)
+ https://bugs.webkit.org/show_bug.cgi?id=215173
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ web-platform-tests revision: 993c1bc4c880
+
+ * web-platform-tests/css/cssom/*: Updated.
+ * web-platform-tests/dom/idlharness.window-expected.txt:
+ * web-platform-tests/dom/idlharness.window.js:
+ * web-platform-tests/intersection-observer/*: Updated.
+ * web-platform-tests/performance-timeline/po-observe.any.*: Added.
+
2020-08-05 Chris Dumez <[email protected]>
Align BiquadFilterNode.getFrequencyResponse() with the specification
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS-namespace-object-class-string-expected.txt (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS-namespace-object-class-string-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS-namespace-object-class-string-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,6 @@
+
+FAIL @@toStringTag exists on the namespace object with the appropriate descriptor assert_own_property: expected property symbol "Symbol(Symbol.toStringTag)" missing
+FAIL Object.prototype.toString applied to the namespace object assert_equals: expected "[object CSS]" but got "function CSS() {\n [native code]\n}"
+FAIL Object.prototype.toString applied after modifying the namespace object's @@toStringTag assert_own_property: Precondition: @@toStringTag on the namespace object expected property symbol "Symbol(Symbol.toStringTag)" missing
+FAIL Object.prototype.toString applied after deleting @@toStringTag assert_own_property: Precondition: @@toStringTag on the namespace object expected property symbol "Symbol(Symbol.toStringTag)" missing
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS-namespace-object-class-string.html (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS-namespace-object-class-string.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS-namespace-object-class-string.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,47 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSSOM - Symbol.toStringTag value of CSS namespace object</title>
+<link rel="help" href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script>
+"use strict";
+
+test(() => {
+ assert_own_property(CSS, Symbol.toStringTag);
+
+ const propDesc = Object.getOwnPropertyDescriptor(CSS, Symbol.toStringTag);
+ assert_equals(propDesc.value, "CSS", "value");
+ assert_equals(propDesc.writable, false, "writable");
+ assert_equals(propDesc.enumerable, false, "enumerable");
+ assert_equals(propDesc.configurable, true, "configurable");
+}, "@@toStringTag exists on the namespace object with the appropriate descriptor");
+
+test(() => {
+ assert_equals(CSS.toString(), "[object CSS]");
+ assert_equals(Object.prototype.toString.call(CSS), "[object CSS]");
+}, "Object.prototype.toString applied to the namespace object");
+
+test(t => {
+ assert_own_property(CSS, Symbol.toStringTag, "Precondition: @@toStringTag on the namespace object");
+ t.add_cleanup(() => {
+ Object.defineProperty(CSS, Symbol.toStringTag, { value: "CSS" });
+ });
+
+ Object.defineProperty(CSS, Symbol.toStringTag, { value: "Test" });
+ assert_equals(CSS.toString(), "[object Test]");
+ assert_equals(Object.prototype.toString.call(CSS), "[object Test]");
+}, "Object.prototype.toString applied after modifying the namespace object's @@toStringTag");
+
+test(t => {
+ assert_own_property(CSS, Symbol.toStringTag, "Precondition: @@toStringTag on the namespace object");
+ t.add_cleanup(() => {
+ Object.defineProperty(CSS, Symbol.toStringTag, { value: "CSS" });
+ });
+
+ assert_true(delete CSS[Symbol.toStringTag]);
+ assert_equals(CSS.toString(), "[object Object]");
+ assert_equals(Object.prototype.toString.call(CSS), "[object Object]");
+}, "Object.prototype.toString applied after deleting @@toStringTag");
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-modify-after-removal-expected.txt (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-modify-after-removal-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-modify-after-removal-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,5 @@
+
+
+PASS Modify sheet from removed iframe
+FAIL Modify constructed sheet from removed iframe function is not a constructor (evaluating 'new CSSStyleSheet()')
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-modify-after-removal.html (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-modify-after-removal.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-modify-after-removal.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,29 @@
+<!doctype html>
+<title>CSS Test: CSSStyleSheet modifications after removal</title>
+<link rel="help" href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<iframe id="frm"></iframe>
+<iframe id="frm2"></iframe>
+<script>
+ test(() => {
+ frm.contentDocument.body.innerHTML = "<style>div {color:red}</style>";
+ let sheet = frm.contentDocument.querySelector("style").sheet;
+ assert_equals(sheet.cssRules.length, 1);
+ frm.remove();
+ document.body.offsetTop;
+ sheet.insertRule("span {color: green}", 0);
+ assert_equals(sheet.cssRules.length, 2);
+ }, "Modify sheet from removed iframe");
+
+ test(() => {
+ frm2.contentWindow.eval("let sheet = new CSSStyleSheet(); document.adoptedStyleSheets = [ sheet ];");
+ let sheet = frm2.contentDocument.adoptedStyleSheets[0];
+ assert_equals(sheet.cssRules.length, 0);
+ frm2.remove();
+ document.body.offsetTop;
+ sheet.insertRule("span {color: green}", 0);
+ assert_equals(sheet.cssRules.length, 1);
+ }, "Modify constructed sheet from removed iframe");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/w3c-import.log (265293 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/w3c-import.log 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/w3c-import.log 2020-08-05 18:48:28 UTC (rev 265294)
@@ -14,6 +14,7 @@
None
------------------------------------------------------------------------
List of files:
+/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS-namespace-object-class-string.html
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS.html
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSGroupingRule-cssRules.html
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSGroupingRule-insertRule.html
@@ -30,6 +31,7 @@
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable-duplicate.html
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable-replace-on-regular-sheet.html
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable.html
+/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-modify-after-removal.html
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet.html
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/HTMLLinkElement-disabled-001.html
/LayoutTests/imported/w3c/web-platform-tests/css/cssom/HTMLLinkElement-disabled-002.html
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window-expected.txt (265293 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window-expected.txt 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -1841,6 +1841,11 @@
PASS XPathNSResolver interface: existence and properties of interface prototype object's "constructor" property
PASS XPathNSResolver interface: existence and properties of interface prototype object's @@unscopables property
PASS XPathNSResolver interface: operation lookupNamespaceURI(DOMString?)
+PASS Stringification of document.createNSResolver(document.body)
+PASS XPathNSResolver interface: document.createNSResolver(document.body) must inherit property "lookupNamespaceURI(DOMString?)" with the proper type
+FAIL XPathNSResolver interface: calling lookupNamespaceURI(DOMString?) on document.createNSResolver(document.body) with too few arguments must throw TypeError assert_throws_js: Called with 0 arguments function "function () {
+ fn.apply(obj, args);
+ }" did not throw
PASS XPathEvaluator interface: existence and properties of interface object
PASS XPathEvaluator interface object length
PASS XPathEvaluator interface object name
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window.js (265293 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window.js 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window.js 2020-08-05 18:48:28 UTC (rev 265294)
@@ -44,8 +44,7 @@
DOMTokenList: ['document.body.classList'],
XPathEvaluator: ['new XPathEvaluator()'],
XPathExpression: ['document.createExpression("//*")'],
- // Skipped due to https://github.com/web-platform-tests/wpt/issues/18827:
- // XPathNSResolver: ['document.createNSResolver(document.body)'],
+ XPathNSResolver: ['document.createNSResolver(document.body)'],
XPathResult: ['document.evaluate("//*", document.body)'],
});
}
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split-expected.txt (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,3 @@
+
+PASS IntersectionObserver on an IB split gets the right intersection ratio
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split.html (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<link rel="author" href="" title="Emilio Cobos Álvarez">
+<link rel="author" href="" title="Mozilla">
+<link rel="help" href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<style>
+ block {
+ display: block;
+ width: 50vw;
+ height: 50vh;
+ background: green;
+ }
+</style>
+<inline>
+ <block></block>
+</inline>
+<script>
+promise_test(async function() {
+ for (let element of document.querySelectorAll("inline, block")) {
+ let entries = await new Promise(resolve => {
+ new IntersectionObserver(resolve).observe(element);
+ });
+ assert_equals(entries.length, 1, element.nodeName + ": Should get an entry");
+ assert_true(entries[0].isIntersecting, element.nodeName + ": Should be intersecting");
+ assert_equals(entries[0].intersectionRatio, 1, element.nodeName + ": Should be fully intersecting");
+ }
+}, "IntersectionObserver on an IB split gets the right intersection ratio");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-threshold-expected.txt (265293 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-threshold-expected.txt 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-threshold-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -1,5 +1,5 @@
PASS At initial scroll position
-FAIL Scrolled to half way through target element assert_equals: expected true but got false
+PASS Scrolled to half way through target element
PASS Scrolled to target element completely off screen
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-threshold.html (265293 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-threshold.html 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-threshold.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -43,7 +43,8 @@
assert_equals(entries.length, 2);
assert_true(entries[1].intersectionRatio >= 0.5 &&
entries[1].intersectionRatio < 1);
- assert_equals(entries[1].isIntersecting, true);
+ // See https://github.com/w3c/IntersectionObserver/issues/432
+ assert_equals(entries[1].isIntersecting, false);
scroller.scrollTop = 100;
}
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-callback-arguments-expected.txt (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-callback-arguments-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-callback-arguments-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,3 @@
+
+FAIL Callback is invoked with |this| value of IntersectionObserver and two arguments assert_equals: expected (object) object "[object IntersectionObserver]" but got (undefined) undefined
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-callback-arguments.html (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-callback-arguments.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-callback-arguments.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<meta charset=utf-8>
+<title>IntersectionObserver: callback arguments</title>
+<link rel="help" href=""
+<script src=""
+<script src=""
+<div id="log"></div>
+<script>
+"use strict";
+
+async_test(t => {
+ const io = new IntersectionObserver(function(entries, observer) {
+ t.step(() => {
+ assert_equals(this, io);
+ assert_equals(arguments.length, 2);
+ assert_true(Array.isArray(entries));
+ assert_equals(entries.length, 1);
+ assert_true(entries[0] instanceof IntersectionObserverEntry);
+ assert_equals(observer, io);
+
+ io.disconnect();
+ t.done();
+ });
+ });
+
+ io.observe(document.body);
+}, "Callback is invoked with |this| value of IntersectionObserver and two arguments");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/cross-origin-subframe.html (265293 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/cross-origin-subframe.html 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/cross-origin-subframe.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -29,10 +29,15 @@
intersectionRect: clientRectToJson(entry.intersectionRect),
rootBounds: clientRectToJson(entry.rootBounds),
isIntersecting: entry.isIntersecting,
- target: entry.target.id
+ target: entry.target === document.documentElement ? "html" : entry.target.id
};
}
+function boundingClientRectToJson(element) {
+ let r = element.getBoundingClientRect();
+ return [r.left, r.right, r.top, r.bottom];
+}
+
// Note that we never use RAF in this code, because this frame might get render-throttled.
// Instead of RAF-ing, we just post an empty message to the parent window, which will
// RAF when it is received, and then send us a message to cause the next step to run.
@@ -43,6 +48,7 @@
}, { rootMargin: "7px" });
observer.observe(target);
observer.observe(emptyTarget);
+observer.observe(document.documentElement);
function step0() {
entries = entries.concat(observer.takeRecords());
@@ -59,6 +65,12 @@
rootBounds: "null",
isIntersecting: false,
target: emptyTarget.id
+ }, {
+ boundingClientRect: boundingClientRectToJson(document.documentElement),
+ intersectionRect: [0, 0, 0, 0],
+ rootBounds: "null",
+ isIntersecting: false,
+ target: "html"
}];
port.postMessage({
actual: entries.map(entryToJson),
@@ -71,9 +83,21 @@
function step1() {
entries = entries.concat(observer.takeRecords());
+ var client_rect = boundingClientRectToJson(document.documentElement);
+ // When the top document is scrolled all the way up, the iframe element is
+ // 108px below the scrolling viewport, and the iframe has a 2px border. When
+ // the top document is scrolled to y=200, the top 90px of the iframe's content
+ // is visible.
+ var expected = [{
+ boundingClientRect: client_rect,
+ intersectionRect: client_rect.slice(0, 3).concat(90),
+ rootBounds: "null",
+ isIntersecting: true,
+ target: "html"
+ }];
port.postMessage({
actual: entries.map(entryToJson),
- expected: [],
+ expected: expected,
description: "topDocument.scrollingElement.scrollTop = 200"
}, "*");
entries = [];
@@ -121,6 +145,12 @@
rootBounds: "null",
isIntersecting: false,
target: emptyTarget.id
+ }, {
+ boundingClientRect: boundingClientRectToJson(document.documentElement),
+ intersectionRect: [0, 0, 0, 0],
+ rootBounds: "null",
+ isIntersecting: false,
+ target: "html"
}];
port.postMessage({
actual: entries.map(entryToJson),
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-detached-document-expected.txt (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-detached-document-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-detached-document-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,5 @@
+
+PASS IntersectionObserver in a single document using the implicit root.
+PASS First rAF.
+PASS Adopt target.
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-detached-document.html (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-detached-document.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-detached-document.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<script src=""
+<script src=""
+<script src=""
+
+<style>
+pre, #log {
+ position: absolute;
+ top: 0;
+ left: 200px;
+}
+#target {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+}
+</style>
+
+<script>
+var vw = document.documentElement.clientWidth;
+var vh = document.documentElement.clientHeight;
+
+var entries = [];
+var target;
+
+runTestCycle(function() {
+ var detached_document = document.implementation.createHTMLDocument("test");
+ target = detached_document.createElement("div");
+ target.id = "target";
+ var observer = new IntersectionObserver(function(changes) {
+ entries = entries.concat(changes)
+ });
+ observer.observe(target);
+ runTestCycle(step0, "First rAF.");
+}, "IntersectionObserver in a single document using the implicit root.");
+
+function step0() {
+ document.adoptNode(target);
+ document.body.appendChild(target);
+ checkLastEntry(entries, 0, [0, 0, 0, 0, 0, 0, 0, 0]);
+ runTestCycle(step1, "Adopt target.");
+}
+
+function step1() {
+ checkLastEntry(entries, 1, [8, 108, 8, 108, 8, 108, 8, 108, 0, vw, 0, vh, true]);
+}
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/w3c-import.log (265293 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/w3c-import.log 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/w3c-import.log 2020-08-05 18:48:28 UTC (rev 265294)
@@ -30,6 +30,7 @@
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/inline-client-rect.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/inline-with-block-child-client-rect.html
+/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-change-events.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-threshold.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/multiple-targets.html
@@ -36,6 +37,7 @@
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/multiple-thresholds.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-attributes.html
+/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-callback-arguments.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-exceptions.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-in-iframe.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-without-js-reference.html
@@ -49,6 +51,7 @@
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-zero-size-target.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/shadow-content.html
+/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-detached-document.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-different-window.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/text-target.html
/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/timestamp.html
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any-expected.txt (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,8 @@
+
+PASS entryTypes must be a sequence or throw a TypeError
+PASS Empty sequence entryTypes does not throw an exception.
+PASS Unknown entryTypes do not throw an exception.
+PASS Filter unsupported entryType entryType names within the entryTypes sequence
+FAIL Check observer callback parameter and this values assert_equals: observer is the this value expected object "[object Window]" but got object "[object PerformanceObserver]"
+PASS replace observer if already present
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.html (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.js (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.js 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,63 @@
+// META: script=performanceobservers.js
+
+ test(function () {
+ const obs = new PerformanceObserver(() => {});
+ assert_throws_js(TypeError, function () {
+ obs.observe({entryTypes: "mark"});
+ });
+ }, "entryTypes must be a sequence or throw a TypeError");
+
+ test(function () {
+ const obs = new PerformanceObserver(() => {});
+ obs.observe({entryTypes: []});
+ }, "Empty sequence entryTypes does not throw an exception.");
+
+ test(function () {
+ const obs = new PerformanceObserver(() => {});
+ obs.observe({entryTypes: ["this-cannot-match-an-entryType"]});
+ obs.observe({entryTypes: ["marks","navigate", "resources"]});
+ }, "Unknown entryTypes do not throw an exception.");
+
+ test(function () {
+ const obs = new PerformanceObserver(() => {});
+ obs.observe({entryTypes: ["mark","this-cannot-match-an-entryType"]});
+ obs.observe({entryTypes: ["this-cannot-match-an-entryType","mark"]});
+ obs.observe({entryTypes: ["mark"], others: true});
+ }, "Filter unsupported entryType entryType names within the entryTypes sequence");
+
+ async_test(function (t) {
+ var finish = t.step_func(function () { t.done(); });
+ var observer = new PerformanceObserver(
+ function (entryList, obs) {
+ var self = this;
+ t.step(function () {
+ assert_true(entryList instanceof PerformanceObserverEntryList, "first callback parameter must be a PerformanceObserverEntryList instance");
+ assert_true(obs instanceof PerformanceObserver, "second callback parameter must be a PerformanceObserver instance");
+ assert_equals(observer, self, "observer is the this value");
+ assert_equals(observer, obs, "observer is second parameter");
+ assert_equals(self, obs, "this and second parameter are the same");
+ observer.disconnect();
+ finish();
+ });
+ }
+ );
+ self.performance.clearMarks();
+ observer.observe({entryTypes: ["mark"]});
+ self.performance.mark("mark1");
+ }, "Check observer callback parameter and this values");
+
+ async_test(function (t) {
+ var observer = new PerformanceObserver(
+ t.step_func(function (entryList, obs) {
+ checkEntries(entryList.getEntries(),
+ [{ entryType: "measure", name: "measure1"}]);
+ observer.disconnect();
+ t.done();
+ })
+ );
+ self.performance.clearMarks();
+ observer.observe({entryTypes: ["mark"]});
+ observer.observe({entryTypes: ["measure"]});
+ self.performance.mark("mark1");
+ self.performance.measure("measure1");
+ }, "replace observer if already present");
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.worker-expected.txt (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.worker-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1,8 @@
+
+PASS entryTypes must be a sequence or throw a TypeError
+PASS Empty sequence entryTypes does not throw an exception.
+PASS Unknown entryTypes do not throw an exception.
+PASS Filter unsupported entryType entryType names within the entryTypes sequence
+FAIL Check observer callback parameter and this values assert_equals: observer is the this value expected object "[object DedicatedWorkerGlobalScope]" but got object "[object PerformanceObserver]"
+PASS replace observer if already present
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.worker.html (0 => 265294)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/performance-timeline/po-observe.any.worker.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Deleted: trunk/LayoutTests/js/getOwnPropertyDescriptor-host-object-proxy-expected.txt (265293 => 265294)
--- trunk/LayoutTests/js/getOwnPropertyDescriptor-host-object-proxy-expected.txt 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/js/getOwnPropertyDescriptor-host-object-proxy-expected.txt 2020-08-05 18:48:28 UTC (rev 265294)
@@ -1,9 +0,0 @@
-
-PASS Window target, no trap, "name" attribute
-PASS Window target, forwarding trap, [Unforgeable] "document" attribute
-PASS Window proxy target, custom trap, "onclick" event handler attribute
-PASS Document target, forwarding trap, [Unforgeable] "location" attribute
-PASS Document proxy target, custom trap, non-existent value attribute
-PASS Location target, no trap, [Unforgeable] "hash" attribute
-PASS Location proxy target, forwarding trap, [Unforgeable] "reload" method
-
Deleted: trunk/LayoutTests/js/getOwnPropertyDescriptor-host-object-proxy.html (265293 => 265294)
--- trunk/LayoutTests/js/getOwnPropertyDescriptor-host-object-proxy.html 2020-08-05 17:51:47 UTC (rev 265293)
+++ trunk/LayoutTests/js/getOwnPropertyDescriptor-host-object-proxy.html 2020-08-05 18:48:28 UTC (rev 265294)
@@ -1,92 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>getOwnPropertyDescriptor() is correct for Proxy with host object target</title>
- <script src=""
- <script src=""
-</head>
-<body>
-<script>
-'use strict';
-
-test(() => {
- let windowProxy = new Proxy(window, {});
- name = 'old_name';
- let descriptor = Object.getOwnPropertyDescriptor(windowProxy, 'name');
-
- assert_equals(descriptor.get.call(window), 'old_name');
- descriptor.set.call(window, 'new_name');
- assert_equals(name, 'new_name');
- assert_true(descriptor.enumerable);
- assert_true(descriptor.configurable);
-}, 'Window target, no trap, "name" attribute');
-
-test(() => {
- let windowProxy = new Proxy(window, {});
-
- assert_object_equals(
- Object.getOwnPropertyDescriptor(windowProxy, 'document'),
- Object.getOwnPropertyDescriptor(window, 'document')
- );
-}, 'Window target, forwarding trap, [Unforgeable] "document" attribute');
-
-test(() => {
- let trapResult = {get() {}, set(_val) {}, enumerable: false, configurable: true};
- let windowProxy = new Proxy(new Proxy(window, {}), {
- getOwnPropertyDescriptor: () => trapResult,
- });
-
- assert_object_equals(
- Object.getOwnPropertyDescriptor(windowProxy, 'onclick'),
- trapResult
- );
-}, 'Window proxy target, custom trap, "onclick" event handler attribute');
-
-test(() => {
- let documentProxy = new Proxy(document, {
- getOwnPropertyDescriptor: Reflect.getOwnPropertyDescriptor,
- });
-
- assert_object_equals(
- Object.getOwnPropertyDescriptor(documentProxy, 'location'),
- Object.getOwnPropertyDescriptor(document, 'location')
- );
-}, 'Document target, forwarding trap, [Unforgeable] "location" attribute');
-
-test(() => {
- let trapResult = {value: 4, writable: false, enumerable: true, configurable: true};
- let documentProxy = new Proxy(new Proxy(document, {}), {
- getOwnPropertyDescriptor: () => trapResult,
- });
-
- assert_object_equals(
- Object.getOwnPropertyDescriptor(documentProxy, 'foo'),
- trapResult
- );
-}, 'Document proxy target, custom trap, non-existent value attribute');
-
-test(() => {
- let locationProxy = new Proxy(location, {});
- location.hash = '#old';
- let descriptor = Object.getOwnPropertyDescriptor(locationProxy, 'hash');
-
- assert_equals(descriptor.get.call(location), '#old');
- descriptor.set.call(location, '#new');
- assert_equals(location.hash, '#new');
- assert_true(descriptor.enumerable);
- assert_false(descriptor.configurable);
-}, 'Location target, no trap, [Unforgeable] "hash" attribute');
-
-test(() => {
- let locationProxy = new Proxy(new Proxy(location, {}), {
- getOwnPropertyDescriptor: Reflect.getOwnPropertyDescriptor,
- });
-
- assert_object_equals(
- Object.getOwnPropertyDescriptor(locationProxy, 'reload'),
- Object.getOwnPropertyDescriptor(location, 'reload')
- );
-}, 'Location proxy target, forwarding trap, [Unforgeable] "reload" method');
-</script>
-</body>
-</html>