mirror of
https://github.com/servo/servo.git
synced 2025-07-12 18:03:49 +01:00
Auto merge of #22916 - servo-wpt-sync:wpt_update_19-02-2019, r=jdm
Sync WPT with upstream (19-02-2019) Automated downstream sync of changes from upstream as of 19-02-2019. [no-wpt-sync] <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22916) <!-- Reviewable:end -->
This commit is contained in:
commit
6bb98ad17a
30 changed files with 551 additions and 108 deletions
|
@ -14,6 +14,9 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[url-with-fetch.any.html]
|
||||
[Untitled]
|
||||
|
@ -34,6 +37,3 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -132489,6 +132489,30 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-pseudo/first-letter-background-image-dynamic.html": [
|
||||
[
|
||||
"/css/css-pseudo/first-letter-background-image-dynamic.html",
|
||||
[
|
||||
[
|
||||
"/css/css-pseudo/first-letter-background-image-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-pseudo/first-letter-background-image.html": [
|
||||
[
|
||||
"/css/css-pseudo/first-letter-background-image.html",
|
||||
[
|
||||
[
|
||||
"/css/css-pseudo/first-letter-background-image-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-pseudo/first-letter-block-to-inline.html": [
|
||||
[
|
||||
"/css/css-pseudo/first-letter-block-to-inline.html",
|
||||
|
@ -268828,6 +268852,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-pseudo/first-letter-background-image-ref.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-pseudo/first-letter-block-to-inline-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -347971,6 +348000,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-scroll-anchoring/device-pixel-adjustment.html": [
|
||||
[
|
||||
"/css/css-scroll-anchoring/device-pixel-adjustment.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-scroll-anchoring/exclude-fixed-position.html": [
|
||||
[
|
||||
"/css/css-scroll-anchoring/exclude-fixed-position.html",
|
||||
|
@ -383641,6 +383676,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"html/webappapis/animation-frames/cancel-pending.html": [
|
||||
[
|
||||
"/html/webappapis/animation-frames/cancel-pending.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"html/webappapis/animation-frames/idlharness.html": [
|
||||
[
|
||||
"/html/webappapis/animation-frames/idlharness.html",
|
||||
|
@ -449787,7 +449828,7 @@
|
|||
},
|
||||
"paths": {
|
||||
".azure-pipelines.yml": [
|
||||
"7224ff079f6b31dea3eccf10c03d2e1aeec01ed8",
|
||||
"5bd9fd67a1d5cdf1f929f1dd38e606d3e4f9fb99",
|
||||
"support"
|
||||
],
|
||||
".codecov.yml": [
|
||||
|
@ -571882,6 +571923,18 @@
|
|||
"a10612ac9731a7ecdf07416df23e802c131b7570",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-pseudo/first-letter-background-image-dynamic.html": [
|
||||
"6f8a9378c5c2f041ae8be4bc0a4e22be8869a107",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-pseudo/first-letter-background-image-ref.html": [
|
||||
"c235ba6eef6328f1b726acfe0076020bcd0b6f33",
|
||||
"support"
|
||||
],
|
||||
"css/css-pseudo/first-letter-background-image.html": [
|
||||
"aa9341df1bd7d97afd12f3896a645f008bdc8c50",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-pseudo/first-letter-block-to-inline-ref.html": [
|
||||
"5c777f1a92e373042ffbfeb5604cc665013663f7",
|
||||
"support"
|
||||
|
@ -574514,6 +574567,10 @@
|
|||
"654f34a051dc39ea3506a73a1e96602d0c664c61",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-scroll-anchoring/device-pixel-adjustment.html": [
|
||||
"4a135939fde657ab6819b167cfa72972373771b1",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-scroll-anchoring/exclude-fixed-position.html": [
|
||||
"d48d3f7cedf19ce502a5087d945675b62e62fdf9",
|
||||
"testharness"
|
||||
|
@ -574643,11 +574700,11 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-scroll-snap/parsing/scroll-snap-align-invalid.html": [
|
||||
"c31aa3c17513b3bed1888c1d9becd5874ca470b6",
|
||||
"9a1eeb77bbe481ec2ca842c86af45f6aa471e636",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-scroll-snap/parsing/scroll-snap-align-valid.html": [
|
||||
"163f786b7d45932dbede2fd2bc0a3b75e72a2f83",
|
||||
"0201448825e67c055f78b8be8bd08531d9068e1d",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-scroll-snap/parsing/scroll-snap-stop-invalid.html": [
|
||||
|
@ -625119,7 +625176,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_access_details.sub.html": [
|
||||
"46280854e8f1b078e8653cfc875cfa559271407c",
|
||||
"eb02c96f1d1d1d01a73182d08d2bae7eedeff109",
|
||||
"testharness"
|
||||
],
|
||||
"html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_feature_policy.tentative.sub.html": [
|
||||
|
@ -640754,6 +640811,10 @@
|
|||
"d075c0fdac1abdcd0c48e5f3841c646bfcdd2c55",
|
||||
"testharness"
|
||||
],
|
||||
"html/webappapis/animation-frames/cancel-pending.html": [
|
||||
"9c9aff511d03106c72ea379ff594dd063b8935ea",
|
||||
"testharness"
|
||||
],
|
||||
"html/webappapis/animation-frames/idlharness.html": [
|
||||
"3a9d1d9b583aa075a0b2bf8ba2a1b8f7c64e57b7",
|
||||
"testharness"
|
||||
|
@ -642827,7 +642888,7 @@
|
|||
"manual"
|
||||
],
|
||||
"input-events/input-events-exec-command.html": [
|
||||
"9ba423f4bade15ee47a099b611306b0e941af459",
|
||||
"8f8493651e5af4b747d952ac786334ace8ed61c4",
|
||||
"testharness"
|
||||
],
|
||||
"input-events/input-events-get-target-ranges-manual.html": [
|
||||
|
@ -643399,7 +643460,7 @@
|
|||
"support"
|
||||
],
|
||||
"interfaces/webxr.idl": [
|
||||
"d175729ca20fd66b0d1d8a32ef32e0957c58548f",
|
||||
"74466f856be208f091372c778c0c70ca8fa0e9a2",
|
||||
"support"
|
||||
],
|
||||
"interfaces/worklets.idl": [
|
||||
|
@ -672807,7 +672868,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"streams/writable-streams/brand-checks.any.js": [
|
||||
"968cb4c653aafdc3b906f0574f5fb2f08d5f7b3a",
|
||||
"66296ab3d356446b95b3b5aef30026a31a8eb092",
|
||||
"testharness"
|
||||
],
|
||||
"streams/writable-streams/byte-length-queuing-strategy.any.js": [
|
||||
|
@ -672815,7 +672876,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"streams/writable-streams/close.any.js": [
|
||||
"21f361f1f30b9967eff55ec84d7818925cf4f69a",
|
||||
"284bb16e1f5c6dca8e3657b85c42193f52ef3ac2",
|
||||
"testharness"
|
||||
],
|
||||
"streams/writable-streams/constructor.any.js": [
|
||||
|
@ -672851,7 +672912,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"streams/writable-streams/write.any.js": [
|
||||
"28fcf650e9f5660279ca7485c7f6478bbd1c97ce",
|
||||
"c936ef55af99d4874d71e9c5eab57cac8d9b25a1",
|
||||
"testharness"
|
||||
],
|
||||
"subresource-integrity/META.yml": [
|
||||
|
@ -677723,7 +677784,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/requirements_flake8.txt": [
|
||||
"970f00416dc8bea1e7722dac6fa1074d50bb00b6",
|
||||
"325988ee4e501b6ad64096daae279c0a5b78e4d2",
|
||||
"support"
|
||||
],
|
||||
"tools/runner/css/bootstrap-theme.min.css": [
|
||||
|
@ -681811,7 +681872,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wpt/utils.py": [
|
||||
"fa60230389deb56686f6753171482b69ac28983c",
|
||||
"f98687feb5178b2f4f82f45951c4a4295407c74c",
|
||||
"support"
|
||||
],
|
||||
"tools/wpt/virtualenv.py": [
|
||||
|
@ -682423,7 +682484,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wptrunner.py": [
|
||||
"95acafc16467e9cdd3b272298cf9e437339d5b21",
|
||||
"79ec2844ebfe79b24ab1bba533976082569e2173",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wpttest.py": [
|
||||
|
@ -685227,7 +685288,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"wasm/jsapi/table/grow.any.js": [
|
||||
"4978e3ca23d0261aaccf4aad97dd348da22a54d0",
|
||||
"558b49d1c7d3bcba9798370792fa4b6f83332105",
|
||||
"testharness"
|
||||
],
|
||||
"wasm/jsapi/table/length.any.js": [
|
||||
|
|
|
@ -509,33 +509,3 @@
|
|||
[text-indent percentage(%) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(mm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(in) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(pc) / values]
|
||||
expected: FAIL
|
||||
|
||||
[padding-left length(pt) / values]
|
||||
expected: FAIL
|
||||
|
||||
[padding-right length(ex) / values]
|
||||
expected: FAIL
|
||||
|
||||
[padding-top length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[padding-right length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[padding-right length(cm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width percentage(%) / values]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -74,6 +74,3 @@
|
|||
[opacity end]
|
||||
expected: FAIL
|
||||
|
||||
[word-spacing end]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -6,3 +6,6 @@
|
|||
[Instant scrolling while doing history navigation.]
|
||||
expected: FAIL
|
||||
|
||||
[Smooth scrolling while doing history navigation.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
|
||||
[single-byte-decoder.html?XMLHttpRequest]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -312,6 +312,18 @@
|
|||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%0C]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%22nosniFF%22]
|
||||
[X-Content-Type-Options%3A%20'NosniFF']
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -29,3 +29,9 @@
|
|||
[Access disallowed if same-origin but only one sets document.domain.]
|
||||
expected: FAIL
|
||||
|
||||
[Access evolves correctly for cross-origin objects when we join up via document.domain and then diverge again.]
|
||||
expected: FAIL
|
||||
|
||||
[Access evolves correctly for non-cross-origin objects when we join up via document.domain and then diverge again.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[cancel-pending.html]
|
||||
[cancelAnimationFrame cancels a pending animation frame callback]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[transition_calc_implicit.html]
|
||||
expected: TIMEOUT
|
4
tests/wpt/mozilla/meta/mozilla/paint_timing.html.ini
Normal file
4
tests/wpt/mozilla/meta/mozilla/paint_timing.html.ini
Normal file
|
@ -0,0 +1,4 @@
|
|||
[paint_timing.html]
|
||||
[Performance entries observer]
|
||||
expected: FAIL
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
jobs:
|
||||
# The affected tests jobs are unconditional for speed, as most PRs have one or
|
||||
# more affected tests: https://github.com/web-platform-tests/wpt/issues/13936.
|
||||
- job: affected_macOS
|
||||
- job: affected_safari_preview
|
||||
displayName: 'affected tests (Safari Technology Preview)'
|
||||
condition: eq(variables['Build.Reason'], 'PullRequest')
|
||||
pool:
|
||||
|
@ -30,9 +30,9 @@ jobs:
|
|||
steps:
|
||||
- template: tools/ci/azure/affected_tests.yml
|
||||
parameters:
|
||||
artifactName: 'affected-tests'
|
||||
artifactName: 'safari-preview-affected-tests'
|
||||
|
||||
- job: affected_without_changes_macOS
|
||||
- job: affected_without_changes_safari_preview
|
||||
displayName: 'affected tests without changes (Safari Technology Preview)'
|
||||
condition: eq(variables['Build.Reason'], 'PullRequest')
|
||||
pool:
|
||||
|
@ -42,7 +42,7 @@ jobs:
|
|||
parameters:
|
||||
checkoutCommit: 'HEAD^1'
|
||||
affectedRange: 'HEAD@{1}'
|
||||
artifactName: 'affected-tests-without-changes'
|
||||
artifactName: 'safari-preview-affected-tests-without-changes'
|
||||
|
||||
# The decision jobs runs `./wpt test-jobs` to determine which jobs to run,
|
||||
# and all following jobs wait for it to finish and depend on its output.
|
||||
|
@ -157,7 +157,7 @@ jobs:
|
|||
condition: succeededOrFailed()
|
||||
- template: tools/ci/azure/cleanup_win10.yml
|
||||
|
||||
- job: all_edge
|
||||
- job: results_edge
|
||||
displayName: 'all tests (Edge)'
|
||||
# This job is only triggered manually until it has been shown to be robust.
|
||||
condition: and(eq(variables['Build.Reason'], 'Manual'), variables['run_all_edge'])
|
||||
|
@ -182,10 +182,12 @@ jobs:
|
|||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
inputs:
|
||||
artifactName: 'results'
|
||||
artifactName: 'edge-results'
|
||||
- template: tools/ci/azure/cleanup_win10.yml
|
||||
|
||||
- job: all_macOS
|
||||
# All `./wpt run` tests are run from epochs/* branches on a schedule. See
|
||||
# documentation at the top of this file for required setup.
|
||||
- job: results_safari_preview
|
||||
displayName: 'all tests (Safari Technology Preview)'
|
||||
condition: eq(variables['Build.Reason'], 'Schedule')
|
||||
strategy:
|
||||
|
@ -208,12 +210,12 @@ jobs:
|
|||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
inputs:
|
||||
artifactName: 'results'
|
||||
artifactName: 'safari-preview-results'
|
||||
|
||||
# The InvokeRESTAPI task can only run in a server job.
|
||||
- job: all_post
|
||||
- job: results_post
|
||||
displayName: 'all tests (wpt.fyi hook)'
|
||||
dependsOn: all_macOS
|
||||
dependsOn: results_safari_preview
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test: ::first-letter correctly applies background-image dynamically</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-pseudo-4/#first-letter-styling">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1528451">
|
||||
<link rel="match" href="first-letter-background-image-ref.html">
|
||||
<style>
|
||||
div::first-letter {
|
||||
color: lime;
|
||||
}
|
||||
div.image::first-letter {
|
||||
/* Lime background */
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M/wHwAEBgIApD5fRAAAAABJRU5ErkJggg==');
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
A letter
|
||||
</div>
|
||||
<script>
|
||||
let div = document.querySelector("div");
|
||||
getComputedStyle(div).color;
|
||||
div.classList.add('image');
|
||||
</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>
|
||||
div::first-letter {
|
||||
color: lime;
|
||||
background-color: lime;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
A letter
|
||||
</div>
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test: ::first-letter correctly applies background-image</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-pseudo-4/#first-letter-styling">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1528451">
|
||||
<link rel="match" href="first-letter-background-image-ref.html">
|
||||
<style>
|
||||
div::first-letter {
|
||||
color: lime;
|
||||
/* Lime background */
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M/wHwAEBgIApD5fRAAAAABJRU5ErkJggg==');
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
A letter
|
||||
</div>
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring-1/">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
||||
body {
|
||||
height: 200vh;
|
||||
}
|
||||
#anchor {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: blue;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="expander"></div>
|
||||
<div id="anchor"></div>
|
||||
<script>
|
||||
|
||||
// This tests that scroll anchor adjustments can happen by quantities smaller
|
||||
// than a device pixel.
|
||||
//
|
||||
// Unfortunately, we can't test this by simply reading 'scrollTop', because
|
||||
// 'scrollTop' may be rounded to the nearest CSS pixel. So, to test that
|
||||
// subpixel adjustments can in fact happen, we repeatedly trigger a scroll
|
||||
// adjustment in a way that would produce a different final .scrollTop value,
|
||||
// depending on whether or not we rounded each adjustment as we apply it.
|
||||
|
||||
test(() => {
|
||||
let scroller = document.scrollingElement;
|
||||
let expander = document.querySelector("#expander");
|
||||
let anchor = document.querySelector("#anchor");
|
||||
const initialTop = 10;
|
||||
|
||||
// Scroll 10px to activate scroll anchoring
|
||||
scroller.scrollTop = initialTop;
|
||||
|
||||
// Helper to insert a div with specified height before the anchor node
|
||||
function addChild(height) {
|
||||
let child = document.createElement("div");
|
||||
child.style.height = `${height}px`;
|
||||
anchor.before(child);
|
||||
}
|
||||
|
||||
// Calculate what fraction of a CSS pixel corresponds to one device pixel
|
||||
let devicePixel = 1.0 / window.devicePixelRatio;
|
||||
assert_true(devicePixel <= 1.0, "there should be more device pixels than CSS pixels");
|
||||
|
||||
// The 0.5 is an arbitrary scale when creating the subpixel delta
|
||||
let delta = 0.5 * devicePixel;
|
||||
|
||||
// To help us check for for premature rounding of adjustments, we'll
|
||||
// trigger "count" subpixel adjustments of size "delta", where "count" is
|
||||
// the first positive integer such that:
|
||||
// round(count * delta) != count * round(delta)
|
||||
// As round(X) and count are integers, this happens when:
|
||||
// count * delta = count * round(delta) +/- 1
|
||||
// Solving for count:
|
||||
// count = 1 / abs(delta - round(delta))
|
||||
// Note that we don't need to worry about the denominator being zero, as:
|
||||
// 0 < devicePixel <= 1
|
||||
// And so halving devicePixel should never yield a whole number.
|
||||
let count = 1 / Math.abs(delta - Math.round(delta));
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
addChild(delta);
|
||||
// Trigger an anchor adjustment by forcing a layout flush
|
||||
scroller.scrollTop;
|
||||
}
|
||||
|
||||
let destination = Math.round(initialTop + delta * count);
|
||||
assert_equals(scroller.scrollTop, destination,
|
||||
`adjusting by ${delta}px, ${count} times, should be the same as adjusting by ${delta * count}px, once.`);
|
||||
}, "Test that scroll anchor adjustments can happen by a sub device-pixel amount.");
|
||||
|
||||
</script>
|
|
@ -13,6 +13,8 @@
|
|||
<script>
|
||||
test_invalid_value("scroll-snap-align", "auto");
|
||||
|
||||
test_invalid_value("scroll-snap-align", "start invalid");
|
||||
|
||||
test_invalid_value("scroll-snap-align", "start end center");
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -18,6 +18,8 @@ test_valid_value("scroll-snap-align", "center");
|
|||
|
||||
test_valid_value("scroll-snap-align", "start none");
|
||||
test_valid_value("scroll-snap-align", "center end");
|
||||
test_valid_value("scroll-snap-align", "start start", "start");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -114,7 +114,7 @@ promise_test(async (t) => {
|
|||
}, "Access is revoked to Window object when we stop being same effective script origin due to document.domain.");
|
||||
|
||||
promise_test(async (t) => {
|
||||
let frame1 = await createFrame(t, "revoke-Location-1", "{{hosts[][www1]}}");
|
||||
let frame1 = await createFrame(t, "revoke-Location-1", "{{domains[www1]}}");
|
||||
let frame2 = await createFrame(t, "revoke-Location-2", "{{domains[www1]}}");
|
||||
|
||||
let result = await postMessageToFrame(frame1, { cache: ["parent", "revoke-Location-2", "location"] });
|
||||
|
@ -152,7 +152,7 @@ promise_test(async (t) => {
|
|||
result = await postMessageToFrame(frame2, { cache: ["parent", "no-revoke-Document-1", "document"] });
|
||||
assert_equals(result.data, "cached");
|
||||
|
||||
result = await postMessageToFrame(frame1, 'touch-cached');
|
||||
result = await postMessageToFrame(frame2, 'touch-cached');
|
||||
assert_equals(result.data, "Reachable 4");
|
||||
|
||||
result = await postMessageToFrame(frame1, { domain: "{{domains[www1]}}" });
|
||||
|
@ -190,4 +190,116 @@ promise_test(async (t) => {
|
|||
result = await postMessageToFrame(frame2, 'touch-cached');
|
||||
assert_equals(result.data, "Reachable 2");
|
||||
}, "Access is not revoked to random object when we stop being same effective script origin due to document.domain.");
|
||||
|
||||
promise_test(async (t) => {
|
||||
let frame1 = await createFrame(t, "join-and-diverge-1", "{{domains[www2.www1]}}");
|
||||
let frame2 = await createFrame(t, "join-and-diverge-2", "{{domains[www1.www1]}}");
|
||||
|
||||
// Make sure we can't touch each other.
|
||||
let result = await postMessageToFrame(frame1, { 'poke-at-sibling': "join-and-diverge-2" });
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
result = await postMessageToFrame(frame2, { 'poke-at-sibling': "join-and-diverge-1" });
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
result = await postMessageToFrame(frame1, { cache: ["parent", "join-and-diverge-2", "bar"] });
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
result = await postMessageToFrame(frame2, { cache: ["parent", "join-and-diverge-1", "document"] });
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
// Let's join up now.
|
||||
result = await postMessageToFrame(frame1, { domain: "{{domains[www1]}}" });
|
||||
assert_equals(result.data, "Done");
|
||||
|
||||
result = await postMessageToFrame(frame2, { domain: "{{domains[www1]}}" });
|
||||
assert_equals(result.data, "Done");
|
||||
|
||||
// Now we should be able to touch each other.
|
||||
result = await postMessageToFrame(frame1, { 'poke-at-sibling': "join-and-diverge-2" });
|
||||
assert_equals(result.data, "omg!");
|
||||
|
||||
result = await postMessageToFrame(frame2, { 'poke-at-sibling': "join-and-diverge-1" });
|
||||
assert_equals(result.data, "omg!");
|
||||
|
||||
// Cache a random object and a document.
|
||||
result = await postMessageToFrame(frame1, { cache: ["parent", "join-and-diverge-2", "bar"] });
|
||||
assert_equals(result.data, "cached");
|
||||
|
||||
result = await postMessageToFrame(frame1, 'touch-cached');
|
||||
assert_equals(result.data, "Reachable 2");
|
||||
|
||||
result = await postMessageToFrame(frame2, { cache: ["parent", "join-and-diverge-1", "document"] });
|
||||
assert_equals(result.data, "cached");
|
||||
|
||||
result = await postMessageToFrame(frame2, 'touch-cached');
|
||||
assert_equals(result.data, "Reachable 4");
|
||||
|
||||
// OK, now let's diverge
|
||||
result = await postMessageToFrame(frame1, { domain: "{{domains[]}}" });
|
||||
assert_equals(result.data, "Done");
|
||||
|
||||
// We should still be able to touch our cached things.
|
||||
result = await postMessageToFrame(frame1, 'touch-cached');
|
||||
assert_equals(result.data, "Reachable 2");
|
||||
|
||||
result = await postMessageToFrame(frame2, 'touch-cached');
|
||||
assert_equals(result.data, "Reachable 4");
|
||||
}, "Access evolves correctly for non-cross-origin objects when we join up via document.domain and then diverge again.");
|
||||
|
||||
promise_test(async (t) => {
|
||||
let frame1 = await createFrame(t, "join-and-diverge-cross-origin-1", "{{domains[www2.www1]}}");
|
||||
let frame2 = await createFrame(t, "join-and-diverge-cross-origin-2", "{{domains[www1.www1]}}");
|
||||
|
||||
// Make sure we can't touch each other.
|
||||
let result = await postMessageToFrame(frame1, { 'poke-at-sibling': "join-and-diverge-cross-origin-2" });
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
result = await postMessageToFrame(frame2, { 'poke-at-sibling': "join-and-diverge-cross-origin-1" });
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
result = await postMessageToFrame(frame1, { cache: ["parent", "join-and-diverge-2", "bar"] });
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
result = await postMessageToFrame(frame2, { cache: ["parent", "join-and-diverge-1", "document"] });
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
// Let's join up now.
|
||||
result = await postMessageToFrame(frame1, { domain: "{{domains[www1]}}" });
|
||||
assert_equals(result.data, "Done");
|
||||
|
||||
result = await postMessageToFrame(frame2, { domain: "{{domains[www1]}}" });
|
||||
assert_equals(result.data, "Done");
|
||||
|
||||
// Now we should be able to touch each other.
|
||||
result = await postMessageToFrame(frame1, { 'poke-at-sibling': "join-and-diverge-cross-origin-2" });
|
||||
assert_equals(result.data, "omg!");
|
||||
|
||||
result = await postMessageToFrame(frame2, { 'poke-at-sibling': "join-and-diverge-cross-origin-1" });
|
||||
assert_equals(result.data, "omg!");
|
||||
|
||||
// Cache a window and a location
|
||||
result = await postMessageToFrame(frame1, { cache: ["parent", "join-and-diverge-cross-origin-2"] });
|
||||
assert_equals(result.data, "cached");
|
||||
|
||||
result = await postMessageToFrame(frame1, 'touch-cached');
|
||||
assert_equals(result.data, "Reachable 1");
|
||||
|
||||
result = await postMessageToFrame(frame2, { cache: ["parent", "join-and-diverge-cross-origin-1", "location"] });
|
||||
assert_equals(result.data, "cached");
|
||||
|
||||
result = await postMessageToFrame(frame2, 'touch-cached');
|
||||
assert_equals(result.data, "Reachable 3");
|
||||
|
||||
// OK, now let's diverge
|
||||
result = await postMessageToFrame(frame1, { domain: "{{domains[]}}" });
|
||||
assert_equals(result.data, "Done");
|
||||
|
||||
// Now our cross-origin objects should start denying access.
|
||||
result = await postMessageToFrame(frame1, 'touch-cached');
|
||||
assert_equals(result.data, "SecurityError");
|
||||
|
||||
result = await postMessageToFrame(frame2, 'touch-cached');
|
||||
assert_equals(result.data, "SecurityError");
|
||||
}, "Access evolves correctly for cross-origin objects when we join up via document.domain and then diverge again.");
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<!doctype html>
|
||||
<title>cancelAnimationFrame cancels a pending animation frame callback</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#run-the-animation-frame-callbacks">
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(t => {
|
||||
let didCall = false;
|
||||
|
||||
function callbackOne() {
|
||||
cancelAnimationFrame(twoHandle);
|
||||
requestAnimationFrame(t.step_func(() => {
|
||||
assert_false(didCall, 'Should NOT have called the second callback');
|
||||
t.done();
|
||||
}));
|
||||
}
|
||||
|
||||
function callbackTwo() {
|
||||
didCall = true;
|
||||
}
|
||||
|
||||
requestAnimationFrame(callbackOne);
|
||||
const twoHandle = requestAnimationFrame(callbackTwo);
|
||||
}, 'cancelAnimationFrame cancels a pending animation frame callback');
|
||||
</script>
|
|
@ -7,141 +7,224 @@
|
|||
<script>
|
||||
(function() {
|
||||
let lastBeforeInputType = '';
|
||||
let lastBeforeInputData = '';
|
||||
let lastBeforeInputDataTransfer = undefined;
|
||||
let lastInputType = '';
|
||||
let lastInputData = '';
|
||||
let lastInputDataTransfer = undefined;
|
||||
const txt = document.getElementById('txt');
|
||||
txt.addEventListener('beforeinput', function(event) {
|
||||
assert_true(event instanceof InputEvent);
|
||||
assert_false(event.isComposing);
|
||||
lastBeforeInputType = event.inputType;
|
||||
lastBeforeInputData = event.data;
|
||||
lastBeforeInputDataTransfer = event.dataTransfer;
|
||||
});
|
||||
txt.addEventListener('input', function(event) {
|
||||
assert_true(event instanceof InputEvent);
|
||||
assert_false(event.isComposing);
|
||||
lastInputType = event.inputType;
|
||||
lastInputData = event.data;
|
||||
lastInputDataTransfer = event.dataTransfer;
|
||||
});
|
||||
|
||||
const NO_INPUT_EVENT_FIRED = 'NO_INPUT_EVENT_FIRED';
|
||||
function testExecCommandInputType(command, args, inputType) {
|
||||
function testExecCommandInputType(command, args, inputType, data, dataTransfer) {
|
||||
const description = `Calling execCommand("${command}", false, ${args})`;
|
||||
lastBeforeInputType = NO_INPUT_EVENT_FIRED;
|
||||
lastBeforeInputData = NO_INPUT_EVENT_FIRED;
|
||||
lastBeforeInputDataTransfer = NO_INPUT_EVENT_FIRED;
|
||||
lastInputType = NO_INPUT_EVENT_FIRED;
|
||||
lastInputData = NO_INPUT_EVENT_FIRED;
|
||||
lastInputDataTransfer = NO_INPUT_EVENT_FIRED;
|
||||
test(function() {
|
||||
lastBeforeInputType = NO_INPUT_EVENT_FIRED;
|
||||
lastInputType = NO_INPUT_EVENT_FIRED;
|
||||
try {
|
||||
document.execCommand(command, false, args);
|
||||
} catch (e) {
|
||||
assert(false, `execCommand shouldn't cause any exception: ${e}`);
|
||||
assert_true(false, `execCommand shouldn't cause any exception: ${e}`);
|
||||
}
|
||||
assert_equals(lastBeforeInputType, NO_INPUT_EVENT_FIRED,
|
||||
`${description} shouldn't fire beforeinput`);
|
||||
assert_equals(lastInputType, inputType,
|
||||
`${description} should produce inputType: ${inputType}`);
|
||||
}, description);
|
||||
}, description + " (calling execCommand)");
|
||||
test(function() {
|
||||
assert_equals(lastBeforeInputType, NO_INPUT_EVENT_FIRED);
|
||||
assert_equals(lastBeforeInputData, NO_INPUT_EVENT_FIRED);
|
||||
assert_equals(lastBeforeInputDataTransfer, NO_INPUT_EVENT_FIRED);
|
||||
}, description + " (shouldn't fire beforeinput)");
|
||||
test(function() {
|
||||
assert_equals(lastInputType, inputType);
|
||||
}, description + " (inputType value)");
|
||||
if (lastInputType === NO_INPUT_EVENT_FIRED) {
|
||||
return;
|
||||
}
|
||||
test(function() {
|
||||
assert_equals(lastInputData, data);
|
||||
}, description + " (data value)");
|
||||
if (dataTransfer === null) {
|
||||
test(function() {
|
||||
assert_equals(lastInputDataTransfer, dataTransfer,
|
||||
`${description} should produce dataTransfer: null`);
|
||||
}, description + " (dataTransfer value)");
|
||||
} else {
|
||||
for (let item of dataTransfer) {
|
||||
test(function() {
|
||||
try {
|
||||
assert_equals(lastInputDataTransfer.getData(item.type), item.data,
|
||||
`${description} should produce dataTransfer.getData(${item.type}): ${item.data}`);
|
||||
} catch (e) {
|
||||
assert_true(false, `calling dataTransfer.getData(${item.type}) caused exception: ${e}`);
|
||||
}
|
||||
}, `${description} (dataTransfer value, ${item.type})`);
|
||||
test(function() {
|
||||
try {
|
||||
lastInputDataTransfer.clearData(item.type);
|
||||
} catch (e) {
|
||||
assert_true(false, `calling dataTransfer.clearData(${item.type}) caused exception: ${e}`);
|
||||
}
|
||||
assert_equals(lastInputDataTransfer.getData(item.type), item.data,
|
||||
`${description} dataTransfer.clearData(${item.type}) should do nothing`);
|
||||
}, `${description} (dataTransfer.clearData(${item.type}))`);
|
||||
test(function() {
|
||||
try {
|
||||
lastInputDataTransfer.setData(item.type, "foo");
|
||||
} catch (e) {
|
||||
assert_true(false, `calling dataTransfer.setData(${item.type}) caused exception: ${e}`);
|
||||
}
|
||||
assert_equals(lastInputDataTransfer.getData(item.type), item.data,
|
||||
`${description} dataTransfer.setData(${item.type}, "foo") should do nothing`);
|
||||
}, `${description} (dataTransfer.setData(${item.type}))`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
txt.focus();
|
||||
// InsertText
|
||||
testExecCommandInputType('insertText', 'a', 'insertText');
|
||||
testExecCommandInputType('insertText', 'bc', 'insertText');
|
||||
testExecCommandInputType('insertText', 'a', 'insertText', 'a', null);
|
||||
testExecCommandInputType('insertText', 'bc', 'insertText', 'bc', null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, 'abc');
|
||||
}, "execCommand(\"insertText\") should insert \"abc\" into the editor");
|
||||
testExecCommandInputType('insertOrderedList', null, 'insertOrderedList');
|
||||
testExecCommandInputType('insertOrderedList', null, 'insertOrderedList', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<ol><li>abc</li></ol>');
|
||||
}, "execCommand(\"insertOrderedList\") should make <ol> and wrap the text with it");
|
||||
testExecCommandInputType('insertUnorderedList', null, 'insertUnorderedList');
|
||||
testExecCommandInputType('insertUnorderedList', null, 'insertUnorderedList', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<ul><li>abc</li></ul>');
|
||||
}, "execCommand(\"insertUnorderedList\") should make <ul> and wrap the text with it");
|
||||
testExecCommandInputType('insertLineBreak', null, 'insertLineBreak');
|
||||
testExecCommandInputType('insertParagraph', null, 'insertParagraph');
|
||||
testExecCommandInputType('insertLineBreak', null, 'insertLineBreak', null, null);
|
||||
testExecCommandInputType('insertParagraph', null, 'insertParagraph', null, null);
|
||||
txt.innerHTML = '';
|
||||
testExecCommandInputType('insertHorizontalRule', null, 'insertHorizontalRule');
|
||||
testExecCommandInputType('insertHorizontalRule', null, 'insertHorizontalRule', null, null);
|
||||
|
||||
// Styling
|
||||
txt.innerHTML = 'abc';
|
||||
var selection = window.getSelection();
|
||||
selection.collapse(txt, 0);
|
||||
selection.extend(txt, 1);
|
||||
testExecCommandInputType('bold', null, 'formatBold');
|
||||
testExecCommandInputType('bold', null, 'formatBold', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<b>abc</b>');
|
||||
}, "execCommand(\"bold\") should wrap selected text with <b> element");
|
||||
testExecCommandInputType('italic', null, 'formatItalic');
|
||||
testExecCommandInputType('italic', null, 'formatItalic', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<b><i>abc</i></b>');
|
||||
}, "execCommand(\"italic\") should wrap selected text with <i> element");
|
||||
testExecCommandInputType('underline', null, 'formatUnderline');
|
||||
testExecCommandInputType('underline', null, 'formatUnderline', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<b><i><u>abc</u></i></b>');
|
||||
}, "execCommand(\"underline\") should wrap selected text with <u> element");
|
||||
testExecCommandInputType('strikeThrough', null, 'formatStrikeThrough');
|
||||
testExecCommandInputType('strikeThrough', null, 'formatStrikeThrough', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<b><i><u><strike>abc</strike></u></i></b>');
|
||||
}, "execCommand(\"strikeThrough\") should wrap selected text with <strike> element");
|
||||
testExecCommandInputType('superscript', null, 'formatSuperscript');
|
||||
testExecCommandInputType('superscript', null, 'formatSuperscript', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<b><i><u><strike><sup>abc</sup></strike></u></i></b>');
|
||||
}, "execCommand(\"superscript\") should wrap selected text with <sup> element");
|
||||
testExecCommandInputType('subscript', null, 'formatSubscript');
|
||||
testExecCommandInputType('subscript', null, 'formatSubscript', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<b><i><u><strike><sub>abc</sub></strike></u></i></b>');
|
||||
}, "execCommand(\"subscript\") should wrap selected text with <sub> element");
|
||||
txt.innerHTML = 'abc';
|
||||
selection.collapse(txt, 0);
|
||||
selection.extend(txt, 1);
|
||||
testExecCommandInputType('backColor', '#000000', 'formatBackColor');
|
||||
testExecCommandInputType('foreColor', '#FFFFFF', 'formatFontColor');
|
||||
testExecCommandInputType('hiliteColor', '#FFFF00', 'formatBackColor');
|
||||
testExecCommandInputType('fontName', 'monospace', 'formatFontName');
|
||||
for (let test of [{command: 'backColor', inputType: 'formatBackColor'},
|
||||
{command: 'foreColor', inputType: 'formatFontColor'},
|
||||
{command: 'hiliteColor', inputType: 'formatBackColor'}]) {
|
||||
testExecCommandInputType(test.command, '#FF0000', test.inputType, 'rgb(255, 0, 0)', null);
|
||||
testExecCommandInputType(test.command, '#00FF00FF', test.inputType, 'rgb(0, 255, 0)', null);
|
||||
testExecCommandInputType(test.command, '#0000FF88', test.inputType, 'rgba(0, 0, 255, 0.533)', null);
|
||||
testExecCommandInputType(test.command, 'orange', test.inputType, 'rgb(255, 165, 0)', null);
|
||||
testExecCommandInputType(test.command, 'Inherit', test.inputType, 'inherit', null);
|
||||
testExecCommandInputType(test.command, 'Initial', test.inputType, 'initial', null);
|
||||
testExecCommandInputType(test.command, 'Reset', test.inputType, 'reset', null);
|
||||
testExecCommandInputType(test.command, 'transparent', test.inputType, 'rgba(0, 0, 0, 0)', null);
|
||||
testExecCommandInputType(test.command, 'CurrentColor', test.inputType, 'currentcolor', null);
|
||||
testExecCommandInputType(test.command, 'Invalid-Value', test.inputType, 'Invalid-Value', null);
|
||||
}
|
||||
|
||||
testExecCommandInputType('fontName', 'monospace', 'formatFontName', 'monospace', null);
|
||||
testExecCommandInputType('fontName', ' monospace ', 'formatFontName', ' monospace ', null);
|
||||
testExecCommandInputType('fontName', ' monospace ', 'formatFontName', ' monospace ', null);
|
||||
|
||||
// Formating
|
||||
txt.innerHTML = 'abc';
|
||||
testExecCommandInputType('justifyCenter', null, 'formatJustifyCenter');
|
||||
testExecCommandInputType('justifyCenter', null, 'formatJustifyCenter', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<div style="text-align: center;">abc</div>');
|
||||
}, "execCommand(\"justifyCenter\") should wrap the text with <div> element whose text-align is center");
|
||||
testExecCommandInputType('justifyFull', null, 'formatJustifyFull');
|
||||
testExecCommandInputType('justifyFull', null, 'formatJustifyFull', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<div style="text-align: justify;">abc</div>');
|
||||
}, "execCommand(\"justifyFull\") should wrap the text with <div> element whose text-align is justify");
|
||||
testExecCommandInputType('justifyRight', null, 'formatJustifyRight');
|
||||
testExecCommandInputType('justifyRight', null, 'formatJustifyRight', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<div style="text-align: right;">abc</div>');
|
||||
}, "execCommand(\"justifyRight\") should wrap the text with <div> element whose text-align is right");
|
||||
testExecCommandInputType('justifyLeft', null, 'formatJustifyLeft');
|
||||
testExecCommandInputType('justifyLeft', null, 'formatJustifyLeft', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<div style="text-align: left;">abc</div>');
|
||||
}, "execCommand(\"justifyLeft\") should wrap the text with <div> element whose text-align is left");
|
||||
selection.collapse(txt, 0);
|
||||
selection.extend(txt, 1);
|
||||
testExecCommandInputType('removeFormat', null, 'formatRemove');
|
||||
testExecCommandInputType('removeFormat', null, 'formatRemove', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<div style="">abc</div>');
|
||||
}, "execCommand(\"removeFormat\") should remove the style of current block");
|
||||
testExecCommandInputType('indent', null, 'formatIndent');
|
||||
testExecCommandInputType('outdent', null, 'formatOutdent');
|
||||
testExecCommandInputType('indent', null, 'formatIndent', null, null);
|
||||
testExecCommandInputType('outdent', null, 'formatOutdent', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, '<div style="">abc</div>');
|
||||
}, "Set of execCommand(\"indent\") and execCommand(\"outdent\") should keep same DOM tree");
|
||||
|
||||
// Copy shouldn't fire 'input'.
|
||||
testExecCommandInputType('copy', null, NO_INPUT_EVENT_FIRED);
|
||||
txt.innerHTML = 'ab<b>c</b>def';
|
||||
selection.collapse(txt.firstChild, 1);
|
||||
selection.extend(txt.firstChild.nextSibling.nextSibling, 1);
|
||||
testExecCommandInputType('copy', null, NO_INPUT_EVENT_FIRED, NO_INPUT_EVENT_FIRED, NO_INPUT_EVENT_FIRED);
|
||||
// Cut/Paste should fire 'input'.
|
||||
testExecCommandInputType('cut', null, 'deleteByCut');
|
||||
testExecCommandInputType('paste', null, 'insertFromPaste');
|
||||
testExecCommandInputType('cut', null, 'deleteByCut', null, null);
|
||||
// XXX How can we test 'text/html' case? The detail of copied HTML fragment depends on browser.
|
||||
testExecCommandInputType('paste', null, 'insertFromPaste', null, [{type: 'text/plain', data: 'bcd'}]);
|
||||
|
||||
// Link and Unlink
|
||||
txt.innerHTML = 'abc';
|
||||
selection.collapse(txt.firstChild, 1);
|
||||
selection.extend(txt.firstChild, 2);
|
||||
testExecCommandInputType('createLink', 'https://example.com/', 'insertLink');
|
||||
testExecCommandInputType('createLink', 'https://example.com/', 'insertLink', 'https://example.com/', null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, 'a<a href="https://example.com/">b</a>c');
|
||||
}, "execCommand(\"createLink\") should create a link");
|
||||
testExecCommandInputType('unlink', null, '');
|
||||
}, "execCommand(\"createLink\") should create a link with absolute URL");
|
||||
testExecCommandInputType('unlink', null, '', null, null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, 'abc');
|
||||
}, "execCommand(\"createLink\") should remove the link");
|
||||
|
||||
txt.innerHTML = 'abc';
|
||||
selection.collapse(txt.firstChild, 1);
|
||||
selection.extend(txt.firstChild, 2);
|
||||
testExecCommandInputType('createLink', 'foo.html', 'insertLink', 'foo.html', null);
|
||||
test(function() {
|
||||
assert_equals(txt.innerHTML, 'a<a href="foo.html">b</a>c');
|
||||
}, "execCommand(\"createLink\") should create a link with relative URL");
|
||||
})();
|
||||
</script>
|
||||
|
|
|
@ -28,6 +28,7 @@ enum XREnvironmentBlendMode {
|
|||
readonly attribute XRPresentationContext? outputContext;
|
||||
readonly attribute XREnvironmentBlendMode environmentBlendMode;
|
||||
readonly attribute XRRenderState renderState;
|
||||
readonly attribute XRSpace viewerSpace;
|
||||
|
||||
// Methods
|
||||
void updateRenderState(optional XRRenderStateInit state);
|
||||
|
|
|
@ -103,6 +103,11 @@ promise_test(t => {
|
|||
[fakeWSDefaultWriter(), realWS(), realWSDefaultController(), undefined, null]);
|
||||
}, 'WritableStreamDefaultWriter.prototype.close enforces a brand check');
|
||||
|
||||
test(() => {
|
||||
methodThrowsForAll(WriterProto, 'releaseLock',
|
||||
[fakeWSDefaultWriter(), realWS(), realWSDefaultController(), undefined, null]);
|
||||
}, 'WritableStreamDefaultWriter.prototype.releaseLock enforces a brand check');
|
||||
|
||||
test(() => {
|
||||
methodThrowsForAll(WritableStreamDefaultController.prototype, 'error',
|
||||
[fakeWSDefaultController(), realWS(), realWSDefaultWriter(), undefined, null]);
|
||||
|
|
|
@ -399,3 +399,15 @@ promise_test(t => {
|
|||
});
|
||||
});
|
||||
}, 'close() should not reject until no sink methods are in flight');
|
||||
|
||||
promise_test(() => {
|
||||
const ws = new WritableStream();
|
||||
const writer1 = ws.getWriter();
|
||||
return writer1.close().then(() => {
|
||||
writer1.releaseLock();
|
||||
const writer2 = ws.getWriter();
|
||||
const ready = writer2.ready;
|
||||
assert_equals(ready.constructor, Promise);
|
||||
return ready;
|
||||
});
|
||||
}, 'ready promise should be initialised as fulfilled for a writer on a closed stream');
|
||||
|
|
|
@ -275,3 +275,10 @@ promise_test(t => {
|
|||
promise_rejects(t, error1, writer.write(), 'write() should be rejected')
|
||||
]);
|
||||
}, 'write() on a stream with HWM 0 should not cause the ready Promise to resolve');
|
||||
|
||||
promise_test(t => {
|
||||
const ws = new WritableStream();
|
||||
const writer = ws.getWriter();
|
||||
writer.releaseLock();
|
||||
return promise_rejects(t, new TypeError(), writer.write(), 'write should reject');
|
||||
}, 'writing to a released writer should reject the returned promise');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
flake8==3.6.0
|
||||
flake8==3.7.6
|
||||
pycodestyle==2.5.0
|
||||
pyflakes==2.1.0
|
||||
pep8-naming==0.7.0
|
||||
|
|
|
@ -5,6 +5,11 @@ import tarfile
|
|||
import zipfile
|
||||
from io import BytesIO
|
||||
|
||||
try:
|
||||
from typing import Any
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -289,7 +289,7 @@ def run_tests(config, test_paths, product, **kwargs):
|
|||
logger.suite_end()
|
||||
if repeat_until_unexpected and unexpected_total > 0:
|
||||
break
|
||||
if len(test_loader.test_ids) == skipped_tests:
|
||||
if repeat_count == 1 and len(test_loader.test_ids) == skipped_tests:
|
||||
break
|
||||
|
||||
if test_total == 0:
|
||||
|
|
|
@ -90,7 +90,7 @@ test(() => {
|
|||
const table = new WebAssembly.Table(argument);
|
||||
assert_equal_to_array(table, nulls(5), "before");
|
||||
|
||||
const result = table.grow(3, {});
|
||||
const result = table.grow(3, null, {});
|
||||
assert_equals(result, 5);
|
||||
assert_equal_to_array(table, nulls(8), "after");
|
||||
}, "Stray argument");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue