Auto merge of #26507 - servo-wpt-sync:wpt_update_13-05-2020, r=servo-wpt-sync

Sync WPT with upstream (13-05-2020)

Automated downstream sync of changes from upstream as of 13-05-2020.
[no-wpt-sync]
r? @servo-wpt-sync
This commit is contained in:
bors-servo 2020-05-13 07:07:06 -04:00 committed by GitHub
commit c01f22d311
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
239 changed files with 2991 additions and 916 deletions

View file

@ -1,4 +0,0 @@
[hit-test-floats-002.html]
[Hit test float]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-004.html]
[Miss float below something else]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-005.html]
[Miss clipped float]
expected: FAIL

View file

@ -1,2 +0,0 @@
[mix-blend-mode-animation.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[image-resolution-001.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-002.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-003.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-004.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-005.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-006.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-007.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-008.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-009.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-010.html]
expected: FAIL

View file

@ -2,18 +2,3 @@
[listeners are called when <iframe> is resized]
expected: FAIL
[listeners are called correct number of times]
expected: FAIL
[removing listener from one MQL doesn't remove it from all MQLs]
expected: FAIL
[listeners are called in order they were added]
expected: FAIL
[listeners are called in order their MQLs were created]
expected: FAIL
[listener that was added twice is called only once]
expected: FAIL

View file

@ -0,0 +1,4 @@
[elementFromPoint-001.html]
[CSSOM View - 5 - extensions to the Document interface]
expected: FAIL

View file

@ -17,6 +17,3 @@
[test the top of layer]
expected: FAIL
[test some point of the element: top left corner]
expected: FAIL

View file

@ -312,24 +312,15 @@
[Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK]
expected: NOTRUN
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<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;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL

View file

@ -53,12 +53,6 @@
[combined text/javascript ]
expected: FAIL
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL
[separate text/javascript error]
[separate text/javascript;charset=windows-1252 text/javascript]
expected: FAIL

View file

@ -8,6 +8,9 @@
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL
[X-Content-Type-Options%3A%0D%0AX-Content-Type-Options%3A%20nosniff]
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
expected: FAIL
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
expected: FAIL

View file

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

View file

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

View file

@ -1,2 +1,5 @@
[iframe_sandbox_popups_escaping-1.html]
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT

View file

@ -1,5 +1,5 @@
[iframe_sandbox_popups_escaping-3.html]
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT

View file

@ -1,5 +1,5 @@
[iframe_sandbox_popups_nonescaping-2.html]
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN

View file

@ -1,5 +1,5 @@
[iframe_sandbox_popups_nonescaping-3.html]
expected: TIMEOUT
expected: CRASH
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN

View file

@ -3,6 +3,3 @@
[The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: TIMEOUT
[The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: FAIL

View file

@ -1,9 +1,10 @@
[promise-job-entry.html]
expected: TIMEOUT
[Fulfillment handler on fulfilled promise]
expected: FAIL
[Rejection handler on pending-then-rejected promise]
expected: FAIL
expected: TIMEOUT
[Sanity check: this all works as expected with no promises involved]
expected: FAIL
@ -15,5 +16,5 @@
expected: FAIL
[Fulfillment handler on pending-then-fulfilled promise]
expected: FAIL
expected: TIMEOUT

View file

@ -0,0 +1,7 @@
[k-rate-audioworklet-connections.https.html]
[Executing "Create Test Worklet"]
expected: FAIL
[Executing "AudioWorklet k-rate AudioParam"]
expected: FAIL

View file

@ -1,5 +0,0 @@
[017.html]
expected: TIMEOUT
[origin of the script that invoked the method, about:blank]
expected: TIMEOUT

File diff suppressed because it is too large Load diff

View file

@ -1,4 +0,0 @@
[hit-test-floats-002.html]
[Hit test float]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-004.html]
[Miss float below something else]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-005.html]
[Miss clipped float]
expected: FAIL

View file

@ -1,16 +0,0 @@
[math-script-level-001.tentative.html]
[Initial value of math-script-level]
expected: FAIL
[Specified math-script-level: auto]
expected: FAIL
[Inherited values of math-script-level]
expected: FAIL
[Specified math-script-level: add(<integer>)]
expected: FAIL
[Specified math-script-level: <integer>]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-001.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-002.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-003.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-004.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-005.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-006.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-007.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-008.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-009.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[image-resolution-010.html]
expected: FAIL

View file

@ -2,3 +2,6 @@
[Hit test intersecting scaled box]
expected: FAIL
[Hit test within unscaled box]
expected: FAIL

View file

@ -2,6 +2,3 @@
[listeners are called when <iframe> is resized]
expected: FAIL
[listeners are called correct number of times]
expected: FAIL

View file

@ -0,0 +1,4 @@
[elementFromPoint-001.html]
[CSSOM View - 5 - extensions to the Document interface]
expected: FAIL

View file

@ -21,6 +21,3 @@
[test the top of layer]
expected: FAIL
[test some point of the element: top left corner]
expected: FAIL

View file

@ -312,24 +312,15 @@
[fetch(): separate response Content-Type: text/plain ]
expected: NOTRUN
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<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;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL

View file

@ -53,12 +53,6 @@
[combined text/javascript ]
expected: FAIL
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL
[separate text/javascript error]
[separate text/javascript;charset=windows-1252 text/javascript]
expected: FAIL

View file

@ -8,6 +8,9 @@
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL
[X-Content-Type-Options%3A%0D%0AX-Content-Type-Options%3A%20nosniff]
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
expected: FAIL
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
expected: FAIL

View file

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

View file

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

View file

@ -1,6 +1,6 @@
[iframe_sandbox_popups_escaping-1.html]
type: testharness
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT

View file

@ -1,6 +1,6 @@
[iframe_sandbox_popups_escaping-3.html]
type: testharness
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT

View file

@ -1,6 +1,6 @@
[iframe_sandbox_popups_nonescaping-2.html]
type: testharness
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN

View file

@ -1,6 +1,6 @@
[iframe_sandbox_popups_nonescaping-3.html]
type: testharness
expected: TIMEOUT
expected: CRASH
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN

View file

@ -4,6 +4,3 @@
[The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: TIMEOUT
[The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: FAIL

View file

@ -1,9 +1,10 @@
[promise-job-entry.html]
expected: TIMEOUT
[Fulfillment handler on fulfilled promise]
expected: FAIL
[Rejection handler on pending-then-rejected promise]
expected: FAIL
expected: TIMEOUT
[Sanity check: this all works as expected with no promises involved]
expected: FAIL
@ -15,5 +16,5 @@
expected: FAIL
[Fulfillment handler on pending-then-fulfilled promise]
expected: FAIL
expected: TIMEOUT

View file

@ -0,0 +1,7 @@
[k-rate-audioworklet-connections.https.html]
[Executing "Create Test Worklet"]
expected: FAIL
[Executing "AudioWorklet k-rate AudioParam"]
expected: FAIL

View file

@ -1,5 +0,0 @@
[017.html]
expected: TIMEOUT
[origin of the script that invoked the method, about:blank]
expected: TIMEOUT

View file

@ -81,7 +81,7 @@ jobs:
name: test_jobs
displayName: 'Run ./wpt test-jobs'
- job: infrastructure_macOS
- job: infrastructure_mac
displayName: 'infrastructure/ tests: macOS'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_infrastructure']
@ -114,7 +114,7 @@ jobs:
artifactName: 'infrastructure'
condition: always()
- job: tools_unittest_macOS
- job: tools_unittest_mac
displayName: 'tools/ unittests: macOS'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
@ -132,8 +132,8 @@ jobs:
directory: tools/
toxenv: py27
- job: tools_unittest_macOS_py3
displayName: 'tools/ unittests: macOS (Python 3.6)'
- job: tools_unittest_mac_py36
displayName: 'tools/ unittests: macOS + Python 3.6'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
@ -148,8 +148,8 @@ jobs:
directory: tools/
toxenv: py36
- job: tools_unittest_macOS_py38
displayName: 'tools/ unittests: macOS (Python 3.8)'
- job: tools_unittest_mac_py38
displayName: 'tools/ unittests: macOS + Python 3.8'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
@ -164,7 +164,7 @@ jobs:
directory: tools/
toxenv: py38
- job: wptrunner_unittest_macOS
- job: wptrunner_unittest_mac
displayName: 'tools/wptrunner/ unittests: macOS'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
@ -182,8 +182,8 @@ jobs:
directory: tools/wptrunner/
toxenv: py27
- job: wptrunner_unittest_macOS_py3
displayName: 'tools/wptrunner/ unittests: macOS (Python 3.6)'
- job: wptrunner_unittest_mac_py36
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.6'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
@ -198,8 +198,8 @@ jobs:
directory: tools/wptrunner/
toxenv: py36
- job: wptrunner_unittest_macOS_py38
displayName: 'tools/wptrunner/ unittests: macOS (Python 3.8)'
- job: wptrunner_unittest_mac_py38
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.8'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
@ -214,7 +214,7 @@ jobs:
directory: tools/wptrunner/
toxenv: py38
- job: wpt_integration_macOS
- job: wpt_integration_mac
displayName: 'tools/wpt/ tests: macOS'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
@ -236,8 +236,8 @@ jobs:
directory: tools/wpt/
toxenv: py27
- job: wpt_integration_macOS_py3
displayName: 'tools/wpt/ tests: macOS (Python 3.6)'
- job: wpt_integration_mac_py36
displayName: 'tools/wpt/ tests: macOS + Python 3.6'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
@ -247,10 +247,6 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6.x'
# Python 2.7 still needed to update manifest.
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7.x'
- template: tools/ci/azure/install_chrome.yml
- template: tools/ci/azure/install_firefox.yml
- template: tools/ci/azure/update_hosts.yml
@ -260,8 +256,8 @@ jobs:
directory: tools/wpt/
toxenv: py36
- job: wpt_integration_macOS_py38
displayName: 'tools/wpt/ tests: macOS (Python 3.8)'
- job: wpt_integratio_mac_py38
displayName: 'tools/wpt/ tests: macOS + Python 3.8'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
@ -271,10 +267,6 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8.x'
# Python 2.7 still needed to update manifest.
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7.x'
- template: tools/ci/azure/install_chrome.yml
- template: tools/ci/azure/install_firefox.yml
- template: tools/ci/azure/update_hosts.yml
@ -302,8 +294,8 @@ jobs:
directory: tools/
toxenv: py27
- job: tools_unittest_win_py3
displayName: 'tools/ unittests: Windows (Python 3.6)'
- job: tools_unittest_win_py36
displayName: 'tools/ unittests: Windows + Python 3.6'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
@ -322,7 +314,7 @@ jobs:
toxenv: py36
- job: tools_unittest_win_py38
displayName: 'tools/ unittests: Windows (Python 3.8)'
displayName: 'tools/ unittests: Windows + Python 3.8'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
@ -356,8 +348,8 @@ jobs:
directory: tools/wptrunner/
toxenv: py27
- job: wptrunner_unittest_win_py3
displayName: 'tools/wptrunner/ unittests: Windows (Python 3.6)'
- job: wptrunner_unittest_win_py36
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.6'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
@ -374,7 +366,7 @@ jobs:
toxenv: py36
- job: wptrunner_unittest_win_py38
displayName: 'tools/wptrunner/ unittests: Windows (Python 3.8)'
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.8'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
@ -414,8 +406,8 @@ jobs:
directory: tools/wpt/
toxenv: py27
- job: wpt_integration_win_py3
displayName: 'tools/wpt/ tests: Windows (Python 3.6)'
- job: wpt_integration_win_py36
displayName: 'tools/wpt/ tests: Windows + Python 3.6'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
@ -425,12 +417,6 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6.x'
addToPath: false
# Python 2.7 still needed to update manifest.
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7.x'
addToPath: true
# currently just using the outdated Chrome/Firefox on the VM rather than
# figuring out how to install Chrome Dev channel on Windows
# - template: tools/ci/azure/install_chrome.yml
@ -443,7 +429,7 @@ jobs:
toxenv: py36
- job: wpt_integration_win_py38
displayName: 'tools/wpt/ tests: Windows (Python 3.8)'
displayName: 'tools/wpt/ tests: Windows + Python 3.8'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
@ -453,12 +439,6 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8.x'
addToPath: false
# Python 2.7 still needed to update manifest.
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7.x'
addToPath: true
# currently just using the outdated Chrome/Firefox on the VM rather than
# figuring out how to install Chrome Dev channel on Windows
# - template: tools/ci/azure/install_chrome.yml

View file

@ -191,24 +191,6 @@ promise_test(async testCase => {
assert_array_equals(Object.keys(cookie).sort(), kCookieListItemKeys);
}, 'CookieListItem - cookieStore.set adds / to path if it does not end with /');
promise_test(async testCase => {
await cookieStore.delete('cookie-name');
await cookieStore.set('cookie-name', 'cookie-value', { secure: false });
testCase.add_cleanup(async () => {
await cookieStore.delete('cookie-name');
});
const cookie = await cookieStore.get('cookie-name');
assert_equals(cookie.name, 'cookie-name');
assert_equals(cookie.value, 'cookie-value');
assert_equals(cookie.domain, null);
assert_equals(cookie.path, '/');
assert_equals(cookie.expires, null);
assert_equals(cookie.secure, false);
assert_equals(cookie.sameSite, 'strict');
assert_array_equals(Object.keys(cookie).sort(), kCookieListItemKeys);
}, 'CookieListItem - cookieStore.set with secure set to false');
['strict', 'lax', 'none'].forEach(sameSiteValue => {
promise_test(async testCase => {
await cookieStore.delete('cookie-name');

View file

@ -1,22 +0,0 @@
// META: title=Cookie Store API: cookieStore.delete() with insecure cookies
// META: global=window,serviceworker
'use strict';
promise_test(async t => {
await cookieStore.set('cookie-name', 'cookie-value', { secure: false });
t.add_cleanup(async () => { await cookieStore.delete('cookie-name'); });
await cookieStore.delete('cookie-name');
const cookie = await cookieStore.get('cookie-name');
assert_equals(cookie, null);
}, 'cookieStore.delete(name) can delete an insecure cookie');
promise_test(async t => {
await cookieStore.set('cookie-name', 'cookie-value', { secure: false });
t.add_cleanup(async () => { await cookieStore.delete('cookie-name'); });
await cookieStore.delete({ name: 'cookie-name' });
const cookie = await cookieStore.get('cookie-name');
assert_equals(cookie, null);
}, 'cookieStore.delete(options) can delete an insecure cookie');

View file

@ -1,65 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>math-script-level</title>
<meta charset="utf-8">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
<meta name="assert" content="Check the resolved value of math-script-level">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function mathScriptLevel(id) {
return window.getComputedStyle(document.getElementById(id)).
getPropertyValue("math-script-level");
}
setup({ explicit_done: true });
window.addEventListener("load", function() {
test(function() {
assert_equals(mathScriptLevel("initial"), "0");
assert_equals(mathScriptLevel("initialFrom11"), "0");
}, "Initial value of math-script-level");
test(function() {
assert_equals(mathScriptLevel("inherited11"), "11");
assert_equals(mathScriptLevel("inherited-7"), "-7");
}, "Inherited values of math-script-level");
test(function() {
assert_equals(mathScriptLevel("inherited9specifiedAutoInline"), "10");
assert_equals(mathScriptLevel("inherited9specifiedAutoDisplay"), "9");
}, "Specified math-script-level: auto");
test(function() {
assert_equals(mathScriptLevel("specified11"), "11");
assert_equals(mathScriptLevel("specified-7"), "-7");
}, "Specified math-script-level: <integer>");
test(function() {
assert_equals(mathScriptLevel("specifiedAdd10From5"), "15");
assert_equals(mathScriptLevel("specifiedAdd-15From5"), "-10");
}, "Specified math-script-level: add(<integer>)");
done();
});
</script>
</head>
<body>
<div id="log"></div>
<div id="initial"></div>
<div id="specified11" style="math-script-level: 11">
<div id="initialFrom11" style="math-script-level: initial"></div>
<div id="inherited11"></div>
</div>
<div id="specified-7" style="math-script-level: -7">
<div id="inherited-7"></div>
</div>
<div style="math-script-level: 9">
<div style="math-style: inline">
<div id="inherited9specifiedAutoInline" style="math-script-level: auto" ></div>
</div>
<div style="math-style: display">
<div id="inherited9specifiedAutoDisplay" style="math-script-level: auto" ></div>
</div>
</div>
<div style="math-script-level: 5">
<div id="specifiedAdd10From5" style="math-script-level: add(10)"></div>
<div id="specifiedAdd-15From5" style="math-script-level: add(-15)"></div>
</div>
</body>
</html>

View file

@ -5,7 +5,8 @@
<meta charset="utf-8">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
<meta name="assert" content="Verify effect of math-script-level auto | add(<integer>) | <integer>, starting from different values of math-script-level.">
<link rel="help" href="https://www.w3.org/TR/cssom-1/#serialize-a-css-component-value">
<meta name="assert" content="Verify effect of font-size: scriptlevel(auto) | scriptlevel(add(<integer>)) | scriptlevel(<integer>), starting from different values of math-script-level.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
@ -17,6 +18,7 @@
}
</style>
<script>
var epsilon = .1;
function fontSize(id) {
return parseFloat((/(.+)px/).exec(getComputedStyle(document.getElementById(id)).getPropertyValue("font-size"))[1]);
}
@ -25,11 +27,12 @@
document.fonts.ready.then(function() {
test(function() {
assert_equals(fontSize("autoDisplay"), 200);
assert_equals(fontSize("autoInline"), 355);
assert_equals(fontSize("autoInline"), 500 * .71);
}, "auto");
test(function() {
assert_equals(fontSize("autoDisplayFrom7"), 200);
assert_equals(fontSize("autoInlineFrom7"), 355);
var initialSize = 2000 * Math.pow(.71, 7);
assert_approx_equals(fontSize("autoDisplayFrom7"), initialSize, epsilon);
assert_approx_equals(fontSize("autoInlineFrom7"), initialSize * .71, epsilon);
}, "auto ; starting from level 7");
test(function() {
assert_equals(fontSize("add0"), 200);
@ -78,111 +81,111 @@
<div class="container">
<div>
<div style="font-size: 200px; math-style: display">
<div id="autoDisplay" style="math-script-level: auto"></div>
<div id="autoDisplay" style="font-size: scriptlevel(auto)"></div>
</div>
<div style="font-size: 500px; math-style: inline">
<div id="autoInline" style="math-script-level: auto"></div>
<div id="autoInline" style="font-size: scriptlevel(auto)"></div>
</div>
</div>
<div>
<div style="font-size: 200px; math-style: display; math-script-level: 7">
<div id="autoDisplayFrom7" style="math-script-level: auto"></div>
<div style="font-size: 2000px;">
<div style="math-style: display; font-size: scriptlevel(7)">
<div id="autoDisplayFrom7" style="font-size: scriptlevel(auto)"></div>
</div>
<div style="font-size: 500px; math-style: inline; math-script-level: 7">
<div id="autoInlineFrom7" style="math-script-level: auto"></div>
<div style="math-style: inline; font-size: scriptlevel(7)">
<div id="autoInlineFrom7" style="font-size: scriptlevel(auto)"></div>
</div>
</div>
<div>
<div style="font-size: 200px">
<div id="add0" style="math-script-level: add(0)"></div>
<div id="add0" style="font-size: scriptlevel(add(0))"></div>
</div>
<div style="font-size: 71px">
<div id="add-1" style="math-script-level: add(-1)"></div>
<div id="add-1" style="font-size: scriptlevel(add(-1))"></div>
</div>
<div style="font-size: 500px">
<div id="add1" style="math-script-level: add(1)"></div>
<div id="add1" style="font-size: scriptlevel(add(1))"></div>
</div>
<div style="font-size: 200px">
<div id="add-2" style="math-script-level: add(-2)"></div>
<div id="add-2" style="font-size: scriptlevel(add(-2))"></div>
</div>
<div style="font-size: 1000px">
<div id="add2" style="math-script-level: add(2)"></div>
<div id="add2" style="font-size: scriptlevel(add(2))"></div>
</div>
<div style="font-size: 30px">
<div id="add-9" style="math-script-level: add(-9)"></div>
<div id="add-9" style="font-size: scriptlevel(add(-9))"></div>
</div>
<div style="font-size: 2000px">
<div id="add9" style="math-script-level: add(9)"></div>
<div id="add9" style="font-size: scriptlevel(add(9))"></div>
</div>
</div>
<div>
<div style="font-size: 200px; math-script-level: 3;">
<div id="add0from3" style="math-script-level: add(0)"></div>
<div style="font-size: scriptlevel(3);">
<div style="font-size: 200px;">
<div id="add0from3" style="font-size: scriptlevel(add(0))"></div>
</div>
<div style="font-size: 71px; math-script-level: 3;">
<div id="add-1from3" style="math-script-level: add(-1)"></div>
<div style="font-size: 71px;">
<div id="add-1from3" style="font-size: scriptlevel(add(-1))"></div>
</div>
<div style="font-size: 500px; math-script-level: 3;">
<div id="add1from3" style="math-script-level: add(1)"></div>
<div style="font-size: 500px;">
<div id="add1from3" style="font-size: scriptlevel(add(1))"></div>
</div>
<div style="font-size: 200px; math-script-level: 3;">
<div id="add-2from3" style="math-script-level: add(-2)"></div>
<div style="font-size: 200px;">
<div id="add-2from3" style="font-size: scriptlevel(add(-2))"></div>
</div>
<div style="font-size: 1000px; math-script-level: 3;">
<div id="add2from3" style="math-script-level: add(2)"></div>
<div style="font-size: 1000px;">
<div id="add2from3" style="font-size: scriptlevel(add(2))"></div>
</div>
<div style="font-size: 30px; math-script-level: 3;">
<div id="add-9from3" style="math-script-level: add(-9)"></div>
<div style="font-size: 30px;">
<div id="add-9from3" style="font-size: scriptlevel(add(-9))"></div>
</div>
<div style="font-size: 2000px; math-script-level: 3;">
<div id="add9from3" style="math-script-level: add(9)"></div>
<div style="font-size: 2000px;">
<div id="add9from3" style="font-size: scriptlevel(add(9))"></div>
</div>
</div>
<div>
<div style="font-size: 200px">
<div id="set0" style="math-script-level: 0"></div>
<div id="set0" style="font-size: scriptlevel(0)"></div>
</div>
<div style="font-size: 71px">
<div id="set-1" style="math-script-level: -1"></div>
<div id="set-1" style="font-size: scriptlevel(-1)"></div>
</div>
<div style="font-size: 500px">
<div id="set1" style="math-script-level: 1"></div>
<div id="set1" style="font-size: scriptlevel(1)"></div>
</div>
<div style="font-size: 200px">
<div id="set-2" style="math-script-level: -2"></div>
<div id="set-2" style="font-size: scriptlevel(-2)"></div>
</div>
<div style="font-size: 1000px">
<div id="set2" style="math-script-level: 2"></div>
<div id="set2" style="font-size: scriptlevel(2)"></div>
</div>
<div style="font-size: 30px">
<div id="set-9" style="math-script-level: -9"></div>
<div id="set-9" style="font-size: scriptlevel(-9)"></div>
</div>
<div style="font-size: 2000px">
<div id="set9" style="math-script-level: 9"></div>
<div id="set9" style="font-size: scriptlevel(9)"></div>
</div>
</div>
</div>
<div>
<div style="font-size: 200px; math-script-level: 50">
<div id="set50" style="math-script-level: 50"></div>
<div style="font-size: scriptlevel(50)">
<div style="font-size: 200px;">
<div id="set50" style="font-size: scriptlevel(50)"></div>
</div>
<div style="font-size: 71px; math-script-level: 50">
<div id="set49" style="math-script-level: 49"></div>
<div style="font-size: 71px;">
<div id="set49" style="font-size: scriptlevel(49)"></div>
</div>
<div style="font-size: 500px; math-script-level: 50">
<div id="set51" style="math-script-level: 51"></div>
<div style="font-size: 500px;">
<div id="set51" style="font-size: scriptlevel(51)"></div>
</div>
<div style="font-size: 200px; math-script-level: 50">
<div id="set48" style="math-script-level: 48"></div>
<div style="font-size: 200px;">
<div id="set48" style="font-size: scriptlevel(48)"></div>
</div>
<div style="font-size: 1000px; math-script-level: 50">
<div id="set52" style="math-script-level: 52"></div>
<div style="font-size: 1000px;">
<div id="set52" style="font-size: scriptlevel(52)"></div>
</div>
<div style="font-size: 30px; math-script-level: 50">
<div id="set41" style="math-script-level: 41"></div>
<div style="font-size: 30px;">
<div id="set41" style="font-size: scriptlevel(41)"></div>
</div>
<div style="font-size: 2000px; math-script-level: 50">
<div id="set59" style="math-script-level: 59"></div>
<div style="font-size: 2000px;">
<div id="set59" style="font-size: scriptlevel(59)"></div>
</div>
</div>
</div>

View file

@ -1,25 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>math-script-level</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
.container {
/* Ahem font does not have a MATH table so the font-size scale factor
is always 0.71^{computed - inherited math script level} */
font: 100px/1 Ahem;
}
</style>
</head>
<body>
<p>Test passes if you see two squares of side 100px.</p>
<div class="container">
<div>X</div>
</div>
<br/>
<div class="container">
<div>X</div>
</div>
</body>
</html>

View file

@ -1,29 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>math-script-level</title>
<meta charset="utf-8">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
<meta name="assert" content="If font-size is specified or if the specified value of math-script-level is initial then math-script-level does not affect the computed value of font-size.">
<link rel="match" href="math-script-level-003.tentative-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
.container {
/* Ahem font does not have a MATH table so the font-size scale factor
is always 0.71^{computed - inherited math script level} */
font: 100px/1 Ahem;
}
</style>
</head>
<body>
<p>Test passes if you see two squares of side 100px.</p>
<div class="container" style="math-script-level: 3;">
<div style="math-script-level: 9; font-size: 100px;">X</div>
</div>
<br/>
<div class="container" style="math-script-level: 3;">
<div style="math-script-level: initial;">X</div>
</div>
</body>
</html>

View file

@ -37,13 +37,13 @@
}
.big { font-size: 3000px; }
.small { font-size: 150px; }
.level-3 { math-script-level: -3; }
.level-1 { math-script-level: -1; }
.level0 { math-script-level: 0; }
.level1 { math-script-level: 1; }
.level2 { math-script-level: 2; }
.level3 { math-script-level: 3; }
.level5 { math-script-level: 5; }
.level-3 { font-size: scriptlevel(-3); }
.level-1 { font-size: scriptlevel(-1); }
.level0 { font-size: scriptlevel(0); }
.level1 { font-size: scriptlevel(1); }
.level2 { font-size: scriptlevel(2); }
.level3 { font-size: scriptlevel(3); }
.level5 { font-size: scriptlevel(5); }
</style>
<script>
const big = 3000;
@ -53,10 +53,6 @@
// Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
});
function mathScriptLevel(element) {
return window.getComputedStyle(element).
getPropertyValue("math-script-level");
}
function fontSize(element) {
return parseFloat((/(.+)px/).exec(getComputedStyle(element).
getPropertyValue("font-size"))[1]);
@ -66,7 +62,6 @@
for (var level in sizes) {
var divs = container.getElementsByClassName(`level${level}`);
for (var i = 0; i < divs.length; i++) {
assert_equals(mathScriptLevel(divs[i]), level);
assert_approx_equals(fontSize(divs[i]), sizes[level], 1, `Wrong font-size (id=${id} ; level=${level} ; i=${i})`);
}
}
@ -166,7 +161,8 @@
<body>
<div id="log"></div>
<div class="level-3 big" id="scale80-40-scaledown">
<div class="level-3" id="scale80-40-scaledown">
<div class="big">
<div class="level5"><!-- -3 to 5 --></div>
<div class="level3"><!-- -3 to 3 --></div>
<div class="level2"><!-- -3 to 2 --></div>
@ -194,8 +190,10 @@
</div>
</div>
</div>
</div>
<div class="level5 small" id="scale80-40-scaleup">
<div class="level5" id="scale80-40-scaleup">
<div class="small">
<div class="level-3"><!-- 5 to -3 --></div>
<div class="level-1"><!-- 5 to -1 --></div>
<div class="level0"><!-- 5 to 0 --></div>
@ -223,8 +221,10 @@
</div>
</div>
</div>
</div>
<div class="level-3 big" id="scale0-40-scaledown">
<div class="level-3" id="scale0-40-scaledown">
<div class="big">
<div class="level5"><!-- -3 to 5 --></div>
<div class="level3"><!-- -3 to 3 --></div>
<div class="level2"><!-- -3 to 2 --></div>
@ -252,8 +252,10 @@
</div>
</div>
</div>
</div>
<div class="level5 small" id="scale0-40-scaleup">
<div class="level5" id="scale0-40-scaleup">
<div class="small">
<div class="level-3"><!-- 5 to -3 --></div>
<div class="level-1"><!-- 5 to -1 --></div>
<div class="level0"><!-- 5 to 0 --></div>
@ -281,8 +283,10 @@
</div>
</div>
</div>
</div>
<div class="level-3 big" id="scale80-0-scaledown">
<div class="level-3" id="scale80-0-scaledown">
<div class="big">
<div class="level5"><!-- -3 to 5 --></div>
<div class="level3"><!-- -3 to 3 --></div>
<div class="level2"><!-- -3 to 2 --></div>
@ -310,8 +314,10 @@
</div>
</div>
</div>
</div>
<div class="level5 small" id="scale80-0-scaleup">
<div class="level5" id="scale80-0-scaleup">
<div class="small">
<div class="level-3"><!-- 5 to -3 --></div>
<div class="level-1"><!-- 5 to -1 --></div>
<div class="level0"><!-- 5 to 0 --></div>
@ -339,8 +345,10 @@
</div>
</div>
</div>
</div>
<div class="level-3 big" id="default-scaledown">
<div class="level-3" id="default-scaledown">
<div class="big">
<div class="level5"><!-- -3 to 5 --></div>
<div class="level3"><!-- -3 to 3 --></div>
<div class="level2"><!-- -3 to 2 --></div>
@ -368,8 +376,10 @@
</div>
</div>
</div>
</div>
<div class="level5 small" id="default-scaleup">
<div class="level5" id="default-scaleup">
<div class="small">
<div class="level-3"><!-- 5 to -3 --></div>
<div class="level-1"><!-- 5 to -1 --></div>
<div class="level0"><!-- 5 to 0 --></div>
@ -397,6 +407,7 @@
</div>
</div>
</div>
</div>
</body>
</html>

View file

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>math-script-level</title>
<meta charset="utf-8">
</head>
</head>
<body>
<p>Test passes if you see two lines of monospace text rendered with the same font-size:</p>
<div style="font-size: xx-large; font-family: serif">
<div style="font-family: monospace;">
<div>level 0</div>
</div>
<div style="font-family: monospace;">
<div>level 1</div>
</div>
</div>
</body>
</html>

View file

@ -1,24 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>math-script-level</title>
<meta charset="utf-8">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3906">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
<meta name="assert" content="If the computed font-size is changed because of font-family change, math-script-level does not affect the computed value of font-size.">
<link rel="match" href="math-script-level-005.tentative-ref.html">
</head>
</head>
<body>
<p>Test passes if you see two lines of monospace text rendered with the same font-size:</p>
<div style="font-size: xx-large; font-family: serif">
<div style="font-family: monospace;">
<div>level 0</div>
</div>
<div style="math-script-level: 1; font-family: monospace;">
<div>level 1</div>
</div>
</div>
</body>
</html>

View file

@ -6,7 +6,7 @@
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
<meta name="assert" content="If math-script-level is 'auto' and the inherited value of math-style is 'display' then the computed value of math-script-level is the inherited value.">
<meta name="assert" content="If font-size is scriptlevel('auto') and the inherited value of math-style is 'display' then the internal scriptlevel is the one of its parent.">
<link rel="match" href="math-script-level-auto-and-math-style-001.tentative-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
@ -20,7 +20,7 @@
<body>
<p>Test passes if you see a square of side 100 × 0.71^(0 0) = 100px.</p>
<div class="container" style="math-style: display;">
<div style="math-script-level: auto">X</div>
<div style="font-size: scriptlevel(auto)">X</div>
</div>
</body>
</html>

View file

@ -6,7 +6,7 @@
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
<meta name="assert" content="If math-script-level is 'auto' and the inherited value of math-style is 'inline' then the computed value of math-script-level is the inherited value plus one.">
<meta name="assert" content="If font-size is scriptlevel('auto') and the inherited value of math-style is 'inline' then the internal scriptlevel is the one of its parent.">
<link rel="match" href="math-script-level-auto-and-math-style-002.tentative-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
@ -20,7 +20,7 @@
<body>
<p>Test passes if you see a square of side 500 × 0.71^(1 0) = 355px.</p>
<div class="container" style="math-style: inline;">
<div style="math-script-level: auto">X</div>
<div style="font-size: scriptlevel(auto)">X</div>
</div>
</body>
</html>

View file

@ -20,7 +20,7 @@
<body>
<p>Test passes if you see a square of side 500 × 0.71^(1 0) = 355px.</p>
<div class="container">
<div style="math-script-level: auto">X</div>
<div style="font-size: scriptlevel(auto)">X</div>
</div>
</body>
</html>

View file

@ -22,7 +22,7 @@
<div class="container">
<div style="math-style: display">
<div style="math-style: initial">
<div style="math-script-level: auto">X</div>
<div style="font-size: scriptlevel(auto)">X</div>
</div>
</div>
</div>

View file

@ -23,7 +23,7 @@
<div style="math-style: display;">
<div>
<div>
<div style="math-script-level: auto">X</div>
<div style="font-size: scriptlevel(auto)">X</div>
</div>
</div>
</div>

View file

@ -19,8 +19,8 @@
<body>
<p>Test passes if you see a square of side 12px.</p>
<div class="container"><!-- Initial size is 12px. -->
<div style="math-script-level: add(8);"><!-- Size is 12*.71^8 = 0.7749042374949131 < 1px. -->
<div style="math-script-level: add(-8);">X</div><!-- back to 12px. -->
<div style="font-size: scriptlevel(add(8));"><!-- Size is 12*.71^8 = 0.7749042374949131 < 1px. -->
<div style="font-size: scriptlevel(add(-8));">X</div><!-- back to 12px. -->
</div>
</div>
</body>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image-resolution set manually</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="../reference/100x100-blue.html">
<style>
img {
image-resolution: 14.4dpi;
}
</style>
</head>
<body>
<img src="../support/swatch-blue.png" />
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image-resolution scaling up from image</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="../reference/100x100-blue.html">
<style>
img {
image-resolution: from-image;
}
</style>
</head>
<body>
<img src="support/swatch-blue-48dpi.png" />
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image-resolution scaling down from image</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="../reference/100x100-blue.html">
<style>
img {
image-resolution: from-image;
}
</style>
</head>
<body>
<img src="support/swatch-blue-192dpi.png" />
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: units in filters are not affected by manual image-resolution</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="reference/100x100-blue-blur4px.html">
<style>
img {
image-resolution: 14.4dpi;
filter: blur(4px);
}
</style>
</head>
<body>
<img src="../support/swatch-blue.png" />
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: units in filters are not affected by image-resolution</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="reference/100x100-blue-blur4px.html">
<style>
img {
image-resolution: from-image;
filter: blur(4px);
}
</style>
</head>
<body>
<img src="support/swatch-blue-48dpi.png" />
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: units in filters are not affected by image-resolution</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="reference/100x100-blue-blur4px.html">
<style>
img {
image-resolution: from-image;
filter: blur(4px);
}
</style>
</head>
<body>
<img src="support/swatch-blue-192dpi.png" />
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image-resolution scaling from image with animorphic aspect ratio</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="../reference/100x100-blue.html">
<style>
img {
image-resolution: from-image;
}
</style>
</head>
<body>
<img src="support/swatch-blue-48x192dpi.png" />
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image-resolution set manually applies to background images</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="../reference/100x100-blue.html">
<style>
div {
width: 100px;
height: 100px;
image-resolution: 14.4dpi;
background: url("../support/swatch-blue.png") top left no-repeat;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image-resolution from images applies to background images</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="../reference/100x100-blue.html">
<style>
div {
width: 100px;
height: 100px;
image-resolution: from-image;
background: url("support/swatch-blue-48dpi.png") top left no-repeat;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image-resolution set manually applies to background images and filters are unaffected</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="reference/100x100-blue-blur4px.html">
<style>
div {
width: 100px;
height: 100px;
image-resolution: 14.4dpi;
background: url("../support/swatch-blue.png") top left no-repeat;
filter: blur(4px);
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: image-resolution set manually applies to background images and filters are unaffected</title>
<link rel="author" title="Mike Bremford" href="http://bfo.com/">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<link rel="match" href="reference/100x100-blue-blur4px.html">
<style>
div {
width: 100px;
height: 100px;
/* Not exactly an image-resolution test, but confirming that background-size is applied before filter */
background: url("../support/swatch-blue.png") top left / 100px 100px no-repeat;
filter: blur(4px);
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View file

@ -0,0 +1,2 @@
<!doctype html>
<div style="width: 100px;height: 100px;background-color: blue;filter:blur(4px)"></div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,54 @@
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
body {
margin: 0px;
height: 2000px;
width: 2000px;
}
#first {
height: 1000px;
background-color: #FFA5D2;
}
#anchor {
position: absolute;
background-color: #84BE6A;
height: 600px;
width: 100%;
}
#fragment {
position: relative;
background-color: orange;
height: 200px;
width: 200px;
margin: 10px;
}
</style>
<div id="first"></div>
<div id="changer"></div>
<div id="anchor">
<div id="fragment" name="fragment"></div>
</div>
<script>
test(function(t) {
// Note that this test passes even without scroll anchoring because of
// fragment anchoring.
window.location.hash = 'fragment';
// Height of first + fragment margin-top.
assert_equals(window.scrollY, 1010);
// Change height of content above fragment.
var ch = document.getElementById('changer');
ch.style.height = 100;
// Height of first + height changer + fragment margin-top.
assert_equals(window.scrollY, 1110);
}, 'Verify scroll anchoring interaction with fragment scrolls');
</script>

View file

@ -0,0 +1,50 @@
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
body {
margin: 0px;
height: 2000px;
width: 2000px;
}
#first {
height: 1000px;
background-color: #FFA5D2;
}
#anchor {
position: absolute;
background-color: #84BE6A;
height: 600px;
width: 100%;
}
</style>
<div id="first"></div>
<div id="changer"></div>
<div id="anchor"></div>
<script>
// Navigation steps:
// 1- page gets loaded and anchor element gets scrolled into view.
// 2- loaded page refreshed.
async_test(function(t) {
if (window.name == 'second/load') {
assert_equals(window.scrollY, 1000);
// Change height of content above anchor.
var ch = document.getElementById('changer');
ch.style.height = 100;
// Height of first + height changer.
assert_equals(window.scrollY, 1100)
t.done();
} else {
var anchor = document.getElementById('anchor');
anchor.scrollIntoView();
assert_equals(window.scrollY, 1000);
window.name = "second/load";
window.location.reload();
}
}, 'Verify scroll anchoring interaction with history restoration');
</script>

View file

@ -0,0 +1,25 @@
<!doctype html>
<html class="test-wait">
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=746570">
<meta name="assert" content="No crash when a table with dirty internal layout is the scroll anchor."/>
<style>
body {
height:200vh;
}
table {
height: 200px;
width: 200px;
background-color: lime;
border-collapse: collapse; /* triggers problematic border calculation */
}
</style>
<table id=table1></table>
<script>
window.scrollBy(0, 10);
table1.innerHTML = "<tr><td style='background-color:lightblue'></td></tr>";
document.documentElement.classList.remove('test-wait');
</script>
</html>

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<title>CSS Basic User Interface Test: outline-width very big value</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-ui/#outline-width">
<div style="outline: solid black 100000000000000000px;"></div>

View file

@ -18,10 +18,12 @@ To make writing such tests possible, we are using a number of
server-side components designed to make it easy to manipulate the
precise details of the response:
* *wptserve*, a custom Python HTTP server.
* *wptserve*, a custom Python HTTP server
* *pywebsocket*, an existing websockets server
* *tools/quic*, a custom Python 3 QUIC server using `aioquic`
wptserve is a Python-based web server. By default it serves static
files in the test suite. For more sophisticated requirements, several
mechanisms are available to take control of the response. These are
@ -116,7 +118,8 @@ The server also provides the ability to write [Python
data and can manipulate the content and timing of the response. Responses are
also influenced by [the `pipe` query string parameter](server-pipes).
### Writing tests for HTTP/2.0
### Tests Requiring HTTP/2.0
The server now has a prototype HTTP/2.0 server which gives you access to
some of the HTTP/2.0 specific functionality. Currently, the server is off
@ -126,4 +129,27 @@ API are documented in [Writing H2 Tests](h2tests).
> <b>Important:</b> The HTTP/2.0 server requires you to have Python 2.7.10+
and OpenSSL 1.0.2+. This is because HTTP/2.0 is negotiated using the
[TLS ALPN](https://tools.ietf.org/html/rfc7301) extension, which is only supported in [OpenSSL 1.0.2](https://www.openssl.org/news/openssl-1.0.2-notes.html) and up.
[TLS ALPN](https://tools.ietf.org/html/rfc7301) extension, which is only
supported in
[OpenSSL 1.0.2](https://www.openssl.org/news/openssl-1.0.2-notes.html) and up.
### Tests Requiring QUIC
We do not support loading a test over QUIC yet, but a test can establish a QUIC
connection to the test server (e.g. for WebTransport, similar to WebSocket).
Since the QUIC server is not yet enabled by default, tests must explicitly
declare that they need access to the QUIC server:
* For HTML tests (including testharness.js and reference tests), add the
following element:
```html
<meta name="quic" content="true">
```
* For JavaScript tests (auto-generated tests), add the following comment:
```js
// META: quic=true
```
The QUIC server is not yet enabled by default, so QUIC tests will be skipped
unless `--enable-quic` is specified to `./wpt run`.

View file

@ -0,0 +1,14 @@
<!doctype html>
<title>en windows-1252</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<p>Ive made an encoding test.</p>
<script>
setup({explicit_done:true});
onload = function() {
test(function() {
assert_equals(document.characterSet, "windows-1252", 'Expected windows-1252');
}, "Check detection result");
done();
};
</script>

View file

@ -0,0 +1,14 @@
<!doctype html>
<title>es windows-1252</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<p></p>
<script>
setup({explicit_done:true});
onload = function() {
test(function() {
assert_equals(document.characterSet, "windows-1252", 'Expected windows-1252');
}, "Check detection result");
done();
};
</script>

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