Update web-platform-tests to revision bd951736b4d7dbfd862dfa0f27271b544e35ca30

This commit is contained in:
WPT Sync Bot 2019-01-22 20:47:08 -05:00 committed by Josh Matthews
parent 461bce1241
commit 74f3bef690
110 changed files with 2556 additions and 363 deletions

File diff suppressed because it is too large Load diff

View file

@ -5,18 +5,12 @@
[Bluetooth interface: attribute onserviceadded] [Bluetooth interface: attribute onserviceadded]
expected: FAIL expected: FAIL
[BluetoothRemoteGATTService interface: existence and properties of interface object]
expected: FAIL
[Bluetooth interface: navigator.bluetooth must inherit property "oncharacteristicvaluechanged" with the proper type] [Bluetooth interface: navigator.bluetooth must inherit property "oncharacteristicvaluechanged" with the proper type]
expected: FAIL expected: FAIL
[BluetoothServiceDataMap interface object length] [BluetoothServiceDataMap interface object length]
expected: FAIL expected: FAIL
[BluetoothDevice interface: existence and properties of interface prototype object]
expected: FAIL
[BluetoothManufacturerDataMap interface: existence and properties of interface prototype object] [BluetoothManufacturerDataMap interface: existence and properties of interface prototype object]
expected: FAIL expected: FAIL
@ -26,9 +20,6 @@
[BluetoothRemoteGATTDescriptor interface: operation readValue()] [BluetoothRemoteGATTDescriptor interface: operation readValue()]
expected: FAIL expected: FAIL
[BluetoothRemoteGATTCharacteristic interface: existence and properties of interface prototype object]
expected: FAIL
[BluetoothAdvertisingEvent interface: event must inherit property "uuids" with the proper type] [BluetoothAdvertisingEvent interface: event must inherit property "uuids" with the proper type]
expected: FAIL expected: FAIL
@ -53,9 +44,6 @@
[BluetoothRemoteGATTService interface: operation getCharacteristics(BluetoothCharacteristicUUID)] [BluetoothRemoteGATTService interface: operation getCharacteristics(BluetoothCharacteristicUUID)]
expected: FAIL expected: FAIL
[BluetoothRemoteGATTService interface: existence and properties of interface prototype object]
expected: FAIL
[BluetoothRemoteGATTCharacteristic interface: operation stopNotifications()] [BluetoothRemoteGATTCharacteristic interface: operation stopNotifications()]
expected: FAIL expected: FAIL
@ -128,9 +116,6 @@
[BluetoothRemoteGATTCharacteristic interface: operation writeValue(BufferSource)] [BluetoothRemoteGATTCharacteristic interface: operation writeValue(BufferSource)]
expected: FAIL expected: FAIL
[BluetoothRemoteGATTCharacteristic interface: existence and properties of interface object]
expected: FAIL
[BluetoothRemoteGATTServer interface: operation getPrimaryService(BluetoothServiceUUID)] [BluetoothRemoteGATTServer interface: operation getPrimaryService(BluetoothServiceUUID)]
expected: FAIL expected: FAIL
@ -158,9 +143,6 @@
[ValueEvent interface object length] [ValueEvent interface object length]
expected: FAIL expected: FAIL
[BluetoothDevice interface: existence and properties of interface object]
expected: FAIL
[ValueEvent interface: existence and properties of interface prototype object's @@unscopables property] [ValueEvent interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,2 @@
[font-display-feature-policy.tentative.html]
expected: FAIL

View file

@ -6,3 +6,6 @@
[Instant scrolling while doing history navigation.] [Instant scrolling while doing history navigation.]
expected: FAIL expected: FAIL
[Smooth scrolling while doing history navigation.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[insert-sibling-002.html]
[Remove/Insert adjacent sibling of parent]
expected: FAIL

View file

@ -0,0 +1,4 @@
[insert-sibling-003.html]
[Remove/Insert earlier sibling of ancestor]
expected: FAIL

View file

@ -0,0 +1,4 @@
[insert-sibling-004.html]
[Remove/Insert earlier sibling of parent]
expected: FAIL

View file

@ -0,0 +1,4 @@
[HTMLCollection-as-prototype.html]
[HTMLCollection as a prototype and setting own properties]
expected: FAIL

View file

@ -32,6 +32,7 @@
[single-byte-decoder.html?XMLHttpRequest] [single-byte-decoder.html?XMLHttpRequest]
expected: CRASH
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)] [ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
expected: FAIL expected: FAIL

View file

@ -312,3 +312,6 @@
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk] [<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL

View file

@ -11,3 +11,6 @@
[X-Content-Type-Options%3A%20nosniff%0C] [X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL expected: FAIL
[X-Content-Type-Options%3A%20'NosniFF']
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -0,0 +1,2 @@
[transition_calc_implicit.html]
expected: TIMEOUT

View file

@ -1,4 +0,0 @@
[paint_timing.html]
[Performance entries observer]
expected: FAIL

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<title>Intrinsic size of an atomic inline with negative margins.</title>
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#propdef-width">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<p>Test passes if there is a filled green square.</p>
<div style="display: inline-block; border: solid green 25px; line-height: 0;">
<div style="display: inline-block; width: 50px; height: 50px; margin-right: -100%; background: green;"></div>
</div>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<title>Test for font-display-late-swap feature policy</title>
<style>
.ahem {
font-family: 'Ahem';
}
.arial {
font-family: 'Arial';
}
</style>
<p>Tests if font-display is set to optional for each option except for when it is set to fallback</p>
<table id="container">
<tr>
<th>not-set</th>
<th>auto</th>
<th>block</th>
<th>swap</th>
<th>fallback</th>
<th>optional</th>
</tr>
<tr>
<td class="arial">a</td>
<td class="arial">a</td>
<td class="arial">a</td>
<td class="arial">a</td>
<td class="ahem">a</td>
<td class="arial">a</td>
</tr>
</table>

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>Test for font-display-late-swap feature policy</title>
<link rel="help" href="https://github.com/w3c/webappsec-feature-policy/blob/master/policies/font-display-late-swap.md">
<link rel="match" href="font-display-feature-policy.tentative-ref.html">
<style>
</style>
<p>Tests if font-display is set to optional for each option except for when it is set to fallback</p>
<table id="container">
<tr>
<th>not-set</th>
<th>auto</th>
<th>block</th>
<th>swap</th>
<th>fallback</th>
<th>optional</th>
</tr>
</table>
<script>
const fontDisplayValues = ['', 'auto', 'block', 'swap', 'fallback', 'optional'];
const table = document.getElementById('container');
function makeFontFaceDeclaration(family, display) {
url = '/fonts/Ahem.ttf?pipe=trickle(d1)'; // Before the swap period is over
return '@font-face { font-family: ' + family + '; src: url("' + url + '"); font-display: ' + display + '; }';
}
window.onload = () => {
let tr = document.createElement('tr');
for (let display of fontDisplayValues) {
const family = display + '-face';
const rule = makeFontFaceDeclaration(family, display);
document.styleSheets[0].insertRule(rule, 0);
let td = document.createElement('td');
td.textContent = 'a';
td.style.fontFamily = family + ', Arial';
tr.appendChild(td);
}
table.appendChild(tr);
const timeoutMilliSec = 1500; // After the font is loaded
setTimeout(() => {
document.documentElement.classList.remove("reftest-wait");
}, timeoutMilliSec);
}
</script>
</html>

View file

@ -0,0 +1 @@
Feature-Policy: font-display-late-swap 'none';

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have a static position (left/rigth and top/bottom are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: "auto",
right: "auto",
bottom: "auto",
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have a specific 'left' offset and a static block position (top/bottom are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: "auto",
right: "auto",
bottom: "auto",
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have a specific 'top' offset and a static inline position (left/right are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: 30,
right: "auto",
bottom: "auto",
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'right' offset and a static block position (top/bottom are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: "auto",
right: 35,
bottom: "auto",
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'bottom' offset and a static inline position (left/right are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
right: "auto",
top: "auto",
bottom: 40,
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'left' and 'top' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: 30,
right: "auto",
bottom: "auto",
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'left' and 'right' offsets and a static block position (top/bottom are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: "auto",
right: 35,
bottom: "auto",
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'left' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: "auto",
right: "auto",
bottom: 40,
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'top' and 'right' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: 30,
right: 35,
bottom: "auto",
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'top' and 'bottom' offsets and a static inline position (left/right are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: 30,
right: "auto",
bottom: 40,
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'right' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: "auto",
right: 35,
bottom: 40,
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'left', 'top' and 'right' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: 30,
right: 35,
bottom: "auto",
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'left', 'top' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: 30,
right: "auto",
bottom: 40,
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'left', 'right' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: "auto",
right: 35,
bottom: 40,
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'top', 'right' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: 30,
right: 35,
bottom: 40,
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned orthogonal elements inside grid items are properly placed and sized when they have specific 'left, 'top', 'right' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: 30,
right: 35,
bottom: 40,
orthogonal: true,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have a static position (left/rigth and top/bottom are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: "auto",
right: "auto",
bottom: "auto",
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have a specific 'left' offset and a static block position (top/bottom are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: "auto",
right: "auto",
bottom: "auto",
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have a specific 'top' offset and a static inline position (left/right are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: 30,
right: "auto",
bottom: "auto",
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'right' offset and a static block position (top/bottom are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: "auto",
right: 35,
bottom: "auto",
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'bottom' offset and a static inline position (left/right are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
right: "auto",
top: "auto",
bottom: 40,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'left' and 'top' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: 30,
right: "auto",
bottom: "auto",
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'left' and 'right' offsets and a static block position (top/bottom are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: "auto",
right: 35,
bottom: "auto",
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'left' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: "auto",
right: "auto",
bottom: 40,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'top' and 'right' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: 30,
right: 35,
bottom: "auto",
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'top' and 'bottom' offsets and a static inline position (left/right are 'auto').">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: 30,
right: "auto",
bottom: 40,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'right' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: "auto",
right: 35,
bottom: 40,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'left', 'top' and 'right' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: 30,
right: 35,
bottom: "auto",
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'left', 'top' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: 30,
right: "auto",
bottom: 40,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'left', 'right' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: "auto",
right: 35,
bottom: 40,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'top', 'right' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: "auto",
top: 30,
right: 35,
bottom: 40,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Positioned grid descendants</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#abspos" title="9. Absolute Positioning">
<meta name="assert" content="Checks that absolutely positioned elements inside grid items are properly placed and sized when they have specific 'left, 'top', 'right' and 'bottom' offsets.">
<link rel="stylesheet" href="support/positioned-grid-descendants.css" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id="log"></div>
<script type="module">
import {runTests} from "./support/positioned-grid-descendants.js";
runTests({
left: 25,
top: 30,
right: 35,
bottom: 40,
});
</script>
</body>

View file

@ -0,0 +1,25 @@
.grid {
display: grid;
grid: 150px 100px / 200px 300px;
margin: 1px 2px 3px 4px;
padding: 20px 15px 10px 5px;
border-width: 9px 3px 12px 6px;
border-style: solid;
width: 550px;
height: 400px;
position: relative;
font: 25px/1 Ahem;
}
.abspos {
position: absolute;
display: inline;
}
.orthogonal {
writing-mode: vertical-lr;
}
.grid > :nth-child(1) > .abspos {
color: cyan;
}
.grid > :nth-child(2) > .abspos {
color: yellow;
}

View file

@ -0,0 +1,70 @@
// Track sizes, including preceding padding and following remaining space
const colSizes = [5, 200, 300, 65];
const rowSizes = [20, 150, 100, 160];
// Calculate track positions
const colOffsets = [0];
const rowOffsets = [0];
for (const size of colSizes)
colOffsets.push(size + colOffsets[colOffsets.length - 1]);
for (const size of rowSizes)
rowOffsets.push(size + rowOffsets[rowOffsets.length - 1]);
export function runTests({left, top, right, bottom, orthogonal = false}) {
// Iterate all pairs of grid lines, where 0 and 4 represent "auto".
for (let colStart = 0; colStart < 4; ++colStart)
for (let colEnd = colStart + 1; colEnd <= 4; ++colEnd)
for (let rowStart = 0; rowStart < 4; ++rowStart)
for (let rowEnd = rowStart + 1; rowEnd <= 4; ++rowEnd)
{
// Create a 2x2 grid with two grid items, each one containing an abspos.
const grid = document.createElement("div");
grid.className = "grid";
for (let i = 1; i <= 2; ++i) {
// Create a grid item with some content before the abspos, so that the static
// position is shifted 50px to the right and 25px to the bottom.
const gridItem = document.createElement("div");
gridItem.style.gridArea = `${i} / ${i}`;
grid.appendChild(gridItem);
gridItem.innerHTML = "X<br />XX";
// Create an abspos with content of 50px inline size, 25px block size.
const absPos = document.createElement("div");
gridItem.appendChild(absPos);
absPos.className = "abspos";
absPos.textContent = "XX";
if (orthogonal) absPos.classList.add("orthogonal");
// Let the containing block be the grid area, and set offsets.
Object.assign(absPos.style, {
gridColumnStart: colStart || "auto",
gridColumnEnd: colEnd % 4 || "auto",
gridRowStart: rowStart || "auto",
gridRowEnd: rowEnd % 4 || "auto",
left: left == "auto" ? left : left + "px",
top: top == "auto" ? top : top + "px",
right: right == "auto" ? right : right + "px",
bottom: bottom == "auto" ? bottom : bottom + "px",
});
// Calculate expected position and size.
const expectedWidth =
left == "auto" || right == "auto" ? 25 * (orthogonal ? 1 : 2) :
Math.max(0, colOffsets[colEnd] - colOffsets[colStart] - left - right);
const expectedHeight =
top == "auto" || bottom == "auto" ? 25 * (orthogonal ? 2 : 1) :
Math.max(0, rowOffsets[rowEnd] - rowOffsets[rowStart] - top - bottom);
const offsetX =
left != "auto" ? colOffsets[colStart] + left :
right != "auto" ? colOffsets[colEnd] - right - expectedWidth :
colOffsets[i] + 25*2;
const offsetY =
top != "auto" ? rowOffsets[rowStart] + top :
bottom != "auto" ? rowOffsets[rowEnd] - bottom - expectedHeight :
rowOffsets[i] + 25;
Object.assign(absPos.dataset, {expectedWidth, expectedHeight, offsetX, offsetY});
}
document.body.appendChild(grid);
}
checkLayout(".grid");
}

View file

@ -0,0 +1,7 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<p>The word 'PASS' should be seen below, inside a blue square.</p>
<div style="font-size:50px; width:225px; height:225px; line-height:60px; color:white; background:blue;">
<div style="height:165px;"></div>
PASS
</div>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#spanning-columns">
<link rel="match" href="float-with-line-after-spanner-ref.html">
<p>The word 'PASS' should be seen below, inside a blue square.</p>
<div style="columns:1; font-size:50px; width:225px; line-height:60px; color:white; background:blue;">
<div style="float:left; padding-top:165px;">PASS</div>
<div style="height:65px;"></div>
<div style="column-span:all;"></div>
<div></div>
</div>

View file

@ -15,6 +15,7 @@ body {
.positioned { .positioned {
position: relative; position: relative;
top: 100px; top: 100px;
will-change: transform;
} }
.spacer { .spacer {

View file

@ -18,6 +18,7 @@ body {
.sticky { .sticky {
position: sticky; position: sticky;
top: 0; top: 0;
will-change: transform;
} }
.spacer { .spacer {

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-sizes">
<p>There should be a green square below, and no red.</p>
<div id="container" style="height:200px;">
<div style="height:100%;" data-expected-height="100">
<div style="float:left; height:100%; background:red;" data-expected-width="100" data-expected-height="100">
<!-- The image is a 1x1 transparent one. -->
<img style="display:block; height:100%; background:green;" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-expected-width="100" data-expected-height="100">
</div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<script>
test(()=> {
document.body.offsetTop;
document.getElementById("container").style.height = "100px";
checkLayout("#container");
}, "Changing height should affect the descendant widths, due to aspect ratio");
</script>

View file

@ -0,0 +1,13 @@
<!doctype html>
<title>CSS Test Reference</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<style>
html, body { margin: 0 }
#box {
width: 100px;
height: 100px;
background: green;
}
</style>
<div id="box"></div>

View file

@ -0,0 +1,24 @@
<!doctype html>
<title>CSS Test: nested preserve-3d and perspective without transformed items</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#perspective">
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#transform-style-property">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1505222">
<link rel="match" href="preserve3d-nested-perspective-ref.html">
<style>
html, body { margin: 0 }
#box {
width: 100px;
height: 100px;
background: green;
}
</style>
<!-- Since we don't specify any transform, this should render just a 100x100px red box -->
<div style="perspective: 1200px">
<div style="transform-style: preserve-3d">
<div style="transform-style: flat">
<div id="box" style="transform-style: preserve-3d"></div>
</div>
</div>
</div>

View file

@ -10,7 +10,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<style id="style"></style> <style id="style"></style>
</head> </head>
<body onload="run()"> <body>
<div id=log></div> <div id=log></div>
<div id="test"></div> <div id="test"></div>
<script> <script>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Selectors Invalidation: insert sibling</title>
<link rel="help" href="https://drafts.csswg.org/selectors-4/#adjacent-sibling-combinators">
<meta name="assert" content="This tests that the + next-sibling selector is effective">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.c { background-color: blue; }
.a + * + .c { background-color: green; }
</style>
</head>
<body>
<div>
<div id="first" class="a"></div>
<div></div>
<div id="target" class="c"></div>
</div>
<script>
'use strict';
const green = 'rgb(0, 128, 0)';
const blue = 'rgb(0, 0, 255)';
test(function() {
const first = document.getElementById('first');
const target = document.getElementById('target');
const parent = first.parentElement;
assert_equals(getComputedStyle(target).backgroundColor, green, "initial color");
parent.removeChild(first);
assert_equals(getComputedStyle(target).backgroundColor, blue, "color after removal");
parent.insertBefore(first, parent.firstChild);
assert_equals(getComputedStyle(target).backgroundColor, green, "color after insert")
}, "Remove/Insert earlier sibling");
</script>
</body>
</html>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Selectors Invalidation: insert adjacent sibling of parent</title>
<link rel="help" href="https://drafts.csswg.org/selectors-4/#adjacent-sibling-combinators">
<meta name="assert" content="This tests that the + next-sibling selector is effective">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.d { background-color: blue; }
.a + .c > .d { background-color: green; }
</style>
</head>
<body>
<div>
<div id="first" class="a"></div>
<div class="c">
<div id="target" class="d"></div>
</div>
</div>
<script>
'use strict';
const green = 'rgb(0, 128, 0)';
const blue = 'rgb(0, 0, 255)';
test(function() {
const first = document.getElementById('first');
const target = document.getElementById('target');
const parent = first.parentElement;
assert_equals(getComputedStyle(target).backgroundColor, green, "initial color");
parent.removeChild(first);
assert_equals(getComputedStyle(target).backgroundColor, blue, "color after removal");
parent.insertBefore(first, parent.firstChild);
assert_equals(getComputedStyle(target).backgroundColor, green, "color after insert")
}, "Remove/Insert adjacent sibling of parent");
</script>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Selectors Invalidation: insert sibling of ancestor</title>
<link rel="help" href="https://drafts.csswg.org/selectors-4/#adjacent-sibling-combinators">
<meta name="assert" content="This tests that the + next-sibling selector is effective">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.c * { background-color: blue; }
.a + * + .c * { background-color: green; }
</style>
</head>
<body>
<div>
<div id="first" class="a"></div>
<div></div>
<div class="c">
<div>
<div id="target"></div>
</div>
</div>
</div>
<script>
'use strict';
const green = 'rgb(0, 128, 0)';
const blue = 'rgb(0, 0, 255)';
test(function() {
const first = document.getElementById('first');
const target = document.getElementById('target');
const parent = first.parentElement;
assert_equals(getComputedStyle(target).backgroundColor, green, "initial color");
parent.removeChild(first);
assert_equals(getComputedStyle(target).backgroundColor, blue, "color after removal");
parent.insertBefore(first, parent.firstChild);
assert_equals(getComputedStyle(target).backgroundColor, green, "color after insert")
}, "Remove/Insert earlier sibling of ancestor");
</script>
</body>
</html>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Selectors Invalidation: insert sibling of parent</title>
<link rel="help" href="https://drafts.csswg.org/selectors-4/#general-sibling-combinators">
<meta name="assert" content="This tests that the ~ subsequent-sibling selector is effective">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
span { background-color: blue; }
.a ~ .c > span { background-color: green; }
</style>
</head>
<body>
<div>
<div id="first" class="a"></div>
<div></div>
<div></div>
<div class="c">
<span id="target"></span>
</div>
</div>
<script>
'use strict';
const green = 'rgb(0, 128, 0)';
const blue = 'rgb(0, 0, 255)';
test(function() {
const first = document.getElementById('first');
const target = document.getElementById('target');
const parent = first.parentElement;
assert_equals(getComputedStyle(target).backgroundColor, green, "initial color");
parent.removeChild(first);
assert_equals(getComputedStyle(target).backgroundColor, blue, "color after removal");
parent.insertBefore(first, parent.firstChild);
assert_equals(getComputedStyle(target).backgroundColor, green, "color after insert")
}, "Remove/Insert earlier sibling of parent");
</script>
</body>
</html>

View file

@ -1,13 +0,0 @@
<!doctype html>
<meta charset=utf-8>
<title>Make sure browsers throw when getting .length on some random object whose proto is an HTMLCollection</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
test(function() {
var obj = Object.create(document.getElementsByTagName("script"));
assert_throws(new TypeError(), function() {
obj.length;
});
}, "HTMLcollection as a prototype should not allow getting .length on the base object")
</script>

View file

@ -0,0 +1,29 @@
<!doctype html>
<meta charset=utf-8>
<title>Objects whose prototype is an HTMLCollection</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
var obj = Object.create(document.getElementsByTagName("script"));
assert_throws(new TypeError(), function() {
obj.length;
});
}, "HTMLCollection as a prototype should not allow getting .length on the base object")
test(function() {
var element = document.createElement("p");
element.id = "named";
document.body.appendChild(element);
this.add_cleanup(function() { element.remove() });
var collection = document.getElementsByTagName("p");
assert_equals(collection.named, element);
var object = Object.create(collection);
assert_equals(object.named, element);
object.named = "foo";
assert_equals(object.named, "foo");
assert_equals(collection.named, element);
}, "HTMLCollection as a prototype and setting own properties")
</script>

View file

@ -1,3 +1,3 @@
def main(request, response): def main(request, response):
response.headers.set("Content-Type", "text/plain;charset=" + request.GET.first("label")) response.headers.set("Content-Type", "text/plain;charset=" + request.GET.first("label"))
response.content = "".join(chr(byte) for byte in xrange(255)) response.content = "".join(chr(byte) for byte in range(255))

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
<body>
<img src="image.bmp">
<script>
var check_report_format = (reports, observer) => {
let report = reports[0];
assert_equals(report.type, "feature-policy-violation");
assert_equals(report.url, document.location.href);
assert_equals(report.body.featureId, "legacy-image-formats");
assert_equals(report.body.disposition, "enforce");
};
async_test(t => {
new ReportingObserver(t.step_func_done(check_report_format),
{types: ['feature-policy-violation'], buffered: true}).observe();
}, "Unsized-media Report Format");
</script>
</body>
</html>

View file

@ -0,0 +1 @@
Feature-Policy: legacy-image-formats 'none'

View file

@ -6,6 +6,7 @@
[Exposed=Window] [Exposed=Window]
interface CSSPseudoElement { interface CSSPseudoElement {
readonly attribute CSSOMString type; readonly attribute CSSOMString type;
readonly attribute Element element;
readonly attribute CSSStyleDeclaration style; readonly attribute CSSStyleDeclaration style;
}; };

View file

@ -18,7 +18,7 @@ partial interface Document {
[NewObject] Promise<void> exitPictureInPicture(); [NewObject] Promise<void> exitPictureInPicture();
}; };
partial interface DocumentOrShadowRoot { partial interface mixin DocumentOrShadowRoot {
readonly attribute Element? pictureInPictureElement; readonly attribute Element? pictureInPictureElement;
}; };

View file

@ -13,7 +13,7 @@ partial interface Document {
void exitPointerLock(); void exitPointerLock();
}; };
partial interface DocumentOrShadowRoot { partial interface mixin DocumentOrShadowRoot {
readonly attribute Element? pointerLockElement; readonly attribute Element? pointerLockElement;
}; };

View file

@ -23,7 +23,7 @@ dictionary RequestDeviceOptions {
boolean acceptAllDevices = false; boolean acceptAllDevices = false;
}; };
[SecureContext] [Exposed=Window, SecureContext]
interface Bluetooth : EventTarget { interface Bluetooth : EventTarget {
Promise<boolean> getAvailability(); Promise<boolean> getAvailability();
attribute EventHandler onavailabilitychanged; attribute EventHandler onavailabilitychanged;
@ -31,9 +31,9 @@ interface Bluetooth : EventTarget {
readonly attribute BluetoothDevice? referringDevice; readonly attribute BluetoothDevice? referringDevice;
Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options); Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options);
}; };
Bluetooth implements BluetoothDeviceEventHandlers; Bluetooth includes BluetoothDeviceEventHandlers;
Bluetooth implements CharacteristicEventHandlers; Bluetooth includes CharacteristicEventHandlers;
Bluetooth implements ServiceEventHandlers; Bluetooth includes ServiceEventHandlers;
dictionary BluetoothPermissionDescriptor : PermissionDescriptor { dictionary BluetoothPermissionDescriptor : PermissionDescriptor {
DOMString deviceId; DOMString deviceId;
@ -53,11 +53,13 @@ dictionary BluetoothPermissionData {
required sequence<AllowedBluetoothDevice> allowedDevices; required sequence<AllowedBluetoothDevice> allowedDevices;
}; };
[Exposed=Window]
interface BluetoothPermissionResult : PermissionStatus { interface BluetoothPermissionResult : PermissionStatus {
attribute FrozenArray<BluetoothDevice> devices; attribute FrozenArray<BluetoothDevice> devices;
}; };
[ [
Exposed=Window,
Constructor(DOMString type, optional ValueEventInit initDict), Constructor(DOMString type, optional ValueEventInit initDict),
SecureContext SecureContext
] ]
@ -69,8 +71,8 @@ dictionary ValueEventInit : EventInit {
any value = null; any value = null;
}; };
[SecureContext] [Exposed=Window, SecureContext]
interface BluetoothDevice { interface BluetoothDevice : EventTarget {
readonly attribute DOMString id; readonly attribute DOMString id;
readonly attribute DOMString? name; readonly attribute DOMString? name;
readonly attribute BluetoothRemoteGATTServer? gatt; readonly attribute BluetoothRemoteGATTServer? gatt;
@ -79,20 +81,20 @@ interface BluetoothDevice {
void unwatchAdvertisements(); void unwatchAdvertisements();
readonly attribute boolean watchingAdvertisements; readonly attribute boolean watchingAdvertisements;
}; };
BluetoothDevice implements EventTarget; BluetoothDevice includes BluetoothDeviceEventHandlers;
BluetoothDevice implements BluetoothDeviceEventHandlers; BluetoothDevice includes CharacteristicEventHandlers;
BluetoothDevice implements CharacteristicEventHandlers; BluetoothDevice includes ServiceEventHandlers;
BluetoothDevice implements ServiceEventHandlers;
[SecureContext] [Exposed=Window, SecureContext]
interface BluetoothManufacturerDataMap { interface BluetoothManufacturerDataMap {
readonly maplike<unsigned short, DataView>; readonly maplike<unsigned short, DataView>;
}; };
[SecureContext] [Exposed=Window, SecureContext]
interface BluetoothServiceDataMap { interface BluetoothServiceDataMap {
readonly maplike<UUID, DataView>; readonly maplike<UUID, DataView>;
}; };
[ [
Exposed=Window,
Constructor(DOMString type, BluetoothAdvertisingEventInit init), Constructor(DOMString type, BluetoothAdvertisingEventInit init),
SecureContext SecureContext
] ]
@ -116,11 +118,11 @@ dictionary BluetoothAdvertisingEventInit : EventInit {
unsigned short appearance; unsigned short appearance;
byte txPower; byte txPower;
byte rssi; byte rssi;
Map manufacturerData; BluetoothManufacturerDataMap manufacturerData;
Map serviceData; BluetoothServiceDataMap serviceData;
}; };
[SecureContext] [Exposed=Window, SecureContext]
interface BluetoothRemoteGATTServer { interface BluetoothRemoteGATTServer {
[SameObject] [SameObject]
readonly attribute BluetoothDevice device; readonly attribute BluetoothDevice device;
@ -132,8 +134,8 @@ interface BluetoothRemoteGATTServer {
getPrimaryServices(optional BluetoothServiceUUID service); getPrimaryServices(optional BluetoothServiceUUID service);
}; };
[SecureContext] [Exposed=Window, SecureContext]
interface BluetoothRemoteGATTService { interface BluetoothRemoteGATTService : EventTarget {
[SameObject] [SameObject]
readonly attribute BluetoothDevice device; readonly attribute BluetoothDevice device;
readonly attribute UUID uuid; readonly attribute UUID uuid;
@ -147,12 +149,11 @@ interface BluetoothRemoteGATTService {
Promise<sequence<BluetoothRemoteGATTService>> Promise<sequence<BluetoothRemoteGATTService>>
getIncludedServices(optional BluetoothServiceUUID service); getIncludedServices(optional BluetoothServiceUUID service);
}; };
BluetoothRemoteGATTService implements EventTarget; BluetoothRemoteGATTService includes CharacteristicEventHandlers;
BluetoothRemoteGATTService implements CharacteristicEventHandlers; BluetoothRemoteGATTService includes ServiceEventHandlers;
BluetoothRemoteGATTService implements ServiceEventHandlers;
[SecureContext] [Exposed=Window, SecureContext]
interface BluetoothRemoteGATTCharacteristic { interface BluetoothRemoteGATTCharacteristic : EventTarget {
[SameObject] [SameObject]
readonly attribute BluetoothRemoteGATTService service; readonly attribute BluetoothRemoteGATTService service;
readonly attribute UUID uuid; readonly attribute UUID uuid;
@ -166,10 +167,9 @@ interface BluetoothRemoteGATTCharacteristic {
Promise<BluetoothRemoteGATTCharacteristic> startNotifications(); Promise<BluetoothRemoteGATTCharacteristic> startNotifications();
Promise<BluetoothRemoteGATTCharacteristic> stopNotifications(); Promise<BluetoothRemoteGATTCharacteristic> stopNotifications();
}; };
BluetoothRemoteGATTCharacteristic implements EventTarget; BluetoothRemoteGATTCharacteristic includes CharacteristicEventHandlers;
BluetoothRemoteGATTCharacteristic implements CharacteristicEventHandlers;
[SecureContext] [Exposed=Window, SecureContext]
interface BluetoothCharacteristicProperties { interface BluetoothCharacteristicProperties {
readonly attribute boolean broadcast; readonly attribute boolean broadcast;
readonly attribute boolean read; readonly attribute boolean read;
@ -182,7 +182,7 @@ interface BluetoothCharacteristicProperties {
readonly attribute boolean writableAuxiliaries; readonly attribute boolean writableAuxiliaries;
}; };
[SecureContext] [Exposed=Window, SecureContext]
interface BluetoothRemoteGATTDescriptor { interface BluetoothRemoteGATTDescriptor {
[SameObject] [SameObject]
readonly attribute BluetoothRemoteGATTCharacteristic characteristic; readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
@ -192,24 +192,25 @@ interface BluetoothRemoteGATTDescriptor {
Promise<void> writeValue(BufferSource value); Promise<void> writeValue(BufferSource value);
}; };
[NoInterfaceObject, SecureContext] [SecureContext]
interface CharacteristicEventHandlers { interface mixin CharacteristicEventHandlers {
attribute EventHandler oncharacteristicvaluechanged; attribute EventHandler oncharacteristicvaluechanged;
}; };
[NoInterfaceObject, SecureContext] [SecureContext]
interface BluetoothDeviceEventHandlers { interface mixin BluetoothDeviceEventHandlers {
attribute EventHandler ongattserverdisconnected; attribute EventHandler ongattserverdisconnected;
}; };
[NoInterfaceObject, SecureContext] [SecureContext]
interface ServiceEventHandlers { interface mixin ServiceEventHandlers {
attribute EventHandler onserviceadded; attribute EventHandler onserviceadded;
attribute EventHandler onservicechanged; attribute EventHandler onservicechanged;
attribute EventHandler onserviceremoved; attribute EventHandler onserviceremoved;
}; };
typedef DOMString UUID; typedef DOMString UUID;
[Exposed=Window]
interface BluetoothUUID { interface BluetoothUUID {
static UUID getService((DOMString or unsigned long) name); static UUID getService((DOMString or unsigned long) name);
static UUID getCharacteristic((DOMString or unsigned long) name); static UUID getCharacteristic((DOMString or unsigned long) name);

View file

@ -294,6 +294,7 @@ GENERATE_TESTS: shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/w
SET TIMEOUT: css/css-fonts/font-display/font-display.html SET TIMEOUT: css/css-fonts/font-display/font-display.html
SET TIMEOUT: css/css-fonts/font-display/font-display-change.html SET TIMEOUT: css/css-fonts/font-display/font-display-change.html
SET TIMEOUT: css/css-fonts/font-display/font-display-change-ref.html SET TIMEOUT: css/css-fonts/font-display/font-display-change-ref.html
SET TIMEOUT: css/css-fonts/font-display/font-display-feature-policy.tentative.html
SET TIMEOUT: css/css-fonts/font-display/font-display-preload.html SET TIMEOUT: css/css-fonts/font-display/font-display-preload.html
SET TIMEOUT: html/browsers/windows/auxiliary-browsing-contexts/resources/close-opener.html SET TIMEOUT: html/browsers/windows/auxiliary-browsing-contexts/resources/close-opener.html
SET TIMEOUT: html/dom/documents/dom-tree-accessors/Document.currentScript.html SET TIMEOUT: html/dom/documents/dom-tree-accessors/Document.currentScript.html

View file

@ -8,6 +8,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script type="text/javascript" src="pointerevent_support.js"></script> <script type="text/javascript" src="pointerevent_support.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var detected_pointertypes = {}; var detected_pointertypes = {};
@ -42,7 +45,7 @@
detected_pointertypes[event.pointerType] = true; detected_pointertypes[event.pointerType] = true;
event_log.push(event.type + '@' + event.target.id); event_log.push(event.type + '@' + event.target.id);
if (event.type == 'lostpointercapture') { if (event.type == 'lostpointercapture') {
setTimeout(function() { step_timeout(function() {
test_pointer_event.step(function () { test_pointer_event.step(function () {
var expected_events = "pointerup, lostpointercapture, pointerout, pointerleave"; var expected_events = "pointerup, lostpointercapture, pointerout, pointerleave";
assert_equals(event_log.join(", "), "pointerout@target, pointerleave@target, pointerover@capture-target, pointerenter@capture-target, gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointerout@capture-target, pointerleave@capture-target, pointerover@target, pointerenter@target"); assert_equals(event_log.join(", "), "pointerout@target, pointerleave@target, pointerover@capture-target, pointerenter@capture-target, gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointerout@capture-target, pointerleave@capture-target, pointerover@target, pointerenter@target");
@ -52,6 +55,13 @@
} }
}); });
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target})
.pointerDown()
.pointerUp()
.send();
} }
</script> </script>
<style> <style>

View file

@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script> <script src="pointerevent_support.js"></script>
</head> </head>
<body> <body>
@ -42,6 +45,8 @@
var test_lostpointercapture = async_test("lostpointercapture event received"); var test_lostpointercapture = async_test("lostpointercapture event received");
window.onload = function() { window.onload = function() {
var actions_promise;
on_event(captureButton, 'pointerdown', function(event) { on_event(captureButton, 'pointerdown', function(event) {
detected_pointertypes[event.pointerType] = true; detected_pointertypes[event.pointerType] = true;
target0.setPointerCapture(event.pointerId); target0.setPointerCapture(event.pointerId);
@ -67,8 +72,21 @@
// TA: 11.3 // TA: 11.3
assert_true(isDisconnected, "lostpointercapture must be fired on the document"); assert_true(isDisconnected, "lostpointercapture must be fired on the document");
}, "lostpointercapture is dispatched on the document"); }, "lostpointercapture is dispatched on the document");
test_lostpointercapture.done();
actions_promise.then( () => {
test_lostpointercapture.done();
});
}); });
// Inject mouse inputs.
actions_promise = new test_driver.Actions()
.pointerMove(0, 0, {origin: captureButton})
.pointerDown()
.pointerMove(2, 0, {origin: captureButton})
.pointerMove(5, 0, {origin: captureButton})
.pointerMove(8, 0, {origin: captureButton})
.pointerMove(10, 0, {origin: captureButton})
.send();
} }
</script> </script>
<h1>Pointer Events Capture Test</h1> <h1>Pointer Events Capture Test</h1>

View file

@ -7,6 +7,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script> <script src="pointerevent_support.js"></script>
</head> </head>
<body onload="run()"> <body onload="run()">
@ -123,6 +126,15 @@
} }
}); });
} }
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: captureButton})
.pointerDown()
.pointerMove(2, 0, {origin: captureButton})
.pointerMove(5, 0, {origin: captureButton})
.pointerUp()
.send();
} }
</script> </script>
<h1>Pointer Events Capture Test</h1> <h1>Pointer Events Capture Test</h1>

View file

@ -9,6 +9,9 @@
<!-- /resources/testharness.js --> <!-- /resources/testharness.js -->
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<!-- Additional helper script for common checks across event types --> <!-- Additional helper script for common checks across event types -->
<script type="text/javascript" src="pointerevent_support.js"></script> <script type="text/javascript" src="pointerevent_support.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@ -48,6 +51,14 @@
assert_equals(event.target.id, "parent0", "Recieved " + event.type + " in parent for " + event.target.id); assert_equals(event.target.id, "parent0", "Recieved " + event.type + " in parent for " + event.target.id);
}); });
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerMove(-10, -10, {origin: target0})
.pointerMove(-20, -20, {origin: target0})
.pointerMove(0, 0)
.send();
} }
</script> </script>

