mirror of
https://github.com/servo/servo.git
synced 2025-09-04 20:18:21 +01:00
Update web-platform-tests to revision bd951736b4d7dbfd862dfa0f27271b544e35ca30
This commit is contained in:
parent
461bce1241
commit
74f3bef690
110 changed files with 2556 additions and 363 deletions
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -0,0 +1 @@
|
|||
Feature-Policy: font-display-late-swap 'none';
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
|
@ -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");
|
||||
}
|
|
@ -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>
|
|
@ -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>
|
|
@ -15,6 +15,7 @@ body {
|
|||
.positioned {
|
||||
position: relative;
|
||||
top: 100px;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
|
|
|
@ -18,6 +18,7 @@ body {
|
|||
.sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -10,7 +10,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style id="style"></style>
|
||||
</head>
|
||||
<body onload="run()">
|
||||
<body>
|
||||
<div id=log></div>
|
||||
<div id="test"></div>
|
||||
<script>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -1,3 +1,3 @@
|
|||
def main(request, response):
|
||||
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))
|
||||
|
|
BIN
tests/wpt/web-platform-tests/feature-policy/reporting/image.bmp
Normal file
BIN
tests/wpt/web-platform-tests/feature-policy/reporting/image.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
|
@ -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>
|
|
@ -0,0 +1 @@
|
|||
Feature-Policy: legacy-image-formats 'none'
|
|
@ -6,6 +6,7 @@
|
|||
[Exposed=Window]
|
||||
interface CSSPseudoElement {
|
||||
readonly attribute CSSOMString type;
|
||||
readonly attribute Element element;
|
||||
readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ partial interface Document {
|
|||
[NewObject] Promise<void> exitPictureInPicture();
|
||||
};
|
||||
|
||||
partial interface DocumentOrShadowRoot {
|
||||
partial interface mixin DocumentOrShadowRoot {
|
||||
readonly attribute Element? pictureInPictureElement;
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ partial interface Document {
|
|||
void exitPointerLock();
|
||||
};
|
||||
|
||||
partial interface DocumentOrShadowRoot {
|
||||
partial interface mixin DocumentOrShadowRoot {
|
||||
readonly attribute Element? pointerLockElement;
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ dictionary RequestDeviceOptions {
|
|||
boolean acceptAllDevices = false;
|
||||
};
|
||||
|
||||
[SecureContext]
|
||||
[Exposed=Window, SecureContext]
|
||||
interface Bluetooth : EventTarget {
|
||||
Promise<boolean> getAvailability();
|
||||
attribute EventHandler onavailabilitychanged;
|
||||
|
@ -31,9 +31,9 @@ interface Bluetooth : EventTarget {
|
|||
readonly attribute BluetoothDevice? referringDevice;
|
||||
Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options);
|
||||
};
|
||||
Bluetooth implements BluetoothDeviceEventHandlers;
|
||||
Bluetooth implements CharacteristicEventHandlers;
|
||||
Bluetooth implements ServiceEventHandlers;
|
||||
Bluetooth includes BluetoothDeviceEventHandlers;
|
||||
Bluetooth includes CharacteristicEventHandlers;
|
||||
Bluetooth includes ServiceEventHandlers;
|
||||
|
||||
dictionary BluetoothPermissionDescriptor : PermissionDescriptor {
|
||||
DOMString deviceId;
|
||||
|
@ -53,11 +53,13 @@ dictionary BluetoothPermissionData {
|
|||
required sequence<AllowedBluetoothDevice> allowedDevices;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface BluetoothPermissionResult : PermissionStatus {
|
||||
attribute FrozenArray<BluetoothDevice> devices;
|
||||
};
|
||||
|
||||
[
|
||||
Exposed=Window,
|
||||
Constructor(DOMString type, optional ValueEventInit initDict),
|
||||
SecureContext
|
||||
]
|
||||
|
@ -69,8 +71,8 @@ dictionary ValueEventInit : EventInit {
|
|||
any value = null;
|
||||
};
|
||||
|
||||
[SecureContext]
|
||||
interface BluetoothDevice {
|
||||
[Exposed=Window, SecureContext]
|
||||
interface BluetoothDevice : EventTarget {
|
||||
readonly attribute DOMString id;
|
||||
readonly attribute DOMString? name;
|
||||
readonly attribute BluetoothRemoteGATTServer? gatt;
|
||||
|
@ -79,20 +81,20 @@ interface BluetoothDevice {
|
|||
void unwatchAdvertisements();
|
||||
readonly attribute boolean watchingAdvertisements;
|
||||
};
|
||||
BluetoothDevice implements EventTarget;
|
||||
BluetoothDevice implements BluetoothDeviceEventHandlers;
|
||||
BluetoothDevice implements CharacteristicEventHandlers;
|
||||
BluetoothDevice implements ServiceEventHandlers;
|
||||
BluetoothDevice includes BluetoothDeviceEventHandlers;
|
||||
BluetoothDevice includes CharacteristicEventHandlers;
|
||||
BluetoothDevice includes ServiceEventHandlers;
|
||||
|
||||
[SecureContext]
|
||||
[Exposed=Window, SecureContext]
|
||||
interface BluetoothManufacturerDataMap {
|
||||
readonly maplike<unsigned short, DataView>;
|
||||
};
|
||||
[SecureContext]
|
||||
[Exposed=Window, SecureContext]
|
||||
interface BluetoothServiceDataMap {
|
||||
readonly maplike<UUID, DataView>;
|
||||
};
|
||||
[
|
||||
Exposed=Window,
|
||||
Constructor(DOMString type, BluetoothAdvertisingEventInit init),
|
||||
SecureContext
|
||||
]
|
||||
|
@ -116,11 +118,11 @@ dictionary BluetoothAdvertisingEventInit : EventInit {
|
|||
unsigned short appearance;
|
||||
byte txPower;
|
||||
byte rssi;
|
||||
Map manufacturerData;
|
||||
Map serviceData;
|
||||
BluetoothManufacturerDataMap manufacturerData;
|
||||
BluetoothServiceDataMap serviceData;
|
||||
};
|
||||
|
||||
[SecureContext]
|
||||
[Exposed=Window, SecureContext]
|
||||
interface BluetoothRemoteGATTServer {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothDevice device;
|
||||
|
@ -132,8 +134,8 @@ interface BluetoothRemoteGATTServer {
|
|||
getPrimaryServices(optional BluetoothServiceUUID service);
|
||||
};
|
||||
|
||||
[SecureContext]
|
||||
interface BluetoothRemoteGATTService {
|
||||
[Exposed=Window, SecureContext]
|
||||
interface BluetoothRemoteGATTService : EventTarget {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothDevice device;
|
||||
readonly attribute UUID uuid;
|
||||
|
@ -147,12 +149,11 @@ interface BluetoothRemoteGATTService {
|
|||
Promise<sequence<BluetoothRemoteGATTService>>
|
||||
getIncludedServices(optional BluetoothServiceUUID service);
|
||||
};
|
||||
BluetoothRemoteGATTService implements EventTarget;
|
||||
BluetoothRemoteGATTService implements CharacteristicEventHandlers;
|
||||
BluetoothRemoteGATTService implements ServiceEventHandlers;
|
||||
BluetoothRemoteGATTService includes CharacteristicEventHandlers;
|
||||
BluetoothRemoteGATTService includes ServiceEventHandlers;
|
||||
|
||||
[SecureContext]
|
||||
interface BluetoothRemoteGATTCharacteristic {
|
||||
[Exposed=Window, SecureContext]
|
||||
interface BluetoothRemoteGATTCharacteristic : EventTarget {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothRemoteGATTService service;
|
||||
readonly attribute UUID uuid;
|
||||
|
@ -166,10 +167,9 @@ interface BluetoothRemoteGATTCharacteristic {
|
|||
Promise<BluetoothRemoteGATTCharacteristic> startNotifications();
|
||||
Promise<BluetoothRemoteGATTCharacteristic> stopNotifications();
|
||||
};
|
||||
BluetoothRemoteGATTCharacteristic implements EventTarget;
|
||||
BluetoothRemoteGATTCharacteristic implements CharacteristicEventHandlers;
|
||||
BluetoothRemoteGATTCharacteristic includes CharacteristicEventHandlers;
|
||||
|
||||
[SecureContext]
|
||||
[Exposed=Window, SecureContext]
|
||||
interface BluetoothCharacteristicProperties {
|
||||
readonly attribute boolean broadcast;
|
||||
readonly attribute boolean read;
|
||||
|
@ -182,7 +182,7 @@ interface BluetoothCharacteristicProperties {
|
|||
readonly attribute boolean writableAuxiliaries;
|
||||
};
|
||||
|
||||
[SecureContext]
|
||||
[Exposed=Window, SecureContext]
|
||||
interface BluetoothRemoteGATTDescriptor {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
|
||||
|
@ -192,24 +192,25 @@ interface BluetoothRemoteGATTDescriptor {
|
|||
Promise<void> writeValue(BufferSource value);
|
||||
};
|
||||
|
||||
[NoInterfaceObject, SecureContext]
|
||||
interface CharacteristicEventHandlers {
|
||||
[SecureContext]
|
||||
interface mixin CharacteristicEventHandlers {
|
||||
attribute EventHandler oncharacteristicvaluechanged;
|
||||
};
|
||||
|
||||
[NoInterfaceObject, SecureContext]
|
||||
interface BluetoothDeviceEventHandlers {
|
||||
[SecureContext]
|
||||
interface mixin BluetoothDeviceEventHandlers {
|
||||
attribute EventHandler ongattserverdisconnected;
|
||||
};
|
||||
|
||||
[NoInterfaceObject, SecureContext]
|
||||
interface ServiceEventHandlers {
|
||||
[SecureContext]
|
||||
interface mixin ServiceEventHandlers {
|
||||
attribute EventHandler onserviceadded;
|
||||
attribute EventHandler onservicechanged;
|
||||
attribute EventHandler onserviceremoved;
|
||||
};
|
||||
|
||||
typedef DOMString UUID;
|
||||
[Exposed=Window]
|
||||
interface BluetoothUUID {
|
||||
static UUID getService((DOMString or unsigned long) name);
|
||||
static UUID getCharacteristic((DOMString or unsigned long) name);
|
||||
|
|
|
@ -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-change.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: html/browsers/windows/auxiliary-browsing-contexts/resources/close-opener.html
|
||||
SET TIMEOUT: html/dom/documents/dom-tree-accessors/Document.currentScript.html
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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">
|
||||
var detected_pointertypes = {};
|
||||
|
@ -42,7 +45,7 @@
|
|||
detected_pointertypes[event.pointerType] = true;
|
||||
event_log.push(event.type + '@' + event.target.id);
|
||||
if (event.type == 'lostpointercapture') {
|
||||
setTimeout(function() {
|
||||
step_timeout(function() {
|
||||
test_pointer_event.step(function () {
|
||||
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");
|
||||
|
@ -52,6 +55,13 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown()
|
||||
.pointerUp()
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
<style>
|
|
@ -6,6 +6,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -42,6 +45,8 @@
|
|||
var test_lostpointercapture = async_test("lostpointercapture event received");
|
||||
|
||||
window.onload = function() {
|
||||
var actions_promise;
|
||||
|
||||
on_event(captureButton, 'pointerdown', function(event) {
|
||||
detected_pointertypes[event.pointerType] = true;
|
||||
target0.setPointerCapture(event.pointerId);
|
||||
|
@ -67,8 +72,21 @@
|
|||
// TA: 11.3
|
||||
assert_true(isDisconnected, "lostpointercapture must be fired 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>
|
||||
<h1>Pointer Events Capture Test</h1>
|
|
@ -7,6 +7,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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>
|
||||
</head>
|
||||
<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>
|
||||
<h1>Pointer Events Capture Test</h1>
|
|
@ -9,6 +9,9 @@
|
|||
<!-- /resources/testharness.js -->
|
||||
<script src="/resources/testharness.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 -->
|
||||
<script type="text/javascript" src="pointerevent_support.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -48,6 +51,14 @@
|
|||
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>
|
|
@ -6,6 +6,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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>
|
||||
</head>
|
||||
<body onload="run()">
|
||||
|
@ -49,6 +52,14 @@
|
|||
eventTested = true;
|
||||
}
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerMove(0, 0, {origin: target1})
|
||||
.pointerDown()
|
||||
.pointerUp()
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
<h1>Pointer Events pointerleave tests</h1>
|
|
@ -6,6 +6,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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>
|
||||
</head>
|
||||
<body onload="run()">
|
||||
|
@ -26,6 +29,7 @@
|
|||
|
||||
function run() {
|
||||
var target0 = document.getElementById("target0");
|
||||
var target1 = document.querySelector("#target0 > div");
|
||||
var test_pointerleave = async_test("pointerleave event received");
|
||||
|
||||
on_event(target0, "pointerover", function(event) {
|
||||
|
@ -40,6 +44,13 @@
|
|||
eventTested = true;
|
||||
}
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerMove(0, 0, {origin: target1})
|
||||
.pointerMove(0, 0)
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
<h1>Pointer Events pointerleave tests</h1>
|
|
@ -9,6 +9,9 @@
|
|||
<!-- /resources/testharness.js -->
|
||||
<script src="/resources/testharness.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 -->
|
||||
<script type="text/javascript" src="pointerevent_support.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -38,6 +41,12 @@
|
|||
});
|
||||
test_pointerEvent.done(); // complete test
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerMove(0, 0)
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
<style>
|
|
@ -6,6 +6,9 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<script src="/resources/testharness.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>
|
||||
</head>
|
||||
<body onload="run()">
|
||||
|
@ -39,13 +42,19 @@
|
|||
on_event(target0, "pointerout", function (event) {
|
||||
pointeroutCounter++;
|
||||
|
||||
setTimeout(function() {
|
||||
step_timeout(function() {
|
||||
test(function() {
|
||||
assert_true(pointeroutCounter == 1, "pointerout received just once")
|
||||
}, "pointerout received just once");
|
||||
done();
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerMove(0, 0)
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
<h1>Pointer Events pointerout received once test</h1>
|
|
@ -11,6 +11,9 @@
|
|||
<!-- /resources/testharness.js -->
|
||||
<script src="/resources/testharness.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 -->
|
||||
<script type="text/javascript" src="pointerevent_support.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -45,6 +48,14 @@
|
|||
detected_pointertypes[event.pointerType] = true;
|
||||
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>
|
||||
</head>
|
|
@ -6,6 +6,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -72,6 +75,14 @@
|
|||
event_log.push('pointerup@target0');
|
||||
pointerupGot = true;
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: captureButton})
|
||||
.pointerDown()
|
||||
.pointerMove(10, 0, {origin: target0})
|
||||
.pointerUp()
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
<h1>Pointer Events Capture Test</h1>
|
|
@ -6,6 +6,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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 type="text/javascript">
|
||||
var detected_pointertypes = {};
|
||||
|
@ -34,6 +37,13 @@
|
|||
}
|
||||
test_setPointerCapture.done();
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerDown()
|
||||
.pointerUp()
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
</head>
|
|
@ -10,6 +10,9 @@
|
|||
<!-- /resources/testharness.js -->
|
||||
<script src="/resources/testharness.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 -->
|
||||
<script type="text/javascript" src="pointerevent_support.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -35,6 +38,13 @@
|
|||
});
|
||||
test_pointerEvent.done(); // complete test
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerDown()
|
||||
.pointerUp()
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
</head>
|
|
@ -6,6 +6,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -70,6 +73,8 @@
|
|||
}
|
||||
|
||||
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
|
||||
// and boundary events should be sent accordingly and relatedTarget should behave normally.
|
||||
on_event(target0, "pointerover", function (event) {
|
||||
|
@ -78,7 +83,10 @@
|
|||
test(function() {
|
||||
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.");
|
||||
done();
|
||||
|
||||
actions_promise.then( () => {
|
||||
done();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -92,6 +100,16 @@
|
|||
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>
|
||||
<h1>Pointer Events Capture Test</h1>
|
|
@ -8,6 +8,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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">
|
||||
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>
|
||||
<style>
|
|
@ -8,6 +8,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.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">
|
||||
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>
|
||||
<style>
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
sxg_version=1b3
|
||||
certfile=127.0.0.1.sxg.pem
|
||||
keyfile=127.0.0.1.sxg.key
|
||||
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.
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \
|
||||
-status 200 \
|
||||
-content sxg-location.html \
|
||||
|
@ -40,7 +40,7 @@ gen-signedexchange \
|
|||
|
||||
# For check-cert-request.tentative.html
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \
|
||||
-status 200 \
|
||||
-content sxg-location.html \
|
||||
|
@ -53,25 +53,9 @@ gen-signedexchange \
|
|||
-o sxg/check-cert-request.sxg \
|
||||
-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.
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \
|
||||
-status 200 \
|
||||
-content failure.html \
|
||||
|
@ -86,7 +70,7 @@ gen-signedexchange \
|
|||
|
||||
# certUrl is 404 and fallback URL is another signed exchange.
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-uri $inner_url_origin/signed-exchange/resources/sxg/sxg-location.sxg \
|
||||
-status 200 \
|
||||
-content failure.html \
|
||||
|
@ -101,7 +85,7 @@ gen-signedexchange \
|
|||
|
||||
# Nested signed exchange.
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-uri "$inner_url_origin/signed-exchange/resources/inner-url.html?fallback-from-nested-sxg" \
|
||||
-status 200 \
|
||||
-content sxg/sxg-location.sxg \
|
||||
|
@ -117,7 +101,7 @@ gen-signedexchange \
|
|||
|
||||
# Fallback URL has non-ASCII UTF-8 characters.
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-ignoreErrors \
|
||||
-uri "$inner_url_origin/signed-exchange/resources/🌐📦.html" \
|
||||
-status 200 \
|
||||
|
@ -133,7 +117,7 @@ gen-signedexchange \
|
|||
|
||||
# Fallback URL has invalid UTF-8 sequence.
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-ignoreErrors \
|
||||
-uri "$inner_url_origin/signed-exchange/resources/$(echo -e '\xce\xce\xa9').html" \
|
||||
-status 200 \
|
||||
|
@ -149,7 +133,7 @@ gen-signedexchange \
|
|||
|
||||
# Fallback URL has UTF-8 BOM.
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-ignoreErrors \
|
||||
-uri "$(echo -e '\xef\xbb\xbf')$inner_url_origin/signed-exchange/resources/inner-url.html" \
|
||||
-status 200 \
|
||||
|
@ -165,7 +149,7 @@ gen-signedexchange \
|
|||
|
||||
# Response has Cache-Control: no-store header.
|
||||
gen-signedexchange \
|
||||
-version 1b2 \
|
||||
-version $sxg_version \
|
||||
-uri $inner_url_origin/signed-exchange/resources/inner-url.html \
|
||||
-status 200 \
|
||||
-responseHeader "Cache-Control: no-store" \
|
||||
|
@ -179,4 +163,21 @@ gen-signedexchange \
|
|||
-o sxg/sxg-noncacheable.sxg \
|
||||
-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
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Content-Type: application/signed-exchange;v=b2
|
||||
Content-Type: application/signed-exchange;v=b3
|
||||
X-Content-Type-Options: nosniff
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Loading SignedHTTPExchange with HEAD request method must fail</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="./resources/sxg-util.js"></script>
|
||||
<body>
|
||||
<script>
|
||||
promise_test(async (t) => {
|
||||
const sxgUrl = get_host_info().HTTPS_ORIGIN + '/signed-exchange/resources/sxg/sxg-head-request.sxg';
|
||||
const message = await openSXGInIframeAndWaitForMessage(t, sxgUrl);
|
||||
assert_equals(message.location, innerURLOrigin() + '/signed-exchange/resources/inner-url.html');
|
||||
assert_true(message.is_fallback);
|
||||
}, 'Loading SignedHTTPExchange with HEAD request method must fail');
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Loading SignedHTTPExchange with strict-transport-security must fail</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="./resources/sxg-util.js"></script>
|
||||
<body>
|
||||
<script>
|
||||
promise_test(async (t) => {
|
||||
const sxgUrl = get_host_info().HTTPS_ORIGIN +
|
||||
'/signed-exchange/resources/sxg/sxg-hsts.sxg';
|
||||
const message = await openSXGInIframeAndWaitForMessage(t, sxgUrl);
|
||||
const innerURL = innerURLOrigin() +
|
||||
'/signed-exchange/resources/inner-url.html';
|
||||
assert_equals(message.location, innerURL);
|
||||
assert_true(message.is_fallback);
|
||||
}, 'Loading SignedHTTPExchange with an uncached header ' +
|
||||
'Strict-Transport-Security must fail and fallback redirect.');
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:h="http://www.w3.org/1999/xhtml"
|
||||
width="100%" height="100%" viewBox="0 0 480 360">
|
||||
<title>Event attributes - onwheel</title>
|
||||
<metadata>
|
||||
<h:link rel="help" href="https://svgwg.org/svg2-draft/interact.html#EventAttributes"/>
|
||||
<h:link rel="help" href="https://svgwg.org/svg2-draft/attindex.html#RegularAttributes"/>
|
||||
<h:meta name="assert" content="onwheel attribute runs script in response to wheel events"/>
|
||||
</metadata>
|
||||
<style>
|
||||
text {
|
||||
font-size: 12px;
|
||||
}
|
||||
#target {
|
||||
fill: yellow;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
'use strict';
|
||||
function complete() {
|
||||
document.getElementById('target').style.fill = 'lime';
|
||||
}
|
||||
</script>
|
||||
<text x="30" y="30">Select the box, use the mouse wheel and check that the box become green.</text>
|
||||
<rect id="target" x="140" y="160" width="200" height="200" onwheel="complete()" />
|
||||
</svg>
|
After Width: | Height: | Size: 958 B |
|
@ -4,6 +4,6 @@ mozprocess == 0.26
|
|||
mozcrash == 1.0
|
||||
mozrunner==7.2.0
|
||||
mozleak==0.2
|
||||
mozinstall==1.16.0
|
||||
mozinstall==2.0.0
|
||||
mozdownload==1.25
|
||||
mozversion==1.5
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WebShare Test: canShare with files</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
'use strict';
|
||||
const textFile = new File(['hello'], 'hello.txt', {type:'text/plain'});
|
||||
const emptyFile = new File([''], 'empty');
|
||||
|
||||
test(() => {
|
||||
assert_throws(new TypeError(), () => { navigator.canShare({files: textFile}) });
|
||||
}, 'canShare with single file');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({files: []}), false);
|
||||
}, 'canShare with empty file list');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({files: [emptyFile]}), true);
|
||||
}, 'canShare with single file list');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({files: [textFile, emptyFile]}), true);
|
||||
}, 'canShare with file list');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({files: [textFile, emptyFile, textFile]}), true);
|
||||
}, 'canShare with repeated file');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({url: 'https://example.com/', files: [textFile, emptyFile]}), true);
|
||||
}, 'canShare with file list and url');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WebShare Test: canShare from non-secure context</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test(() => {
|
||||
assert_false('canShare' in navigator, 'navigator has attribute \'canShare\'.');
|
||||
}, 'navigator.canShare must be undefined in non-secure context');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
85
tests/wpt/web-platform-tests/web-share/canShare.https.html
Normal file
85
tests/wpt/web-platform-tests/web-share/canShare.https.html
Normal file
|
@ -0,0 +1,85 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WebShare Test: canShare without files</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare(), false);
|
||||
}, 'canShare with no arguments (same as empty dictionary)');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({}), false);
|
||||
}, 'canShare with an empty dictionary');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare(undefined), false);
|
||||
}, 'canShare with a undefined argument (same as empty dictionary)');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare(null), false);
|
||||
}, 'canShare with a null argument (same as empty dictionary)');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({unused: 'unexpected field'}), false);
|
||||
}, 'canShare with a dictionary containing only surplus fields');
|
||||
|
||||
test(() => {
|
||||
// URL is invalid in that the URL Parser returns failure (port is too
|
||||
// large).
|
||||
const url = 'http://example.com:65536';
|
||||
assert_equals(navigator.canShare({url}), false);
|
||||
}, 'canShare with an invalid URL');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({title: undefined}), false);
|
||||
}, 'canShare with attribute undefined is equivalent to omitting the attribute');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({title: 'subject'}), true);
|
||||
}, 'canShare with title');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({text: 'body'}), true);
|
||||
}, 'canShare with text');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({url: 'https://www.example.com/some/path?some_query#some_fragment'}), true);
|
||||
}, 'canShare with URL');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({title: null}), true);
|
||||
}, 'canShare with null attribute');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({text: 123}), true);
|
||||
}, 'canShare with number');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({url: {toString() { return 'https://example.com/'; }}}), true);
|
||||
}, 'canShare with object');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({title: 'subject', text: 'body', url: 'https://example.com/', unused: 'unexpected field'}), true);
|
||||
}, 'canShare with unexpected field');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({url: 'data:the url'}), true);
|
||||
}, 'canShare with data URL');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({url: ''}), true);
|
||||
}, 'canShare with empty URL');
|
||||
|
||||
test(() => {
|
||||
assert_equals(navigator.canShare({url: '//www.example.com/some/path?some_query#some_fragment'}), true);
|
||||
}, 'canShare with URL having no scheme');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -5,85 +5,31 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="RTCPeerConnection-helper.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
'use strict';
|
||||
|
||||
// Test is based on the following editor draft:
|
||||
// https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html
|
||||
async function connectAndExpectNoCsrcs(t, kind) {
|
||||
const pc1 = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc1.close());
|
||||
const pc2 = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc2.close());
|
||||
|
||||
// The following helper function is called from RTCPeerConnection-helper.js
|
||||
// getTrackFromUserMedia
|
||||
// exchangeIceCandidates
|
||||
// doSignalingHandshake
|
||||
const stream = await navigator.mediaDevices.getUserMedia({[kind]:true});
|
||||
const [track] = stream.getTracks();
|
||||
t.add_cleanup(() => track.stop());
|
||||
pc1.addTrack(track, stream);
|
||||
|
||||
/*
|
||||
5.3. RTCRtpReceiver Interface
|
||||
interface RTCRtpReceiver {
|
||||
...
|
||||
sequence<RTCRtpContributingSource> getContributingSources();
|
||||
};
|
||||
exchangeIceCandidates(pc1, pc2);
|
||||
const trackEvent = await exchangeOfferAndListenToOntrack(t, pc1, pc2);
|
||||
await exchangeAnswer(pc1, pc2);
|
||||
|
||||
interface RTCRtpContributingSource {
|
||||
readonly attribute DOMHighResTimeStamp timestamp;
|
||||
readonly attribute unsigned long source;
|
||||
readonly attribute byte? audioLevel;
|
||||
};
|
||||
assert_array_equals(trackEvent.receiver.getContributingSources(), []);
|
||||
}
|
||||
|
||||
audioLevel
|
||||
The audio level contained in the last RTP packet played from this source.
|
||||
audioLevel will be the level value defined in [RFC6465] if the RFC 6465
|
||||
header extension is present, and otherwise null. RFC 6465 defines the
|
||||
level as a integral value from 0 to 127 representing the audio level in
|
||||
negative decibels relative to the loudest signal that the system could
|
||||
possibly encode. Thus, 0 represents the loudest signal the system could
|
||||
possibly encode, and 127 represents silence.
|
||||
*/
|
||||
|
||||
promise_test(t => {
|
||||
const pc1 = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc1.close());
|
||||
const pc2 = new RTCPeerConnection();
|
||||
|
||||
t.add_cleanup(() => pc2.close());
|
||||
|
||||
const ontrackPromise = new Promise(resolve => {
|
||||
pc2.addEventListener('track', trackEvent => {
|
||||
const { receiver } = trackEvent;
|
||||
assert_true(receiver instanceof RTCRtpReceiver,
|
||||
'Expect trackEvent.receiver to be instance of RTCRtpReceiver');
|
||||
|
||||
resolve(receiver);
|
||||
});
|
||||
});
|
||||
|
||||
return getTrackFromUserMedia('audio')
|
||||
.then(([track, mediaStream]) => {
|
||||
pc1.addTrack(track, mediaStream);
|
||||
exchangeIceCandidates(pc1, pc2);
|
||||
return doSignalingHandshake(pc1, pc2);
|
||||
})
|
||||
.then(() => ontrackPromise)
|
||||
.then(receiver => {
|
||||
const contributingSources = receiver.getContributingSources();
|
||||
assert_greater_than(contributingSources.length, 0,
|
||||
'Expect CSRCs to be available after RTP connection is established');
|
||||
|
||||
for(const csrc of contributingSources) {
|
||||
assert_true(csrc instanceof RTCRtpContributingSource,
|
||||
'Expect contributingSources elements to be instance of RTCRtpContributingSource');
|
||||
|
||||
assert_equals(typeof csrc.timestamp, 'number',
|
||||
'Expect csrc.timestamp attribute to be DOMHighResTimeStamp');
|
||||
|
||||
assert_true(Number.isInteger(csrc.source) && csrc.source > 0,
|
||||
'Expect CSRC identifier to be unsigned long');
|
||||
|
||||
if(csrc.audioLevel !== null) {
|
||||
assert_true(Number.isInteger(csrc.audioLevel) &&
|
||||
csrc.audioLevel >= 0 && csrc.audioLevel <= 127,
|
||||
'Expect csrc.audioLevel to be either null or byte value from 0-127.');
|
||||
}
|
||||
}
|
||||
});
|
||||
}, `getContributingSources() should return list of CSRC after connection is established`);
|
||||
promise_test(async t => {
|
||||
await connectAndExpectNoCsrcs(t, 'audio');
|
||||
}, '[audio] getContributingSources() returns an empty list in loopback call');
|
||||
|
||||
promise_test(async t => {
|
||||
await connectAndExpectNoCsrcs(t, 'video');
|
||||
}, '[video] getContributingSources() returns an empty list in loopback call');
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue