Commit bdbc965e authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Chromium LUCI CQ

Import wpt@ef4efeb8c694eb19c9ce477f696e48a6f7035d97

Using wpt-import in Chromium fc4d8fb1.

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

Directory owners for changes in this CL:
cbiesinger@chromium.org:
  external/wpt/css/css-sizing
domenic@chromium.org, hiroshige@chromium.org:
  external/wpt/import-maps
eae@chromium.org, szager@chromium.org:
  external/wpt/intersection-observer
rego@igalia.com:
  external/wpt/css/css-grid
  external/wpt/css/selectors

NOAUTOREVERT=true
TBR=foolip@google.com

No-Export: true
Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel,linux-wpt-input-fyi-rel
Change-Id: I0f399ae6788eaf391e9423a24d82b45a50ecfa13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616341Reviewed-by: default avatarWPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#841305}
parent f137f1cf
......@@ -2473,6 +2473,8 @@ crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-20
crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-206.xht [ Failure ]
# ====== New tests from wpt-importer added here ======
crbug.com/626703 external/wpt/css/css-sizing/aspect-ratio/flex-aspect-ratio-025.html [ Failure ]
crbug.com/626703 external/wpt/css/css-sizing/aspect-ratio/flex-aspect-ratio-026.html [ Failure ]
crbug.com/626703 external/wpt/html/interaction/focus/document-level-focus-apis/document-has-system-focus.html [ Timeout ]
crbug.com/626703 [ Mac11.0 ] virtual/threaded/external/wpt/animation-worklet/worklet-animation-set-keyframes.https.html [ Failure ]
crbug.com/626703 external/wpt/websockets/cookies/004.html [ Timeout ]
......
......@@ -5,6 +5,9 @@ const createBuffer = (() => {
if (type === "ArrayBuffer") {
return new ArrayBuffer(length);
} else if (type === "SharedArrayBuffer") {
if (sabConstructor.name !== "SharedArrayBuffer") {
throw new Error("WebAssembly.Memory does not support shared:true");
}
return new sabConstructor(length);
} else {
throw new Error("type has to be ArrayBuffer or SharedArrayBuffer");
......
......@@ -5,7 +5,7 @@ const gridChildHelperRow = "row";
const gridChildHelperCol = "col";
// Helper for building testcases for grid-template-* with a child div in
// multiple positions. Prop is expected ot be one of gridChildHelperRow or
// multiple positions. Prop is expected to be one of gridChildHelperRow or
// gridChildHelperCol, to select testing grid rows or grid columns,
// respectively.
// The child div is found by the id of 'child'.
......
<!DOCTYPE html>
<html>
<title>CSS aspect-ratio: Test flex item's resolved width/min-width with border-box box-sizing in a row flex container</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">
<link rel="match" href="../../reference/ref-filled-green-200px-square.html" />
<style>
.flexContainer {
display: flex;
flex-direction: row;
width: 1px;
}
.item {
background: green;
padding-top: 15px;
box-sizing: border-box;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<!-- In the following four flex containers, the aspect-ratio works with border-box. -->
<div class="flexContainer" style="width: auto;">
<!-- The border-box height 25px is transferred to the main axis,
yielding a resolved flex base size of 200px. -->
<div class="item" style="min-width:0; height: 25px; aspect-ratio: 8/1;"></div>
</div>
<div class="flexContainer">
<!-- The border-box height 25px is transferred to the main axis,
yielding a resolved min-width:auto of 200px. -->
<div class="item" style="height: 25px; aspect-ratio: 8/1;"></div>
</div>
<div class="flexContainer">
<!-- The border-box min-height 25px is transferred to the main axis,
yielding a resolved min-width:auto of 200px. -->
<div class="item" style="min-height: 25px; aspect-ratio: 8/1;"></div>
</div>
<div class="flexContainer">
<!-- The border-box height 25px (clamped by max-height) is transferred to the main axis,
yielding a resolved min-width:auto of 200px. -->
<div class="item" style="max-height: 25px; height: 100px; aspect-ratio: 8/1;"></div>
</div>
<!-- In the following four flex containers, the aspect-ratio works with content-box
because its value contains 'auto'. -->
<div class="flexContainer" style="width: auto;">
<!-- The content-box height 10px is transferred to the main axis,
yielding a resolved flex base size of 200px. -->
<div class="item" style="min-width:0; height: 25px; aspect-ratio: auto 20/1;"></div>
</div>
<div class="flexContainer">
<!-- The content-box height 10px is transferred to the main axis,
yielding a resolved min-width:auto of 200px. -->
<div class="item" style="height: 25px; aspect-ratio: auto 20/1;"></div>
</div>
<div class="flexContainer">
<!-- The content-box min-height 10px is transferred to the main axis,
yielding a resolved min-width:auto of 200px. -->
<div class="item" style="min-height: 25px; aspect-ratio: auto 20/1;"></div>
</div>
<div class="flexContainer">
<!-- The content-box height 10px (clamped by max-height) is transferred
to the main axis, yielding a resolved min-width:auto of 200px. -->
<div class="item" style="max-height: 25px; height: 100px; aspect-ratio: auto 20/1;"></div>
</div>
</html>
<!DOCTYPE html>
<html>
<title>CSS aspect-ratio: Test flex item's resolved height/min-height with border-box box-sizing in a column flex container</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">
<link rel="match" href="../../reference/ref-filled-green-200px-square.html" />
<style>
.flexContainer {
display: flex;
flex-direction: column;
float: left;
height: 1px;
}
.item {
background: green;
padding-left: 15px;
box-sizing: border-box;
}
.item > div {
height: 500px; /* Set a large content size suggestion for flex item. */
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<!-- In the following four flex containers, the aspect-ratio works with border-box. -->
<div class="flexContainer" style="height: auto;">
<!-- The border-box width 25px is transferred to the main axis,
yielding a resolved flex base size of 200px. -->
<div class="item" style="min-height:0; width: 25px; aspect-ratio: 1/8;"><div></div></div>
</div>
<div class="flexContainer">
<!-- The border-box width 25px is transferred to the main axis,
yielding a resolved min-height:auto of 200px. -->
<div class="item" style="width: 25px; aspect-ratio: 1/8;"><div></div></div>
</div>
<div class="flexContainer">
<!-- The border-box min-width 25px is transferred to the main axis,
yielding a resolved min-height:auto of 200px. -->
<div class="item" style="min-width: 25px; aspect-ratio: 1/8;"><div></div></div>
</div>
<div class="flexContainer">
<!-- The border-box width 25px (clamped by max-width) is transferred to the main axis,
yielding a resolved min-height:auto of 200px. -->
<div class="item" style="max-width: 25px; width: 100px; aspect-ratio: 1/8;"><div></div></div>
</div>
<!-- In the following four flex containers, the aspect-ratio works with content-box
because its value contains 'auto'. -->
<div class="flexContainer" style="height: auto;">
<!-- The content-box width 10px is transferred to the main axis,
yielding a resolved flex base size of 200px. -->
<div class="item" style="min-height:0; width: 25px; aspect-ratio: auto 1/20;"><div></div></div>
</div>
<div class="flexContainer">
<!-- The content-box width 10px is transferred to the main axis,
yielding a resolved min-height:auto of 200px. -->
<div class="item" style="width: 25px; aspect-ratio: auto 1/20;"><div></div></div>
</div>
<div class="flexContainer">
<!-- The content-box min-width 10px is transferred to the main axis,
yielding a resolved min-height:auto of 200px. -->
<div class="item" style="min-width: 25px; aspect-ratio: auto 1/20;"><div></div></div>
</div>
<div class="flexContainer">
<!-- The content-box width 10px (clamped by max-width) is transferred to the main axis,
yielding a resolved min-height:auto of 200px. -->
<div class="item" style="max-width: 25px; width: 100px; aspect-ratio: auto 1/20;"><div></div></div>
</div>
</html>
<!doctype html>
<title>Calc rounds to integer</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel=author title="Tab Atkins-Bittner" href="https://www.xanthir.com/contact/">
<link rel="help" href="https://drafts.csswg.org/css-values/#calc-range">
<link rel="help" href="https://drafts.csswg.org/css-easing/#funcdef-step-easing-function-steps">
<link rel="help" href="https://drafts.csswg.org/css-multicol-2/#column-span">
<link rel="help" href="https://drafts.csswg.org/css-lists/#propdef-counter-reset">
<link rel="help" href="https://drafts.csswg.org/css-lists/#propdef-counter-increment">
<link rel="help" href="https://drafts.csswg.org/css-lists/#propdef-counter-set">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-feature-settings-prop">
<link rel="help" href="https://drafts.csswg.org/css-grid/#propdef-grid-template-rows">
<link rel="help" href="https://drafts.csswg.org/css-grid/#propdef-grid-row">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#propdef-hyphenate-limit-chars">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#propdef-hyphenate-limit-lines">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-initial-letter">
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#propdef-max-lines">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#propdef-order">
<link rel="help" href="https://drafts.csswg.org/css-break-4/#propdef-orphans">
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-text-combine-upright">
<link rel="help" href="https://drafts.csswg.org/css-break-4/#propdef-widows">
<link rel="help" href="https://drafts.csswg.org/css2/#propdef-z-index">
<!--
Verifying that, per V&U, a calc() that results in a non-integer value
gets rounded to the nearest integer
when used in a place that requires <integer> specifically.
This tests both straight-up decimal-point values,
and scinot, which is defined to parse as <number-token>.
-->
<body>
<script>
runTests("animation-timing-function", "steps(xxx)");
runTests("column-span");
runTests("counter-increment", "foo xxx");
runTests("counter-reset", "foo xxx");
runTests("counter-set", "foo xxx");
runTests("font-feature-settings", '"fooo" xxx');
runTests("grid-row");
runTests("grid-template-rows", "repeat(xxx, 10px)");
runTests("hyphenate-limit-chars");
runTests("hyphenate-limit-lines");
runTests("initial-letter", "1.1 xxx");
runTests("max-lines");
runTests("order");
runTests("orphans");
runTests("text-combine-upright", "digits xxx");
runTests("transition-timing-function", "steps(xxx)");
runTests("widows");
runTests("z-index");
function runTests(prop, valPattern="xxx") {
const el = document.body;
// Don't spuriously fail bc the prop or val isn't supported.
if(!verifySupport(el, prop, valPattern)) return;
const validValues = [
"10",
"calc(10)",
"calc(10.1)",
"calc(1e1)",
"calc(1.1e1)",
];
const invalidValues = [
"1e1",
"1.1e1",
"10.1",
];
for(let testVal of validValues) {
testInt(el, prop, testVal, valPattern);
}
for(let testVal of invalidValues) {
testIntInvalid(el, prop, testVal, valPattern);
}
}
function verifySupport(el, prop, valPattern) {
let testVal = "10";
if(valPattern !== undefined) {
testVal = valPattern.replace("xxx", testVal);
}
el.removeAttribute("style");
const nullVal = getComputedStyle(el)[prop];
el.style.setProperty(prop, testVal);
return getComputedStyle(el)[prop] != nullVal;
}
function testInt(el, prop, testVal, valPattern) {
// to avoid needing to specify serialization,
// just test whether it parses at all
if(valPattern !== undefined) {
testVal = valPattern.replace("xxx", testVal);
}
test(()=>{
el.removeAttribute("style");
const nullVal = getComputedStyle(el)[prop];
el.style.setProperty(prop, testVal);
assert_not_equals(getComputedStyle(el)[prop], nullVal);
}, `${prop} should accept "${testVal}"`)
}
function testIntInvalid(el, prop, testVal, valPattern) {
// similarly, just verify it doesn't parse at all
if(valPattern !== undefined) {
testVal = valPattern.replace("xxx", testVal);
}
test(()=>{
el.removeAttribute("style");
const nullVal = getComputedStyle(el)[prop];
el.style.setProperty(prop, testVal);
assert_equals(getComputedStyle(el)[prop], nullVal);
}, `${prop} should not accept "${testVal}"`)
}
</script>
<!doctype html>
<title>MouseEvent.offsetX/Y returns coordinates relative to the root svg</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1684973">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/1508">
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-mouseevent-offsetx">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
body { margin: 0 }
</style>
<svg width=100 height=100>
<rect width=30 height=30 x=50 y=50 fill=green></rect>
</svg>
<script>
let t = async_test();
let rect = document.querySelector("rect");
rect.addEventListener("click", t.step_func_done(function(e) {
assert_true(e.offsetX >= 50);
assert_true(e.offsetY >= 50);
}))
test_driver.click(rect);
</script>
This is a testharness.js-based test.
PASS z-index can take a 4-digit integer
PASS An unregistered custom prop can take a 4-digit integer
PASS An <integer> custom prop can take a 4-digit integer
PASS z-index can take a custom property set to a 4-digit integer
PASS z-index can take a 6-digit integer
PASS An unregistered custom prop can take a 6-digit integer
PASS An <integer> custom prop can take a 6-digit integer
PASS z-index can take a custom property set to a 6-digit integer
PASS z-index can take a 8-digit integer
FAIL An unregistered custom prop can take a 8-digit integer assert_equals: expected "11111111" but got "1.11111e+7"
FAIL An <integer> custom prop can take a 8-digit integer assert_equals: expected "11111111" but got "1.11111e+7"
PASS z-index can take a custom property set to a 8-digit integer
PASS z-index can take a 12-digit integer
FAIL An unregistered custom prop can take a 12-digit integer assert_equals: expected "111111111111" but got "1.11111e+11"
FAIL An <integer> custom prop can take a 12-digit integer assert_equals: expected "111111111111" but got "1.11111e+11"
PASS z-index can take a custom property set to a 12-digit integer
PASS z-index can take a 25-digit integer
FAIL An unregistered custom prop can take a 25-digit integer assert_equals: expected "1111111111111111111111111" but got "1.11111e+24"
FAIL An <integer> custom prop can take a 25-digit integer assert_equals: expected "1111111111111111111111111" but got "1.11111e+24"
PASS z-index can take a custom property set to a 25-digit integer
Harness: the test ran to completion.
<link rel=author title="Tab Atkins-Bittner" href="https://www.xanthir.com/contact/">
<link rel="help" href="https://drafts.csswg.org/css-values/#calc-range">
<body><!doctype html>
<title>Serializing Integers Never Uses Scinot</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel=author title="Tab Atkins-Bittner" href="https://www.xanthir.com/contact/">
<link rel="help" href="https://drafts.csswg.org/cssom/#serialize-a-css-component-value">
<!--
Per CSSOM, integers always serialize all their digits out.
They never serialize to scinot, regardless of size,
because that makes them stop being an integer.
This applies to custom properties as well.
-->
<body>
<script>
try {
CSS.registerProperty({
name: "--two",
value: "<integer>",
inherits: true,
initial: -1
});
}catch(e){}
testIntLength(4);
testIntLength(6);
testIntLength(8);
testIntLength(12);
// JS starts serializing with scinot at 22 digits...
testIntLength(25);
function testIntLength(len) {
let el = document.body;
const val = "1".repeat(len);
test(()=>{
el.removeAttribute("style");
const nullVal = getComputedStyle(el).zIndex;
el.style.zIndex=val;
assert_not_equals(getComputedStyle(el).zIndex, nullVal)
}, `z-index can take a ${len}-digit integer`);
test(()=>{
el.removeAttribute("style");
el.style.setProperty("--one", val);
assert_equals(getComputedStyle(el).getPropertyValue("--one"), val);
}, `An unregistered custom prop can take a ${len}-digit integer`);
test(()=>{
el.removeAttribute("style");
el.style.setProperty("--two", val);
assert_equals(getComputedStyle(el).getPropertyValue("--two"), val);
}, `An <integer> custom prop can take a ${len}-digit integer`);
test(()=>{
el.removeAttribute("style");
el.style.zIndex = val;
const standardVal = getComputedStyle(el).zIndex;
el.removeAttribute("style");
el.style.setProperty("--three", val);
el.style.zIndex = "var(--three)";
assert_equals(getComputedStyle(el).zIndex, standardVal);
}, `z-index can take a custom property set to a ${len}-digit integer`);
}
</script>
......@@ -14,7 +14,7 @@ input.addEventListener('focus', function(e) {
var focused = document.querySelector(':focus');
test(() => {
assert_equals(e.target, focused, "':focus' matches event.target");
}, "Checks that ':focus' pseudo-class matches inside 'focus' evente handler");
}, "Checks that ':focus' pseudo-class matches inside 'focus' event handler");
}, false);
input.focus();
</script>
......@@ -13,6 +13,7 @@
<style>
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -14,6 +14,7 @@
<style>
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -14,6 +14,7 @@
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -14,6 +14,7 @@
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -13,6 +13,7 @@
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -10,6 +10,13 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
span[contenteditable] {
border: 1px solid black;
background-color: white;
......
......@@ -12,6 +12,7 @@
<style>
@supports not (selector(:focus-visible)) {
#el:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -9,7 +9,8 @@
<script src="/resources/testharnessreport.js"></script>
<style>
@supports not (selector(:focus-visible)) {
#buton:focus {
#button:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -10,6 +10,7 @@
<style>
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -12,6 +12,7 @@
<style>
@supports not (selector(:focus-visible)) {
#next:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -13,6 +13,7 @@
<style>
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -9,6 +9,7 @@
<style>
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -11,6 +11,7 @@
<style>
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -11,6 +11,7 @@
<style>
@supports not (selector(:focus-visible)) {
:focus {
outline: red solid 5px;
background-color: red;
}
}
......
......@@ -14,10 +14,16 @@
<div id="log"></div>
<script>
class MyCustomElement extends HTMLElement { }
var numberOfChildNodesInConnectedCallback = 0;
class MyCustomElement extends HTMLElement {
connectedCallback() {
numberOfChildNodesInConnectedCallback = this.childNodes.length;
}
}
customElements.define('my-custom-element', MyCustomElement);
document.write('<my-custom-element></my-custom-element>');
document.write('<my-custom-element>hello <b>world</b></my-custom-element>');
test(function () {
var instance = document.querySelector('my-custom-element');
......@@ -27,6 +33,11 @@ test(function () {
}, 'HTML parser must instantiate custom elements inside document.write');
test(function () {
assert_equals(numberOfChildNodesInConnectedCallback, 0);
}, 'HTML parser should call connectedCallback before appending child nodes inside document.write');
</script>
</body>
</html>
......@@ -44,15 +44,13 @@ explicitly-managed secret.
- (unknown registrar): http://testthewebforward.org
- web-human@w3.org
- [Google Domains](https://domains.google/): https://wpt.fyi
- smcgruer@google.com
- foolip@google.com
- robertma@google.com
- mike@bocoup.com
- (Google internal): https://wpt.live https://wptpr.live
- smcgruer@google.com
- foolip@google.com
- robertma@google.com
- [GitHub](https://github.com/): web-platform-tests
- [@foolip](https://github.com/foolip)
- [@Hexcles](https://github.com/Hexcles)
- [@jgraham](https://github.com/jgraham)
- [@plehegar](https://github.com/plehegar)
- [@thejohnjansen](https://github.com/thejohnjansen)
......@@ -62,15 +60,12 @@ explicitly-managed secret.
- [@plehegar](https://github.com/plehegar)
- [@sideshowbarker](https://github.com/sideshowbarker)
- [Google Cloud Platform](https://cloud.google.com/): wptdashboard{-staging}
- robertma@google.com
- smcgruer@google.com
- foolip@google.com
- [Google Cloud Platform](https://cloud.google.com/): wpt-live
- smcgruer@google.com
- robertma@google.com
- [Google Cloud Platform](https://cloud.google.com/): wpt-pr-bot
- smcgruer@google.com
- robertma@google.com
- E-mail address: wpt.pr.bot@gmail.com
- smcgruer@google.com
- boaz@bocoup.com
......
<!doctype html>
<title>Audio intrinsic size doesn't depend on its max size</title>
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1683979">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div style="display: inline-block">
<audio controls style="max-width: 99%" id="test"></audio>
</div>
<script>
let audio = document.getElementById("test");
function computeSize() {
return audio.getBoundingClientRect().width;
}
let size = computeSize();
async_test(function(t) {
requestAnimationFrame(t.step_func(function() {
assert_equals(computeSize(), size, "Shouldn't have changed size");
requestAnimationFrame(t.step_func_done(function() {
assert_equals(computeSize(), size, "Shouldn't have changed size");
}));
}));
});
</script>
......@@ -12,7 +12,7 @@ $ python tools/format_json.py resources/*.json
def main():
for filename in sys.argv[1:]:
print filename
print(filename)
try:
spec = json.load(
open(filename, u'r'), object_pairs_hook=collections.OrderedDict)
......
<!DOCTYPE html>
<meta name="viewport" content="width=device-width,initial-scale=1">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./resources/intersection-observer-test-utils.js"></script>
<style>
pre,
#log {
position: absolute;
top: 0;
left: 200px;
}
.spacer {
height: calc(100vh + 100px);
}
#target {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div class="spacer"></div>
<div id="target"></div>
<div class="spacer"></div>
<script>
var vw = document.documentElement.clientWidth;
var vh = document.documentElement.clientHeight;
var entries = [];
var target;
runTestCycle(function () {
target = document.getElementById("target");
assert_true(!!target, "target exists");
var observer = new IntersectionObserver(function (changes) {
entries = entries.concat(changes)
}, {root: document});
observer.observe(target);
entries = entries.concat(observer.takeRecords());
assert_equals(entries.length, 0, "No initial notifications.");
runTestCycle(step0, "First rAF.");
}, "IntersectionObserver in a single document using document as root.");
function step0() {
document.scrollingElement.scrollTop = 300;
runTestCycle(step1, "document.scrollingElement.scrollTop = 300");
checkLastEntry(entries, 0, [8, 108, vh + 108, vh + 208, 0, 0, 0, 0, 0, vw, 0, vh, false]);
}
function step1() {
document.scrollingElement.scrollTop = 0;
checkLastEntry(entries, 1, [8, 108, vh - 192, vh - 92, 8, 108, vh - 192, vh - 92, 0, vw, 0, vh, true]);
}
</script>
......@@ -3,6 +3,7 @@ FAIL Modifying selectionStart value of the input element assert_equals: expected
FAIL Modifying selectionEnd value of the input element assert_equals: expected 1 but got 0
FAIL Calling setSelectionRange() on the input element assert_equals: expected 1 but got 0
FAIL Calling select() on the input element assert_equals: expected 1 but got 0
FAIL Calling setRangeText() on the input element assert_equals: expected 1 but got 0
PASS Setting initial zero selectionStart value on the input element
FAIL Setting the same selectionStart value twice on the input element assert_equals: expected 1 but got 0
PASS Setting initial zero selectionEnd value on the input element
......@@ -14,6 +15,7 @@ FAIL Modifying selectionStart value of the disconnected input element assert_equ
FAIL Modifying selectionEnd value of the disconnected input element assert_equals: expected 1 but got 0
FAIL Calling setSelectionRange() on the disconnected input element assert_equals: expected 1 but got 0
FAIL Calling select() on the disconnected input element assert_equals: expected 1 but got 0
FAIL Calling setRangeText() on the disconnected input element assert_equals: expected 1 but got 0
PASS Setting initial zero selectionStart value on the disconnected input element
FAIL Setting the same selectionStart value twice on the disconnected input element assert_equals: expected 1 but got 0
PASS Setting initial zero selectionEnd value on the disconnected input element
......@@ -25,6 +27,7 @@ FAIL Modifying selectionStart value of the textarea element assert_equals: expec
FAIL Modifying selectionEnd value of the textarea element assert_equals: expected 1 but got 0
FAIL Calling setSelectionRange() on the textarea element assert_equals: expected 1 but got 0
FAIL Calling select() on the textarea element assert_equals: expected 1 but got 0
FAIL Calling setRangeText() on the textarea element assert_equals: expected 1 but got 0
PASS Setting initial zero selectionStart value on the textarea element
FAIL Setting the same selectionStart value twice on the textarea element assert_equals: expected 1 but got 0
PASS Setting initial zero selectionEnd value on the textarea element
......@@ -36,6 +39,7 @@ FAIL Modifying selectionStart value of the disconnected textarea element assert_
FAIL Modifying selectionEnd value of the disconnected textarea element assert_equals: expected 1 but got 0
FAIL Calling setSelectionRange() on the disconnected textarea element assert_equals: expected 1 but got 0
FAIL Calling select() on the disconnected textarea element assert_equals: expected 1 but got 0
FAIL Calling setRangeText() on the disconnected textarea element assert_equals: expected 1 but got 0
PASS Setting initial zero selectionStart value on the disconnected textarea element
FAIL Setting the same selectionStart value twice on the disconnected textarea element assert_equals: expected 1 but got 0
PASS Setting initial zero selectionEnd value on the disconnected textarea element
......
......@@ -100,6 +100,15 @@
assert_equals(collector.events.length, 1);
}, `Calling select() on ${name}`);
promise_test(async () => {
await data.initialize();
target.setRangeText("newmiddle", 2, 3, "select");
await data.assert_empty_spin();
assert_equals(collector.events.length, 1);
}, `Calling setRangeText() on ${name}`);
promise_test(async () => {
await data.initialize();
......
This is a testharness.js-based test.
FAIL Use of SVGAnimatedEnumeration within SVGFECompositeElement Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value provided is 0, which is not settable.
Harness: the test ran to completion.
......@@ -34,13 +34,18 @@ test(function() {
assert_equals(feCompositeElement.operator.baseVal, SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_XOR);
assert_equals(feCompositeElement.getAttribute('operator'), "xor");
// Switch to 'lighter'.
feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_LIGHTER;
assert_equals(feCompositeElement.operator.baseVal, SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_LIGHTER);
assert_equals(feCompositeElement.getAttribute('operator'), "lighter");
// Switch to 'arithmetic'.
feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC;
assert_equals(feCompositeElement.operator.baseVal, SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC);
assert_equals(feCompositeElement.getAttribute('operator'), "arithmetic");
// Try setting invalid values.
assert_throws_js(TypeError, function() { feCompositeElement.operator.baseVal = 7; });
assert_throws_js(TypeError, function() { feCompositeElement.operator.baseVal = 8; });
assert_equals(feCompositeElement.operator.baseVal, SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC);
assert_equals(feCompositeElement.getAttribute('operator'), "arithmetic");
......@@ -56,10 +61,5 @@ test(function() {
feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER;
assert_equals(feCompositeElement.operator.baseVal, SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER);
assert_equals(feCompositeElement.getAttribute('operator'), "over");
// Switch to 'lighter'.
assert_equals(SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_LIGHTER, undefined);
feCompositeElement.setAttribute("operator", "lighter");
assert_equals(feCompositeElement.operator.baseVal, SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_UNKNOWN);
});
</script>
\ No newline at end of file
</script>
......@@ -14,5 +14,5 @@ test.step(function () {
client.send(null);
test.step_timeout(() => {
assert_unreached("ontimeout not called.");
}, 10);
}, 1000);
});
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