View file

@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script> <script src="pointerevent_support.js"></script>
</head> </head>
<body onload="run()"> <body onload="run()">
@ -49,6 +52,14 @@
eventTested = true; eventTested = true;
} }
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerMove(0, 0, {origin: target1})
.pointerDown()
.pointerUp()
.send();
} }
</script> </script>
<h1>Pointer Events pointerleave tests</h1> <h1>Pointer Events pointerleave tests</h1>

View file

@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script> <script src="pointerevent_support.js"></script>
</head> </head>
<body onload="run()"> <body onload="run()">
@ -26,6 +29,7 @@
function run() { function run() {
var target0 = document.getElementById("target0"); var target0 = document.getElementById("target0");
var target1 = document.querySelector("#target0 > div");
var test_pointerleave = async_test("pointerleave event received"); var test_pointerleave = async_test("pointerleave event received");
on_event(target0, "pointerover", function(event) { on_event(target0, "pointerover", function(event) {
@ -40,6 +44,13 @@
eventTested = true; eventTested = true;
} }
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerMove(0, 0, {origin: target1})
.pointerMove(0, 0)
.send();
} }
</script> </script>
<h1>Pointer Events pointerleave tests</h1> <h1>Pointer Events pointerleave tests</h1>

View file

@ -9,6 +9,9 @@
<!-- /resources/testharness.js --> <!-- /resources/testharness.js -->
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<!-- Additional helper script for common checks across event types --> <!-- Additional helper script for common checks across event types -->
<script type="text/javascript" src="pointerevent_support.js"></script> <script type="text/javascript" src="pointerevent_support.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@ -38,6 +41,12 @@
}); });
test_pointerEvent.done(); // complete test test_pointerEvent.done(); // complete test
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerMove(0, 0)
.send();
} }
</script> </script>
<style> <style>

