Skip to content

Commit

Permalink
Merge branch 'master' into check-layout-delay
Browse files Browse the repository at this point in the history
* master: (29 commits)
  WebCryptoAPI: check that CryptoKey instances have the expected Symbol.toStringTag (web-platform-tests#37716)
  ResizeObserver: Element with size 0x0 should be notified (web-platform-tests#38041)
  WebCryptoAPI: remove test for OperationError for tagLength 256 (web-platform-tests#37734)
  [scroll-timeline] Implement animation-range
  [Web Platform Test] Remove extra indent from shipping-option test
  [scroll-timeline] Reverse scroll-timeline-axis/name
  [Web Platform Test] Remove extra indents from delegations tests
  [Web Platform Test] Just-in-time install for shipping-option test
  [Web Platform Test] Just-in-time install for delegations test
  remove auth header from redirected cross-origin requests.
  Add tests for [Transferable] VideoFrame
  Make the style editor handle `<font>` at last when there are multiple preserved styles
  Make css-fonts/animations/font-variation-settings-composition.html less finicky about serialization order for font-variation-settings.
  [scroll-timeline] Hide support for tree-scoped timeline behind a flag
  Use script instead of fetch to de-flake firefox
  Retries in cache test
  Clean up doc test
  Fix CR comments
  Update preload/prefetch-cache.html
  Add test cases for cross-origin error events
  ...
  • Loading branch information
jgerigmeyer committed Jan 18, 2023
2 parents d907632 + 450f829 commit 285c9f1
Show file tree
Hide file tree
Showing 51 changed files with 1,612 additions and 455 deletions.
36 changes: 36 additions & 0 deletions IndexedDB/back-forward-cache-open-transaction.window.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// META: title=BFCache support test for page with open IndexedDB transaction
// META: script=/common/dispatcher/dispatcher.js
// META: script=/common/utils.js
// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js
// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js

'use strict';

promise_test(async t => {
const rcHelper = new RemoteContextHelper();

// Open a window with noopener so that BFCache will work.
const rc1 = await rcHelper.addWindow(
/*config=*/ null, /*options=*/ {features: 'noopener'});

await rc1.executeScript(() => {
// Create an IndexedDB database and the object store named `store` as the
// test scope for the transaction later on.
const db = indexedDB.open(/*name=*/ 'test_idb', /*version=*/ 1);
db.onupgradeneeded = () => {
db.result.createObjectStore('store');
};
addEventListener('pagehide', () => {
let transaction = db.result.transaction(['store'], 'readwrite');
let store = transaction.objectStore('store');
store.put("key", "value");

// Queue a request to close the connection, while keeping the transaction
// open, so that the BFCache eligibility will be determined solely by the
// pending transaction.
db.result.close();
});
});

await assertBFCache(rc1, /*shouldRestoreFromBFCache=*/ true);
});
2 changes: 1 addition & 1 deletion WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function getTestVectors() {
var failing = [];
keyLengths.forEach(function(keyLength) {
// First, make some tests for bad tag lengths
[24, 48, 72, 95, 129, 256].forEach(function(badTagLength) {
[24, 48, 72, 95, 129].forEach(function(badTagLength) {
failing.push({
name: "AES-GCM " + keyLength.toString() + "-bit key, illegal tag length " + badTagLength.toString() + "-bits",
keyBuffer: keyBytes[keyLength],
Expand Down
1 change: 1 addition & 0 deletions WebCryptoAPI/util/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ function assert_goodCryptoKey(key, algorithm, extractable, usages, kind) {
assert_in_array(usage, correctUsages, "Has " + usage + " usage");
});
assert_equals(key.usages.length, usageCount, "usages property is correct");
assert_equals(key[Symbol.toStringTag], 'CryptoKey', "has the expected Symbol.toStringTag");
}


Expand Down
10 changes: 5 additions & 5 deletions css/css-animations/parsing/animation-delay-end-computed.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-delay-start">
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-delay-end">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target"></div>
<script>
test_computed_value("animation-delay-start", "initial", "0s");
test_computed_value("animation-delay-start", "-500ms", "-0.5s");
test_computed_value("animation-delay-start", "calc(2 * 3s)", "6s");
test_computed_value("animation-delay-start", "20s, 10s");
test_computed_value("animation-delay-end", "initial", "0s");
test_computed_value("animation-delay-end", "-500ms", "-0.5s");
test_computed_value("animation-delay-end", "calc(2 * 3s)", "6s");
test_computed_value("animation-delay-end", "20s, 10s");
</script>
44 changes: 22 additions & 22 deletions css/css-animations/parsing/animation-delay-end-invalid.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-delay-start">
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-delay-end">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
test_invalid_value("animation-delay-start", "infinite");
test_invalid_value("animation-delay-start", "0");
test_invalid_value("animation-delay-start", "1s 2s");
test_invalid_value("animation-delay-start", "1s / 2s");
test_invalid_value("animation-delay-start", "100px");
test_invalid_value("animation-delay-start", "100%");
test_invalid_value("animation-delay-end", "infinite");
test_invalid_value("animation-delay-end", "0");
test_invalid_value("animation-delay-end", "1s 2s");
test_invalid_value("animation-delay-end", "1s / 2s");
test_invalid_value("animation-delay-end", "100px");
test_invalid_value("animation-delay-end", "100%");

test_invalid_value("animation-delay-start", "peek 50%");
test_invalid_value("animation-delay-start", "50% contain");
test_invalid_value("animation-delay-start", "50% cover");
test_invalid_value("animation-delay-start", "50% entry");
test_invalid_value("animation-delay-start", "50% enter");
test_invalid_value("animation-delay-start", "50% exit");
test_invalid_value("animation-delay-start", "contain contain");
test_invalid_value("animation-delay-start", "auto");
test_invalid_value("animation-delay-start", "none");
test_invalid_value("animation-delay-start", "cover 50% enter 50%");
test_invalid_value("animation-delay-start", "cover 100px");
test_invalid_value("animation-delay-start", "cover");
test_invalid_value("animation-delay-start", "contain");
test_invalid_value("animation-delay-start", "enter");
test_invalid_value("animation-delay-start", "exit");
test_invalid_value("animation-delay-end", "peek 50%");
test_invalid_value("animation-delay-end", "50% contain");
test_invalid_value("animation-delay-end", "50% cover");
test_invalid_value("animation-delay-end", "50% entry");
test_invalid_value("animation-delay-end", "50% enter");
test_invalid_value("animation-delay-end", "50% exit");
test_invalid_value("animation-delay-end", "contain contain");
test_invalid_value("animation-delay-end", "auto");
test_invalid_value("animation-delay-end", "none");
test_invalid_value("animation-delay-end", "cover 50% enter 50%");
test_invalid_value("animation-delay-end", "cover 100px");
test_invalid_value("animation-delay-end", "cover");
test_invalid_value("animation-delay-end", "contain");
test_invalid_value("animation-delay-end", "enter");
test_invalid_value("animation-delay-end", "exit");
</script>
25 changes: 5 additions & 20 deletions css/css-animations/parsing/animation-delay-end-valid.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-delay-start">
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-delay-end">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
test_valid_value("animation-delay-start", "-5ms");
test_valid_value("animation-delay-start", "0s");
test_valid_value("animation-delay-start", "10s");
test_valid_value("animation-delay-start", "20s, 10s");

// https://drafts.csswg.org/scroll-animations-1/#view-timelines-ranges
test_valid_value("animation-delay-start", "cover 0%");
test_valid_value("animation-delay-start", "cover 100%");
test_valid_value("animation-delay-start", "cover 120%");
test_valid_value("animation-delay-start", "cover 42%");
test_valid_value("animation-delay-start", "cover -42%");
test_valid_value("animation-delay-start", "contain 42%");
test_valid_value("animation-delay-start", "exit 42%");
test_valid_value("animation-delay-start", "exit 1%, cover 2%, contain 100%");

// There's an open issue in the spec about "enter" vs "entry".
//
// https://drafts.csswg.org/scroll-animations-1/#valdef-animation-timeline-range-entry
test_valid_value("animation-delay-start", "enter 42%");
test_valid_value("animation-delay-end", "-5ms");
test_valid_value("animation-delay-end", "0s");
test_valid_value("animation-delay-end", "10s");
test_valid_value("animation-delay-end", "20s, 10s");
</script>
54 changes: 0 additions & 54 deletions css/css-animations/parsing/animation-delay-shorthand.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>

test_valid_value("animation-delay", "1s");
test_valid_value("animation-delay", "-1s");
test_valid_value("animation-delay", "1s 2s");
Expand All @@ -17,27 +14,6 @@
test_valid_value("animation-delay", "1s, 2s 3s");
test_valid_value("animation-delay", "1s, 2s, 3s");

test_valid_value("animation-delay", "cover");
test_valid_value("animation-delay", "contain");
test_valid_value("animation-delay", "enter");
test_valid_value("animation-delay", "exit");
test_valid_value("animation-delay", "enter, exit");

test_valid_value("animation-delay", "enter 0% enter 100%", "enter");
test_valid_value("animation-delay", "exit 0% exit 100%", "exit");
test_valid_value("animation-delay", "cover 0% cover 100%", "cover");
test_valid_value("animation-delay", "contain 0% contain 100%", "contain");

test_valid_value("animation-delay", "cover 50%");
test_valid_value("animation-delay", "contain 50%");
test_valid_value("animation-delay", "enter 50%");
test_valid_value("animation-delay", "exit 50%");

test_valid_value("animation-delay", "enter 50% 0s", "enter 50%");
test_valid_value("animation-delay", "0s enter 50%");
test_valid_value("animation-delay", "enter 50% exit 50%");
test_valid_value("animation-delay", "cover 50% enter 50%, contain 50% exit 50%");

test_invalid_value("animation-delay", "1s 2s 3s");
test_invalid_value("animation-delay", "0s, 1s 2s 3s");
test_invalid_value("animation-delay", "1s / 2s");
Expand All @@ -61,21 +37,6 @@
'animation-delay-end': '0s',
});

test_shorthand_value('animation-delay', 'cover', {
'animation-delay-start': 'cover 0%',
'animation-delay-end': 'cover 100%',
});

test_shorthand_value('animation-delay', 'contain', {
'animation-delay-start': 'contain 0%',
'animation-delay-end': 'contain 100%',
});

test_shorthand_value('animation-delay', 'enter 10% exit 20%', {
'animation-delay-start': 'enter 10%',
'animation-delay-end': 'exit 20%',
});

test_shorthand_value('animation-delay', '1s 2s, 3s 4s', {
'animation-delay-start': '1s, 3s',
'animation-delay-end': '2s, 4s',
Expand All @@ -85,19 +46,4 @@
'animation-delay-start': '1s, 3s, 4s',
'animation-delay-end': '2s, 0s, 5s',
});

test_shorthand_value('animation-delay', 'enter, exit', {
'animation-delay-start': 'enter 0%, exit 0%',
'animation-delay-end': 'enter 100%, exit 100%',
});

test_shorthand_value('animation-delay', 'enter 0%, exit', {
'animation-delay-start': 'enter 0%, exit 0%',
'animation-delay-end': '0s, exit 100%',
});

test_shorthand_value('animation-delay', 'enter 0% 1s, 2s exit 50%', {
'animation-delay-start': 'enter 0%, 2s',
'animation-delay-end': '1s, exit 50%',
});
</script>
15 changes: 0 additions & 15 deletions css/css-animations/parsing/animation-delay-start-valid.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,4 @@
test_valid_value("animation-delay-start", "0s");
test_valid_value("animation-delay-start", "10s");
test_valid_value("animation-delay-start", "20s, 10s");

// https://drafts.csswg.org/scroll-animations-1/#view-timelines-ranges
test_valid_value("animation-delay-start", "cover 0%");
test_valid_value("animation-delay-start", "cover 100%");
test_valid_value("animation-delay-start", "cover 120%");
test_valid_value("animation-delay-start", "cover 42%");
test_valid_value("animation-delay-start", "cover -42%");
test_valid_value("animation-delay-start", "contain 42%");
test_valid_value("animation-delay-start", "exit 42%");
test_valid_value("animation-delay-start", "exit 1%, cover 2%, contain 100%");

// There's an open issue in the spec about "enter" vs "entry".
//
// https://drafts.csswg.org/scroll-animations-1/#valdef-animation-timeline-range-entry
test_valid_value("animation-delay-start", "enter 42%");
</script>
20 changes: 20 additions & 0 deletions css/css-animations/parsing/animation-range-end-computed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-range">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target"></div>
<script>
test_computed_value("animation-range-end", "initial", "auto");
test_computed_value("animation-range-end", "auto");
test_computed_value("animation-range-end", "cover 0%");
test_computed_value("animation-range-end", "COVER 0%", "cover 0%");
test_computed_value("animation-range-end", "cover 100%");
test_computed_value("animation-range-end", "cover 120%");
test_computed_value("animation-range-end", "cover 42%");
test_computed_value("animation-range-end", "cover -42%");
test_computed_value("animation-range-end", "contain 42%");
test_computed_value("animation-range-end", "exit 42%");
test_computed_value("animation-range-end", "exit calc(41% + 1%)", "exit 42%");
test_computed_value("animation-range-end", "exit 1%, cover 2%, contain 100%");
</script>
28 changes: 28 additions & 0 deletions css/css-animations/parsing/animation-range-end-invalid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-range">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
test_invalid_value("animation-range-end", "infinite");
test_invalid_value("animation-range-end", "0");
test_invalid_value("animation-range-end", "1s 2s");
test_invalid_value("animation-range-end", "1s / 2s");
test_invalid_value("animation-range-end", "100px");
test_invalid_value("animation-range-end", "100%");

test_invalid_value("animation-range-end", "peek 50%");
test_invalid_value("animation-range-end", "50% contain");
test_invalid_value("animation-range-end", "50% cover");
test_invalid_value("animation-range-end", "50% entry");
test_invalid_value("animation-range-end", "50% enter");
test_invalid_value("animation-range-end", "50% exit");
test_invalid_value("animation-range-end", "contain contain");
test_invalid_value("animation-range-end", "none");
test_invalid_value("animation-range-end", "cover 50% enter 50%");
test_invalid_value("animation-range-end", "cover 100px");
test_invalid_value("animation-range-end", "cover");
test_invalid_value("animation-range-end", "contain");
test_invalid_value("animation-range-end", "enter");
test_invalid_value("animation-range-end", "exit");
</script>
22 changes: 22 additions & 0 deletions css/css-animations/parsing/animation-range-end-valid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#propdef-animation-range">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
// https://drafts.csswg.org/scroll-animations-1/#view-timelines-ranges
test_valid_value("animation-range-end", "auto");
test_valid_value("animation-range-end", "cover 0%");
test_valid_value("animation-range-end", "cover 100%");
test_valid_value("animation-range-end", "cover 120%");
test_valid_value("animation-range-end", "cover 42%");
test_valid_value("animation-range-end", "cover -42%");
test_valid_value("animation-range-end", "contain 42%");
test_valid_value("animation-range-end", "exit 42%");
test_valid_value("animation-range-end", "exit 1%, cover 2%, contain 100%");

// There's an open issue in the spec about "enter" vs "entry".
//
// https://drafts.csswg.org/scroll-animations-1/#valdef-animation-timeline-range-entry
test_valid_value("animation-range-end", "enter 42%");
</script>
Loading

0 comments on commit 285c9f1

Please sign in to comment.