View file

@ -6,6 +6,9 @@
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script> <script src="pointerevent_support.js"></script>
</head> </head>
<body onload="run()"> <body onload="run()">
@ -39,13 +42,19 @@
on_event(target0, "pointerout", function (event) { on_event(target0, "pointerout", function (event) {
pointeroutCounter++; pointeroutCounter++;
setTimeout(function() { step_timeout(function() {
test(function() { test(function() {
assert_true(pointeroutCounter == 1, "pointerout received just once") assert_true(pointeroutCounter == 1, "pointerout received just once")
}, "pointerout received just once"); }, "pointerout received just once");
done(); done();
}, 5000); }, 5000);
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerMove(0, 0)
.send();
} }
</script> </script>
<h1>Pointer Events pointerout received once test</h1> <h1>Pointer Events pointerout received once test</h1>

View file

@ -11,6 +11,9 @@
<!-- /resources/testharness.js --> <!-- /resources/testharness.js -->
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<!-- Additional helper script for common checks across event types --> <!-- Additional helper script for common checks across event types -->
<script type="text/javascript" src="pointerevent_support.js"></script> <script type="text/javascript" src="pointerevent_support.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@ -45,6 +48,14 @@
detected_pointertypes[event.pointerType] = true; detected_pointertypes[event.pointerType] = true;
listener.setPointerCapture(event.pointerId); listener.setPointerCapture(event.pointerId);
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerDown()
.pointerMove(10, 0, {origin: target0})
.pointerUp()
.send();
} }
</script> </script>
</head> </head>

View file

@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script> <script src="pointerevent_support.js"></script>
</head> </head>
<body> <body>
@ -72,6 +75,14 @@
event_log.push('pointerup@target0'); event_log.push('pointerup@target0');
pointerupGot = true; pointerupGot = true;
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: captureButton})
.pointerDown()
.pointerMove(10, 0, {origin: target0})
.pointerUp()
.send();
} }
</script> </script>
<h1>Pointer Events Capture Test</h1> <h1>Pointer Events Capture Test</h1>

View file

@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script> <script src="pointerevent_support.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var detected_pointertypes = {}; var detected_pointertypes = {};
@ -34,6 +37,13 @@
} }
test_setPointerCapture.done(); test_setPointerCapture.done();
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerDown()
.pointerUp()
.send();
} }
</script> </script>
</head> </head>

View file

@ -10,6 +10,9 @@
<!-- /resources/testharness.js --> <!-- /resources/testharness.js -->
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<!-- Additional helper script for common checks across event types --> <!-- Additional helper script for common checks across event types -->
<script type="text/javascript" src="pointerevent_support.js"></script> <script type="text/javascript" src="pointerevent_support.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@ -35,6 +38,13 @@
}); });
test_pointerEvent.done(); // complete test test_pointerEvent.done(); // complete test
}); });
// Inject mouse inputs.
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerDown()
.pointerUp()
.send();
} }
</script> </script>
</head> </head>

View file

@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script> <script src="pointerevent_support.js"></script>
</head> </head>
<body> <body>
@ -70,6 +73,8 @@
} }
function run() { function run() {
var actions_promise;
// After invoking the setPointerCapture method on an element, subsequent pointer events for the specified pointer must be targeted at that element // After invoking the setPointerCapture method on an element, subsequent pointer events for the specified pointer must be targeted at that element
// and boundary events should be sent accordingly and relatedTarget should behave normally. // and boundary events should be sent accordingly and relatedTarget should behave normally.
on_event(target0, "pointerover", function (event) { on_event(target0, "pointerover", function (event) {
@ -78,7 +83,10 @@
test(function() { test(function() {
assert_not_equals(event.relatedTarget, null, "relatedTarget should not be null even when the capture is set") assert_not_equals(event.relatedTarget, null, "relatedTarget should not be null even when the capture is set")
}, "relatedTarget should not be null even when the capture is set."); }, "relatedTarget should not be null even when the capture is set.");
done();
actions_promise.then( () => {
done();
});
} }
}); });
@ -92,6 +100,16 @@
event_log.push('pointerover@target1'); event_log.push('pointerover@target1');
} }
}); });
// Inject mouse inputs.
actions_promise = new test_driver.Actions()
.pointerMove(0, 0, {origin: target1})
.pointerMove(0, 0, {origin: captureButton})
.pointerDown()
.pointerMove(0, 0, {origin: target1})
.pointerMove(0, 0, {origin: target0})
.pointerUp()
.send();
} }
</script> </script>
<h1>Pointer Events Capture Test</h1> <h1>Pointer Events Capture Test</h1>

View file

@ -8,6 +8,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script type="text/javascript" src="pointerevent_support.js"></script> <script type="text/javascript" src="pointerevent_support.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var test_pointerEvent = async_test("Suppress compat mouse events on click"); var test_pointerEvent = async_test("Suppress compat mouse events on click");
@ -60,6 +63,22 @@
}); });
}); });
}); });
// Inject mouse inputs.
var target0 = document.getElementById('target0');
var target1 = document.getElementById('target1');
var targetDone = document.getElementById('done');
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerDown()
.pointerUp()
.pointerMove(0, 0, {origin: target1})
.pointerDown()
.pointerUp()
.pointerMove(0, 0, {origin: targetDone})
.pointerDown()
.pointerUp()
.send();
} }
</script> </script>
<style> <style>

View file

@ -8,6 +8,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script type="text/javascript" src="pointerevent_support.js"></script> <script type="text/javascript" src="pointerevent_support.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var test_pointerEvent = async_test("Suppress compat mouse events on drag"); var test_pointerEvent = async_test("Suppress compat mouse events on drag");
@ -82,6 +85,24 @@
}); });
}); });
}); });
// Inject mouse inputs.
var target0 = document.getElementById('target0');
var target1 = document.getElementById('target1');
var targetDone = document.getElementById('done');
new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerDown()
.pointerMove(10, 0, {origin: target0})
.pointerUp()
.pointerMove(0, 0, {origin: target1})
.pointerDown()
.pointerMove(10, 0, {origin: target1})
.pointerUp()
.pointerMove(0, 0, {origin: targetDone})
.pointerDown()
.pointerUp()
.send();
} }
</script> </script>
<style> <style>

View file

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
sxg_version=1b3
certfile=127.0.0.1.sxg.pem certfile=127.0.0.1.sxg.pem
keyfile=127.0.0.1.sxg.key keyfile=127.0.0.1.sxg.key
inner_url_origin=https://127.0.0.1:8444 inner_url_origin=https://127.0.0.1:8444
@ -25,7 +25,7 @@ gen-certurl -pem $certfile -ocsp $tmpdir/ocsp > $certfile.cbor
# A valid Signed Exchange. # A valid Signed Exchange.
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \ -uri $inner_url_origin/signed-exchange/resources/inner-url.html \
-status 200 \ -status 200 \
-content sxg-location.html \ -content sxg-location.html \
@ -40,7 +40,7 @@ gen-signedexchange \
# For check-cert-request.tentative.html # For check-cert-request.tentative.html
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \ -uri $inner_url_origin/signed-exchange/resources/inner-url.html \
-status 200 \ -status 200 \
-content sxg-location.html \ -content sxg-location.html \
@ -53,25 +53,9 @@ gen-signedexchange \
-o sxg/check-cert-request.sxg \ -o sxg/check-cert-request.sxg \
-miRecordSize 100 -miRecordSize 100
# Request method is HEAD.
gen-signedexchange \
-version 1b2 \
-method HEAD \
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \
-status 200 \
-content sxg-location.html \
-certificate $certfile \
-certUrl $cert_url_origin/signed-exchange/resources/$certfile.cbor \
-validityUrl $inner_url_origin/signed-exchange/resources/resource.validity.msg \
-privateKey $keyfile \
-date 2018-04-01T00:00:00Z \
-expire 168h \
-o sxg/sxg-head-request.sxg \
-miRecordSize 100
# validityUrl is different origin from request URL. # validityUrl is different origin from request URL.
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \ -uri $inner_url_origin/signed-exchange/resources/inner-url.html \
-status 200 \ -status 200 \
-content failure.html \ -content failure.html \
@ -86,7 +70,7 @@ gen-signedexchange \
# certUrl is 404 and fallback URL is another signed exchange. # certUrl is 404 and fallback URL is another signed exchange.
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-uri $inner_url_origin/signed-exchange/resources/sxg/sxg-location.sxg \ -uri $inner_url_origin/signed-exchange/resources/sxg/sxg-location.sxg \
-status 200 \ -status 200 \
-content failure.html \ -content failure.html \
@ -101,7 +85,7 @@ gen-signedexchange \
# Nested signed exchange. # Nested signed exchange.
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-uri "$inner_url_origin/signed-exchange/resources/inner-url.html?fallback-from-nested-sxg" \ -uri "$inner_url_origin/signed-exchange/resources/inner-url.html?fallback-from-nested-sxg" \
-status 200 \ -status 200 \
-content sxg/sxg-location.sxg \ -content sxg/sxg-location.sxg \
@ -117,7 +101,7 @@ gen-signedexchange \
# Fallback URL has non-ASCII UTF-8 characters. # Fallback URL has non-ASCII UTF-8 characters.
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-ignoreErrors \ -ignoreErrors \
-uri "$inner_url_origin/signed-exchange/resources/🌐📦.html" \ -uri "$inner_url_origin/signed-exchange/resources/🌐📦.html" \
-status 200 \ -status 200 \
@ -133,7 +117,7 @@ gen-signedexchange \
# Fallback URL has invalid UTF-8 sequence. # Fallback URL has invalid UTF-8 sequence.
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-ignoreErrors \ -ignoreErrors \
-uri "$inner_url_origin/signed-exchange/resources/$(echo -e '\xce\xce\xa9').html" \ -uri "$inner_url_origin/signed-exchange/resources/$(echo -e '\xce\xce\xa9').html" \
-status 200 \ -status 200 \
@ -149,7 +133,7 @@ gen-signedexchange \
# Fallback URL has UTF-8 BOM. # Fallback URL has UTF-8 BOM.
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-ignoreErrors \ -ignoreErrors \
-uri "$(echo -e '\xef\xbb\xbf')$inner_url_origin/signed-exchange/resources/inner-url.html" \ -uri "$(echo -e '\xef\xbb\xbf')$inner_url_origin/signed-exchange/resources/inner-url.html" \
-status 200 \ -status 200 \
@ -165,7 +149,7 @@ gen-signedexchange \
# Response has Cache-Control: no-store header. # Response has Cache-Control: no-store header.
gen-signedexchange \ gen-signedexchange \
-version 1b2 \ -version $sxg_version \
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \ -uri $inner_url_origin/signed-exchange/resources/inner-url.html \
-status 200 \ -status 200 \
-responseHeader "Cache-Control: no-store" \ -responseHeader "Cache-Control: no-store" \
@ -179,4 +163,21 @@ gen-signedexchange \
-o sxg/sxg-noncacheable.sxg \ -o sxg/sxg-noncacheable.sxg \
-miRecordSize 100 -miRecordSize 100
# Response has a strict-transport-security header.
gen-signedexchange \
-version $sxg_version \
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \
-status 200 \
-responseHeader "Strict-Transport-Security: max-age=31536000" \
-content sxg-location.html \
-certificate $certfile \
-certUrl $cert_url_origin/signed-exchange/resources/$certfile.cbor \
-validityUrl $inner_url_origin/signed-exchange/resources/resource.validity.msg \
-privateKey $keyfile \
-date 2018-04-01T00:00:00Z \
-expire 168h \
-o sxg/sxg-hsts.sxg \
-miRecordSize 100 \
-ignoreErrors true
rm -fr $tmpdir rm -fr $tmpdir

View file

@ -1,2 +1,2 @@
Content-Type: application/signed-exchange;v=b2 Content-Type: application/signed-exchange;v=b3
X-Content-Type-Options: nosniff X-Content-Type-Options: nosniff

Some files were not shown because too many files have changed in this diff Show more