mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update web-platform-tests to revision cbd8c8ca929bc1aea71087be3b826cf1ee189a52
This commit is contained in:
parent
0c20fba2ab
commit
9c6bf785bd
150 changed files with 1798 additions and 876 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,3 +37,6 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,9 +5,9 @@
|
|||
[[data-expected-height\] 7]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 3]
|
||||
[[data-expected-height\] 1]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 4]
|
||||
[[data-expected-height\] 2]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[perspective-interpolation.html]
|
||||
expected: CRASH
|
||||
[ perspective interpolation]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
[MediaQueryList-addListener-handleEvent.html]
|
||||
expected: TIMEOUT
|
||||
[throws if handleEvent is falsy and not callable]
|
||||
expected: NOTRUN
|
||||
|
||||
[looks up handleEvent method on every event dispatch]
|
||||
expected: FAIL
|
||||
|
||||
[rethrows errors when getting handleEvent]
|
||||
expected: TIMEOUT
|
||||
|
||||
[doesn't look up handleEvent method on callable event listeners]
|
||||
expected: FAIL
|
||||
|
||||
[throws if handleEvent is thruthy and not callable]
|
||||
expected: NOTRUN
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
[MediaQueryList-addListener-removeListener.html]
|
||||
[listeners are called when <iframe> is resized]
|
||||
expected: FAIL
|
||||
|
||||
[listeners are called correct number of times]
|
||||
expected: FAIL
|
||||
|
4
tests/wpt/metadata/css/cssom-view/matchMedia.html.ini
Normal file
4
tests/wpt/metadata/css/cssom-view/matchMedia.html.ini
Normal file
|
@ -0,0 +1,4 @@
|
|||
[matchMedia.html]
|
||||
[iframe.matchMedia("(min-aspect-ratio: 1/1)") matches]
|
||||
expected: FAIL
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
[matchMedia.xht]
|
||||
bug: https://github.com/servo/servo/issues/20818
|
||||
expected: TIMEOUT
|
||||
[window.matchMedia exists]
|
||||
expected: FAIL
|
||||
|
||||
[MediaQueryList.matches for "(min-aspect-ratio: 1/1)"]
|
||||
expected: FAIL
|
||||
|
||||
[Resize iframe from 200x100 to 200x50, then to 100x50]
|
||||
expected: NOTRUN
|
||||
|
||||
[Listeners are called in the order which they have been added]
|
||||
expected: NOTRUN
|
||||
|
||||
[Listener added twice is only called once.]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[matchMediaAddListener-handleEvent.html]
|
||||
[throws if handleEvent is falsy and not callable]
|
||||
expected: FAIL
|
||||
|
||||
[rethrows errors when getting handleEvent]
|
||||
expected: FAIL
|
||||
|
||||
[throws if handleEvent is thruthy and not callable]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[matchMediaAddListener.html]
|
||||
type: testharness
|
||||
[CSS Test: CSSOM View matchMedia addListener]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[contenttype_txt.html]
|
||||
expected: CRASH
|
|
@ -312,24 +312,27 @@
|
|||
[<iframe>: separate response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
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/html;x=" text/plain]
|
||||
[<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/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,3 +56,6 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript;charset=windows-1252 text/javascript]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[embedded-credentials.tentative.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Embedded credentials are treated as network errors.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -11,11 +10,5 @@
|
|||
expected: FAIL
|
||||
|
||||
[Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Embedded credentials matching the top-level are not treated as network errors for same-origin URLs.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Embedded credentials matching the top-level are not treated as network errors for relative URLs.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[navigation-unload-same-origin-fragment.html]
|
||||
[Tests that a fragment navigation in the unload handler will not block the initial navigation]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_2.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[window-iframe-messagechannel-success.https.html]
|
||||
[postMessaging to a same-origin iframe via MessageChannel allows them to see each others' modifications]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[window-iframe-messagechannel.https.html]
|
||||
[postMessaging to a same-site iframe via MessageChannel allows them to see each others' modifications]
|
||||
expected: FAIL
|
||||
|
||||
[postMessaging with a MessageChannel that's been cross-site should succeed]
|
||||
expected: FAIL
|
||||
|
||||
[postMessaging to a cross-site iframe via MessageChannel should fail]
|
||||
expected: FAIL
|
||||
|
||||
[postMessaging to a same-origin iframe via MessageChannel allows them to see each others' modifications]
|
||||
expected: FAIL
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-2.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[form-double-submit-3.html]
|
||||
expected: ERROR
|
||||
[<button> should have the same double-submit protection as <input type=submit>]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
[form-submission-algorithm.html]
|
||||
expected: TIMEOUT
|
||||
[If form's firing submission events is true, then return; 'submit' event]
|
||||
expected: FAIL
|
||||
|
||||
[If form's firing submission events is true, then return; 'invalid' event]
|
||||
expected: FAIL
|
||||
|
||||
[Cannot navigate (after constructing the entry list)]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[DOMContentLoaded-defer.html]
|
||||
[The end: DOMContentLoaded and defer scripts]
|
||||
expected: FAIL
|
||||
|
|
@ -2,5 +2,5 @@
|
|||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Navigation Timing 2 WPT]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[nested-context-navigations-iframe.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Test that iframe navigations are not observable by the parent, even after history navigations by the parent]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[realtimeanalyser-fft-scaling.html]
|
||||
expected: TIMEOUT
|
||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
[005.html]
|
||||
expected: ERROR
|
||||
[dedicated worker in shared worker in dedicated worker]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[shared]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -89,11 +89,11 @@ jobs:
|
|||
- template: tools/ci/azure/install_safari.yml
|
||||
- template: tools/ci/azure/update_hosts.yml
|
||||
- template: tools/ci/azure/update_manifest.yml
|
||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl - --log-tbpl-level info --channel dev chrome infrastructure/
|
||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-mach - --log-mach-level info --channel dev chrome infrastructure/
|
||||
displayName: 'Run tests (Chrome Dev)'
|
||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl - --log-tbpl-level info --channel nightly firefox infrastructure/
|
||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-mach - --log-mach-level info --channel nightly firefox infrastructure/
|
||||
displayName: 'Run tests (Firefox Nightly)'
|
||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl - --log-tbpl-level info --channel preview safari infrastructure/
|
||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-mach - --log-mach-level info --channel preview safari infrastructure/
|
||||
displayName: 'Run tests (Safari Technology Preview)'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
|
@ -227,7 +227,7 @@ jobs:
|
|||
- template: tools/ci/azure/install_edge.yml
|
||||
- template: tools/ci/azure/update_hosts.yml
|
||||
- template: tools/ci/azure/update_manifest.yml
|
||||
- script: python ./wpt run --yes --no-manifest-update --install-fonts --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl - --log-tbpl-level info --channel dev edgechromium infrastructure/
|
||||
- script: python ./wpt run --yes --no-manifest-update --install-fonts --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-mach - --log-mach-level info --channel dev edgechromium infrastructure/
|
||||
displayName: 'Run tests (Edge Dev)'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
|
@ -260,7 +260,7 @@ jobs:
|
|||
channel: dev
|
||||
- template: tools/ci/azure/update_hosts.yml
|
||||
- template: tools/ci/azure/update_manifest.yml
|
||||
- script: python ./wpt run --yes --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info --channel dev edgechromium
|
||||
- script: python ./wpt run --yes --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-mach - --log-mach-level info --channel dev edgechromium
|
||||
displayName: 'Run tests (Edge Dev)'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
|
@ -296,7 +296,7 @@ jobs:
|
|||
channel: canary
|
||||
- template: tools/ci/azure/update_hosts.yml
|
||||
- template: tools/ci/azure/update_manifest.yml
|
||||
- script: python ./wpt run --yes --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info --channel canary edgechromium
|
||||
- script: python ./wpt run --yes --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-mach - --log-mach-level info --channel canary edgechromium
|
||||
displayName: 'Run tests (Edge Canary)'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
|
@ -332,7 +332,7 @@ jobs:
|
|||
- template: tools/ci/azure/update_hosts.yml
|
||||
- template: tools/ci/azure/update_manifest.yml
|
||||
# --exclude is a workaround for https://github.com/web-platform-tests/wpt/issues/18634
|
||||
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info safari --exclude /inert/inert-retargeting.tentative.html --exclude /inert/inert-retargeting-iframe.tentative.html
|
||||
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-mach - --log-mach-level info safari --exclude /inert/inert-retargeting.tentative.html --exclude /inert/inert-retargeting-iframe.tentative.html
|
||||
displayName: 'Run tests'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
|
@ -364,7 +364,7 @@ jobs:
|
|||
- template: tools/ci/azure/install_safari.yml
|
||||
- template: tools/ci/azure/update_hosts.yml
|
||||
- template: tools/ci/azure/update_manifest.yml
|
||||
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info --channel preview safari
|
||||
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-mach - --log-mach-level info --channel preview safari
|
||||
displayName: 'Run tests'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
|
|
|
@ -7,42 +7,38 @@ search: False
|
|||
# default: empty
|
||||
# allowed: list
|
||||
requirements:
|
||||
- tools/requirements_flake8.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/requirements_mypy.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wpt/requirements.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_chrome.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_chrome_android.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_edge.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_firefox.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_ie.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_opera.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_safari.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_sauce.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- tools/wptrunner/requirements_servo.txt:
|
||||
update: all
|
||||
pin: True
|
||||
- docs/requirements.txt
|
||||
- tools/requirements_flake8.txt
|
||||
- tools/requirements_mypy.txt
|
||||
- tools/wpt/requirements.txt
|
||||
- tools/wptrunner/requirements.txt
|
||||
- tools/wptrunner/requirements_android_webview.txt
|
||||
- tools/wptrunner/requirements_chrome.txt
|
||||
- tools/wptrunner/requirements_chrome_android.txt
|
||||
- tools/wptrunner/requirements_chrome_ios.txt
|
||||
- tools/wptrunner/requirements_edge.txt
|
||||
- tools/wptrunner/requirements_edge_chromium.txt
|
||||
- tools/wptrunner/requirements_epiphany.txt
|
||||
- tools/wptrunner/requirements_firefox.txt
|
||||
- tools/wptrunner/requirements_ie.txt
|
||||
- tools/wptrunner/requirements_opera.txt
|
||||
- tools/wptrunner/requirements_safari.txt
|
||||
- tools/wptrunner/requirements_sauce.txt
|
||||
- tools/wptrunner/requirements_servo.txt
|
||||
- tools/wptrunner/requirements_webkit.txt
|
||||
|
||||
# try and avoid bogus PRs where these get updated (has happened occasionally)
|
||||
- annotation-protocol/requirements.txt:
|
||||
update: False
|
||||
- css/requirements.txt:
|
||||
update: False
|
||||
- tools/third_party/html5lib/requirements-optional.txt:
|
||||
update: False
|
||||
- tools/third_party/html5lib/requirements-test.txt:
|
||||
update: False
|
||||
- tools/third_party/html5lib/requirements.txt:
|
||||
update: False
|
||||
- tools/third_party/pytest/doc/en/requirements.txt:
|
||||
update: False
|
||||
- tools/third_party/pytest/tasks/requirements.txt:
|
||||
update: False
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ single_test: true });
|
||||
document.domain = "{{host}}";
|
||||
|
||||
window.onload = () => {
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
text
|
||||
</div>
|
||||
<script>
|
||||
// Force a layout before removing.
|
||||
document.body.offsetTop;
|
||||
document.getElementById('target').remove();
|
||||
done();
|
||||
test(function() {
|
||||
// Force a layout before removing.
|
||||
document.body.offsetTop;
|
||||
document.getElementById('target').remove();
|
||||
}, '-webkit-box: removal of child');
|
||||
</script>
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script nonce='abc'>
|
||||
setup({ single_test: true });
|
||||
window.addEventListener('securitypolicyviolation', function(e) {
|
||||
test(function() { assert_unreached("Should not have fired event")});
|
||||
assert_unreached("Should not have fired event");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
window.addEventListener('securitypolicyviolation', function(e) {
|
||||
test(function() { assert_unreached("securitypolicyviolat was fired")});
|
||||
assert_unreached("securitypolicyviolat was fired");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test Reference: bug 1584018</title>
|
||||
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
|
||||
<style>
|
||||
.container {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.scroll-inner {
|
||||
overflow:scroll;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div class="scroll-inner">
|
||||
<div>0</div>
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
<div>0</div>
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase, bug 1584018</title>
|
||||
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1584018">
|
||||
<link rel="match" href="flex-child-percent-basis-resize-1-ref.html">
|
||||
|
||||
<style>
|
||||
.flex-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.flex-item {
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
|
||||
.scroll-outer {
|
||||
overflow:hidden;
|
||||
/* this combination is important */
|
||||
height: 100%;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.scroll-inner {
|
||||
overflow:scroll;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="flex-container">
|
||||
<div class="flex-item">
|
||||
<div class="scroll-outer">
|
||||
<div class="scroll-inner">
|
||||
<div>0</div>
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
<div>0</div>
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -11,7 +11,7 @@
|
|||
<meta name="flags" content="ahem">
|
||||
<link rel="stylesheet" href="/css/support/grid.css">
|
||||
<link rel="stylesheet" href="/css/support/alignment.css">
|
||||
<link rel="stylesheet" href="support/width-keyword-classes.css">
|
||||
<link rel="stylesheet" href="/css/support/width-keyword-classes.css">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
body {
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout test: align-self property</title>
|
||||
<link rel="author" title="Rossana Monteriso" href="mailto:rmonteriso@igalia.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#alignment-values">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-direction">
|
||||
<meta name="assert" content="This test checks that the align-self property is applied correctly for RL and LR, vertical and horizontal writing modes.">
|
||||
<meta name="flags" content="ahem">
|
||||
<link rel="stylesheet" href="/css/support/grid.css">
|
||||
<link rel="stylesheet" href="/css/support/alignment.css">
|
||||
<link rel="stylesheet" href="/css/support/width-keyword-classes.css">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
|
||||
<style>
|
||||
|
||||
.grid {
|
||||
grid-template-columns: 100px 100px;
|
||||
grid-template-rows: 200px 200px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 20px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 8px;
|
||||
height: 16px;
|
||||
background: black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
|
||||
<body onload="checkLayout('.grid')">
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
|
||||
<div class="alignSelfStretch firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div>
|
||||
<div class="cell alignSelfStart firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfEnd firstRowSecondColumn" data-offset-x="100" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfCenter secondRowFirstColumn" data-offset-x="0" data-offset-y="280" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
|
||||
<div class="cell alignSelfFlexEnd firstRowFirstColumn" data-offset-x="0" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfFlexStart firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="100" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Default alignment and initial values. -->
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content alignItemsCenter" data-expected-width="200" data-expected-height="400">
|
||||
<div class="cell alignSelfAuto firstRowFirstColumn" data-offset-x="0" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell firstRowSecondColumn" data-offset-x="100" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="100" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
|
||||
<div class="alignSelfAuto firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div>
|
||||
<div class="cell firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfStart secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfEnd secondRowSecondColumn" data-offset-x="100" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RTL direction (it should not affect the block-flow direction). -->
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content directionRTL" data-expected-width="200" data-expected-height="400">
|
||||
<div class="alignSelfStretch firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div>
|
||||
<div class="cell alignSelfStart firstRowSecondColumn" data-offset-x="80" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfEnd firstRowSecondColumn" data-offset-x="80" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfCenter secondRowFirstColumn" data-offset-x="180" data-offset-y="280" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content directionRTL" data-expected-width="200" data-expected-height="400">
|
||||
<div class="cell alignSelfFlexEnd firstRowFirstColumn" data-offset-x="180" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfFlexStart firstRowSecondColumn" data-offset-x="80" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="180" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="80" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RTL direction (it should not affect the block-flow) with opposite directions grid container vs grid item. -->
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
|
||||
<div class="alignSelfStretch firstRowFirstColumn directionRTL" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div>
|
||||
<div class="cell alignSelfStart firstRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfEnd firstRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfCenter secondRowFirstColumn directionRTL" data-offset-x="0" data-offset-y="280" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content" data-expected-width="200" data-expected-height="400">
|
||||
<div class="cell alignSelfFlexEnd firstRowFirstColumn directionRTL" data-offset-x="0" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfFlexStart firstRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfStart secondRowFirstColumn directionRTL" data-offset-x="0" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfEnd secondRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Vertical RL writing mode. -->
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content verticalRL" data-expected-width="400" data-expected-height="200">
|
||||
<div class="alignSelfStretch firstRowFirstColumn" data-offset-x="200" data-offset-y="0" data-expected-width="200" data-expected-height="100"></div>
|
||||
<div class="cell alignSelfStart firstRowSecondColumn" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfEnd firstRowSecondColumn" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfCenter secondRowFirstColumn" data-offset-x="90" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content verticalRL" data-expected-width="400" data-expected-height="200">
|
||||
<div class="cell alignSelfFlexEnd firstRowFirstColumn" data-offset-x="200" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfFlexStart firstRowSecondColumn" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Vertical LR writing mode. -->
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content verticalLR" data-expected-width="400" data-expected-height="200">
|
||||
<div class="alignSelfStretch firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="100"></div>
|
||||
<div class="cell alignSelfStart firstRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfEnd firstRowSecondColumn" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfCenter secondRowFirstColumn" data-offset-x="290" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content verticalLR" data-expected-width="400" data-expected-height="200">
|
||||
<div class="cell alignSelfFlexEnd firstRowFirstColumn" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfFlexStart firstRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="200" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Vertical RL writing mode with opposite block-flow directions grid container vs grid item. -->
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content verticalRL" data-expected-width="400" data-expected-height="200">
|
||||
<div class="alignSelfStretch firstRowFirstColumn verticalLR" data-offset-x="200" data-offset-y="0" data-expected-width="200" data-expected-height="100">
|
||||
</div>
|
||||
<div class="cell alignSelfStart firstRowSecondColumn verticalLR" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfEnd firstRowSecondColumn verticalLR" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfCenter secondRowFirstColumn verticalLR" data-offset-x="90" data-offset-y="0" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content verticalRL" data-expected-width="400" data-expected-height="200">
|
||||
<div class="cell alignSelfFlexEnd firstRowFirstColumn verticalLR" data-offset-x="200" data-offset-y="0" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfFlexStart firstRowSecondColumn verticalLR" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfSelfStart secondRowFirstColumn verticalLR" data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfSelfEnd secondRowSecondColumn verticalLR" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Vertical LR writing mode with opposite block-flow directions grid container vs grid item. -->
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content verticalLR" data-expected-width="400" data-expected-height="200">
|
||||
<div class="alignSelfStretch firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="100">
|
||||
</div>
|
||||
<div class="cell alignSelfStart firstRowSecondColumn verticalRL" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfEnd firstRowSecondColumn verticalRL" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfCenter secondRowFirstColumn verticalRL" data-offset-x="290" data-offset-y="0" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="grid fit-content verticalLR" data-expected-width="400" data-expected-height="200">
|
||||
<div class="cell alignSelfFlexEnd firstRowFirstColumn verticalRL" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfFlexStart firstRowSecondColumn verticalRL" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfSelfStart secondRowFirstColumn verticalRL" data-offset-x="380" data-offset-y="0" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="cell alignSelfSelfEnd secondRowSecondColumn verticalRL" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test Reference: bug 1584018</title>
|
||||
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
|
||||
<style>
|
||||
.container {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.scroll-inner {
|
||||
overflow:scroll;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div class="scroll-inner">
|
||||
<div>0</div>
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
<div>0</div>
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase, bug 1584018</title>
|
||||
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1584018">
|
||||
<link rel="match" href="grid-child-percent-basis-resize-1-ref.html">
|
||||
|
||||
<style>
|
||||
.grid-container {
|
||||
display: grid;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
}
|
||||
|
||||
.scroll-outer {
|
||||
overflow:hidden;
|
||||
/* this combination is important */
|
||||
height: 100%;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.scroll-inner {
|
||||
overflow:scroll;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="grid-container">
|
||||
<div class="grid-item">
|
||||
<div class="scroll-outer">
|
||||
<div class="scroll-inner">
|
||||
<div>0</div>
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
<div>0</div>
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: Multi-column element with scrolled content clipping</title>
|
||||
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#columns"/>
|
||||
<link rel="match" href="reference/multicol-clip-scrolled-content-001-ref.html"/>
|
||||
<style>
|
||||
#columns {
|
||||
column-width: 350px;
|
||||
}
|
||||
.spacer {
|
||||
height: 200px;
|
||||
width: 10px;
|
||||
}
|
||||
#outer {
|
||||
border: 1px solid black;
|
||||
overflow: scroll;
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
}
|
||||
.inner {
|
||||
overflow: scroll;
|
||||
}
|
||||
.clipped_target {
|
||||
overflow: scroll;
|
||||
background: red;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class=spacer></div>
|
||||
<div id=columns>
|
||||
<div class=spacer></div>
|
||||
<div id=outer>
|
||||
<div class=inner>
|
||||
<pre class=clipped_target>
|
||||
scrollable
|
||||
content
|
||||
goes
|
||||
here
|
||||
</pre>
|
||||
</div>
|
||||
<div class=spacer></div>
|
||||
<div class=spacer></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.onload = () => { outer.scrollTop = 100; };
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: Multi-column element with scrolled content clipping (reference)</title>
|
||||
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#columns"/>
|
||||
<style>
|
||||
#columns {
|
||||
column-width: 350px;
|
||||
}
|
||||
.spacer {
|
||||
height: 200px;
|
||||
width: 10px;
|
||||
}
|
||||
#outer {
|
||||
border: 1px solid black;
|
||||
overflow: scroll;
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
}
|
||||
.inner {
|
||||
overflow: scroll;
|
||||
visibility: hidden;
|
||||
}
|
||||
.clipped_target {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class=spacer></div>
|
||||
<div id=columns>
|
||||
<div class=spacer></div>
|
||||
<div id=outer>
|
||||
<div class=inner>
|
||||
<pre class=clipped_target>
|
||||
scrollable
|
||||
content
|
||||
goes
|
||||
here
|
||||
</pre>
|
||||
</div>
|
||||
<div class=spacer></div>
|
||||
<div class=spacer></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.onload = () => { outer.scrollTop = 100; };
|
||||
</script>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test Reference</title>
|
||||
<style>
|
||||
#target {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
/* For this simple case, hidden and clip are equivalent */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#container {
|
||||
overflow: auto;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
#fill {
|
||||
background: blue;
|
||||
height: 5000px;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<div id="target">
|
||||
<div id="fill"></div>
|
||||
</div>
|
||||
</div>
|
31
tests/wpt/web-platform-tests/css/css-overflow/clip-001.html
Normal file
31
tests/wpt/web-platform-tests/css/css-overflow/clip-001.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>overflow: clip clips its contents and doesn't cause scrollable overflow</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-overflow/#valdef-overflow-clip">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="match" href="clip-001-ref.html">
|
||||
<style>
|
||||
#target {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
overflow: -moz-hidden-unscrollable;
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
#container {
|
||||
overflow: auto;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
#fill {
|
||||
background: blue;
|
||||
height: 5000px;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<div id="target">
|
||||
<div id="fill"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,36 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Overflow areas are updated when dynamically changed to overflow: clip</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-overflow/#valdef-overflow-clip">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="match" href="clip-001-ref.html">
|
||||
<style>
|
||||
#target {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#container {
|
||||
overflow: auto;
|
||||
height: 300px;
|
||||
}
|
||||
#fill {
|
||||
height: 5000px;
|
||||
background: blue;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<div id="target">
|
||||
<div id="fill"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
onload = function() {
|
||||
let target = document.getElementById("target");
|
||||
window.unused = target.getBoundingClientRect(); // Update layout
|
||||
target.style.overflow = "-moz-hidden-unscrollable";
|
||||
target.style.overflow = "clip";
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Pseudo-Elements Test: Parsing tree-abiding pseudo-elements</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#treelike">
|
||||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
||||
<meta name="assert" content="This test checks that gutters adjacent to collapsed tracks don't reduce the space available for aligning adjacent grid items." />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<script>
|
||||
// Generated content pseudo-elements
|
||||
test_valid_selector("::before");
|
||||
test_valid_selector("*::before", "::before");
|
||||
test_valid_selector("foo.bar[baz]::before");
|
||||
test_invalid_selector("::before *");
|
||||
|
||||
test_valid_selector("::after");
|
||||
test_valid_selector("*::after", "::after");
|
||||
test_valid_selector("foo.bar[baz]::after");
|
||||
test_invalid_selector("::after *");
|
||||
|
||||
// List marker pseudo-element
|
||||
test_valid_selector("::marker");
|
||||
test_valid_selector("*::marker", "::marker");
|
||||
test_valid_selector("foo.bar[baz]::marker");
|
||||
test_invalid_selector("::marker *");
|
||||
|
||||
// Placeholder input pseudo-element
|
||||
test_valid_selector("::placeholder");
|
||||
test_valid_selector("*::placeholder", "::placeholder");
|
||||
test_valid_selector("foo.bar[baz]::placeholder");
|
||||
test_invalid_selector("::placeholder *");
|
||||
|
||||
// Combinations of the above
|
||||
test_invalid_selector("::before::before");
|
||||
test_invalid_selector("::after::before");
|
||||
test_invalid_selector("::marker::before");
|
||||
test_invalid_selector("::placeholder::before");
|
||||
|
||||
test_invalid_selector("::before::after");
|
||||
test_invalid_selector("::after::after");
|
||||
test_invalid_selector("::marker::after");
|
||||
test_invalid_selector("::placeholder::after");
|
||||
|
||||
test_valid_selector("::before::marker");
|
||||
test_valid_selector("::after::marker");
|
||||
test_invalid_selector("::marker::marker");
|
||||
test_invalid_selector("::placeholder::marker");
|
||||
|
||||
test_invalid_selector("::before::placeholder");
|
||||
test_invalid_selector("::after::placeholder");
|
||||
test_invalid_selector("::marker::placeholder");
|
||||
test_invalid_selector("::placeholder::placeholder");
|
||||
</script>
|
|
@ -5,31 +5,10 @@
|
|||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<style id="styleElm">
|
||||
</style>
|
||||
<script>
|
||||
function parse_selector(selector_text) {
|
||||
try {
|
||||
styleElm.sheet.insertRule(selector_text+"{}");
|
||||
styleElm.sheet.deleteRule(0);
|
||||
return true;
|
||||
} catch (ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function test_valid_selector(selector_text) {
|
||||
test(function(){
|
||||
assert_true(parse_selector(selector_text));
|
||||
}, "Should be a valid selector: '" + selector_text + "'");
|
||||
}
|
||||
|
||||
function test_invalid_selector(selector_text) {
|
||||
test(function(){
|
||||
assert_false(parse_selector(selector_text));
|
||||
}, "Should be an invalid selector: '" + selector_text + "'");
|
||||
}
|
||||
|
||||
test_invalid_selector("::slotted");
|
||||
test_invalid_selector("::slotted()");
|
||||
test_invalid_selector("::slotted(*).class");
|
||||
|
|
|
@ -55,12 +55,17 @@
|
|||
</div>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_true(
|
||||
verifyTextPoints({
|
||||
roundedRect: {x: 0, y: 10, width: 100, height: 100, rx: 50, ry: 50},
|
||||
containerWidth: 200,
|
||||
containerHeight: 200,
|
||||
lineHeight: 10
|
||||
}, 10, 1.5);
|
||||
}, 10, 1.5),
|
||||
"Lines positioned properly around the shape."
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -58,12 +58,17 @@
|
|||
</div>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_true(
|
||||
verifyTextPoints({
|
||||
roundedRect: {x: 0, y: 10, width: 100, height: 100, rx: 50, ry: 50},
|
||||
containerWidth: 200,
|
||||
containerHeight: 200,
|
||||
lineHeight: 10
|
||||
}, 10, 1);
|
||||
}, 10, 1),
|
||||
"Lines positioned properly around the shape."
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -60,12 +60,17 @@
|
|||
</div>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_true(
|
||||
verifyTextPoints({
|
||||
roundedRect: {x: 0, y: 10, width: 100, height: 100, rx: 50, ry: 50},
|
||||
containerWidth: 200,
|
||||
containerHeight: 200,
|
||||
lineHeight: 10
|
||||
}, 10, 1.5);
|
||||
}, 10, 1.5),
|
||||
"Lines positioned properly around the shape."
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -59,12 +59,17 @@
|
|||
</div>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_true(
|
||||
verifyTextPoints({
|
||||
roundedRect: {x: 100, y: 10, width: 100, height: 100, rx: 50, ry: 50},
|
||||
containerWidth: 200,
|
||||
containerHeight: 200,
|
||||
lineHeight: 10
|
||||
}, 10, 1, "right");
|
||||
}, 10, 1, "right"),
|
||||
"Lines positioned properly around the shape."
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function verifyTextPoints(shape, numLines, tolerance, side) {
|
||||
var failed = false;
|
||||
var passed = true;
|
||||
if (tolerance === undefined)
|
||||
tolerance = 0.5;
|
||||
if (side === undefined)
|
||||
|
@ -19,11 +19,9 @@ function verifyTextPoints(shape, numLines, tolerance, side) {
|
|||
if( Math.abs( (actual - expected[i])) > tolerance ){
|
||||
line.style.setProperty('color', 'red');
|
||||
console.log('diff: ' + Math.abs(actual - expected[i]));
|
||||
failed = true;
|
||||
passed = false;
|
||||
}
|
||||
}
|
||||
if (window.done) {
|
||||
assert_false(failed, "Lines positioned properly around the shape.");
|
||||
done();
|
||||
}
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
|
|
@ -32,8 +32,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 2, [182, 199, 201, 199, 182, 0]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -32,8 +32,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 2, [218, 236, 238, 236, 218, 160]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -34,8 +34,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 2, [181, 199, 201, 199, 181, 0]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -42,8 +42,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 2, [200, 214, 216, 214, 200, 158, 0]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -46,8 +46,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 3, [182, 198, 200, 198, 182, 0]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -34,8 +34,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -34,8 +34,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -33,8 +33,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
setup({single_test: true});
|
||||
document.fonts.ready.then(()=> {
|
||||
approxShapeTest('test', 'line-', 2, [48, 88, 128, 168, 180, 0]);
|
||||
done();
|
||||
|
|
|
@ -41,8 +41,10 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/spec-example-utils.js"></script>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
function checkFloats() {
|
||||
approxShapeTest('test', 'line-', 2, [242, 256, 258, 256, 242, 204, 0]);
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -11,7 +11,6 @@ function approxShapeTest(testId, linePrefix, epsilon, lineOffsets) {
|
|||
var line = document.getElementById(linePrefix + i);
|
||||
assert_approx_equals(line.offsetLeft, lineOffsets[i] + testOffset, epsilon, 'Line ' + i + ' is positioned properly');
|
||||
}
|
||||
done();
|
||||
}
|
||||
runTest();
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
outline: solid 1px black;
|
||||
}
|
||||
#test4 {
|
||||
animation: outline-anim 3s 0s paused reverse-linear;
|
||||
animation: outline-anim 3s 0s paused reverse linear;
|
||||
outline: solid 1px black;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSSOM View Module test:MediaQueryList</title>
|
||||
<link rel="author" title="unbug" href="mailto:tidelgl@gmail.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>This case tests the MediaQueryList</p>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function(){
|
||||
assert_equals(window.matchMedia('(min-width: 1px)').matches, true, "Expected any device to match min-width: 1px");
|
||||
},'matchMedia');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,106 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<meta name="flags" content="dom">
|
||||
<title>CSS Test: CSSOM View MediaQueryList::addListener with handleEvent</title>
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#callbackdef-eventlistener">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/matchMedia.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ allow_uncaught_exception: true });
|
||||
|
||||
promise_test(async t => {
|
||||
const mql = await createMQL(t);
|
||||
|
||||
let _this;
|
||||
let _event;
|
||||
const listener = {
|
||||
handleEvent(event) {
|
||||
_this = this;
|
||||
_event = event;
|
||||
},
|
||||
};
|
||||
|
||||
mql.addListener(listener);
|
||||
triggerMQLEvent(mql);
|
||||
await waitForChangesReported();
|
||||
|
||||
assert_equals(_this, listener);
|
||||
assert_equals(_event.media, mql.media);
|
||||
assert_equals(_event.matches, mql.matches);
|
||||
}, "calls handleEvent method of event listener");
|
||||
|
||||
promise_test(async t => {
|
||||
const mql = await createMQL(t);
|
||||
|
||||
let calls = 0;
|
||||
mql.addListener({
|
||||
get handleEvent() {
|
||||
calls++;
|
||||
return function() {};
|
||||
},
|
||||
});
|
||||
assert_equals(calls, 0);
|
||||
|
||||
triggerMQLEvent(mql);
|
||||
await waitForChangesReported();
|
||||
assert_equals(calls, 1);
|
||||
|
||||
triggerMQLEvent(mql);
|
||||
await waitForChangesReported();
|
||||
assert_equals(calls, 2);
|
||||
}, "looks up handleEvent method on every event dispatch");
|
||||
|
||||
promise_test(async t => {
|
||||
const mql = await createMQL(t);
|
||||
|
||||
let calls = 0;
|
||||
const listener = () => {
|
||||
calls++;
|
||||
};
|
||||
|
||||
Object.defineProperty(listener, "handleEvent", {
|
||||
get: t.unreached_func("handleEvent method should not be looked up on functions"),
|
||||
});
|
||||
mql.addListener(listener);
|
||||
|
||||
triggerMQLEvent(mql);
|
||||
await waitForChangesReported();
|
||||
assert_equals(calls, 1);
|
||||
}, "doesn't look up handleEvent method on callable event listeners");
|
||||
|
||||
const uncaught_error_test = async (t, listener) => {
|
||||
const mql = await createMQL(t);
|
||||
mql.addListener(listener);
|
||||
|
||||
const eventWatcher = new EventWatcher(t, window, "error");
|
||||
const errorPromise = eventWatcher.wait_for("error");
|
||||
triggerMQLEvent(mql);
|
||||
|
||||
const event = await errorPromise;
|
||||
throw event.error;
|
||||
};
|
||||
|
||||
promise_test(t => {
|
||||
const error = { name: "test" };
|
||||
const listener = {
|
||||
get handleEvent() {
|
||||
throw error;
|
||||
},
|
||||
};
|
||||
|
||||
return promise_rejects_exactly(t, error, uncaught_error_test(t, listener));
|
||||
}, "rethrows errors when getting handleEvent");
|
||||
|
||||
promise_test(t => {
|
||||
const listener = { handleEvent: null };
|
||||
return promise_rejects(t, new TypeError(), uncaught_error_test(t, listener));
|
||||
}, "throws if handleEvent is falsy and not callable");
|
||||
|
||||
promise_test(t => {
|
||||
const listener = { handleEvent: "str" };
|
||||
return promise_rejects(t, new TypeError(), uncaught_error_test(t, listener));
|
||||
}, "throws if handleEvent is thruthy and not callable");
|
||||
</script>
|
|
@ -0,0 +1,121 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<meta name="flags" content="dom">
|
||||
<title>CSS Test: CSSOM View MediaQueryList::{add,remove}Listener</title>
|
||||
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/matchMedia.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
test(function() {
|
||||
const mql = window.matchMedia("all");
|
||||
assert_inherits(mql, "addListener");
|
||||
assert_equals(typeof mql.addListener, "function");
|
||||
}, "MediaQueryList::addListener is a function");
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIFrame(t, 200, 100);
|
||||
const heightMQL = iframe.contentWindow.matchMedia("(max-height: 50px)");
|
||||
const widthMQL = iframe.contentWindow.matchMedia("(min-width: 150px)");
|
||||
|
||||
let heightEvent;
|
||||
let widthEvent;
|
||||
|
||||
heightMQL.addListener(event => {
|
||||
heightEvent = event;
|
||||
});
|
||||
widthMQL.addListener(event => {
|
||||
widthEvent = event;
|
||||
});
|
||||
|
||||
assert_false(heightMQL.matches);
|
||||
assert_true(widthMQL.matches);
|
||||
|
||||
iframe.height = "50"; // 200x100 => 200x50
|
||||
await waitForChangesReported();
|
||||
|
||||
assert_equals(heightEvent.media, heightMQL.media);
|
||||
assert_true(heightEvent.matches);
|
||||
assert_true(heightMQL.matches);
|
||||
assert_true(widthMQL.matches);
|
||||
|
||||
iframe.width = "100"; // 200x50 => 100x50
|
||||
await waitForChangesReported();
|
||||
|
||||
assert_equals(widthEvent.media, widthMQL.media);
|
||||
assert_false(widthEvent.matches);
|
||||
assert_false(widthMQL.matches);
|
||||
assert_true(heightMQL.matches);
|
||||
}, "listeners are called when <iframe> is resized");
|
||||
|
||||
promise_test(async t => {
|
||||
const mql = await createMQL(t);
|
||||
|
||||
let eventsCount = 0;
|
||||
mql.addListener(() => {
|
||||
eventsCount++;
|
||||
});
|
||||
|
||||
for (let i = 1; i <= 10; i++) {
|
||||
triggerMQLEvent(mql);
|
||||
await waitForChangesReported();
|
||||
assert_equals(eventsCount, i);
|
||||
}
|
||||
}, "listeners are called correct number of times");
|
||||
|
||||
promise_test(async t => {
|
||||
const mql = await createMQL(t);
|
||||
const calls = [];
|
||||
|
||||
mql.addListener(() => {
|
||||
calls.push("1st");
|
||||
});
|
||||
mql.addListener(() => {
|
||||
calls.push("2nd");
|
||||
});
|
||||
|
||||
triggerMQLEvent(mql);
|
||||
await waitForChangesReported();
|
||||
|
||||
assert_equals(calls[0], "1st");
|
||||
assert_equals(calls[1], "2nd");
|
||||
}, "listeners are called in order they were added");
|
||||
|
||||
promise_test(async t => {
|
||||
const mql = await createMQL(t);
|
||||
|
||||
let called = 0;
|
||||
const listener = () => {
|
||||
called++;
|
||||
};
|
||||
|
||||
mql.addListener(listener);
|
||||
mql.addListener(listener);
|
||||
|
||||
triggerMQLEvent(mql);
|
||||
await waitForChangesReported();
|
||||
|
||||
assert_equals(called, 1);
|
||||
}, "listener that was added twice is called only once");
|
||||
|
||||
test(function() {
|
||||
const mql = window.matchMedia("all");
|
||||
assert_inherits(mql, "removeListener");
|
||||
assert_equals(typeof mql.removeListener, "function");
|
||||
}, "MediaQueryList::removeListener is a function");
|
||||
|
||||
promise_test(async t => {
|
||||
const mql = await createMQL(t);
|
||||
const listener = t.unreached_func("should not be called");
|
||||
|
||||
mql.addListener(listener);
|
||||
mql.removeListener(listener);
|
||||
|
||||
triggerMQLEvent(mql);
|
||||
await waitForChangesReported();
|
||||
}, "MediaQueryList::removeListener removes added listener");
|
||||
</script>
|
|
@ -1,12 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>cssom-view - MediaQueryList with empty string</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(function () {
|
||||
var mql = window.matchMedia('');
|
||||
assert_equals(mql.media, '', "This should be an empty media query list");
|
||||
assert_equals(mql.matches, true, "Empty media query list should evaluate to true");
|
||||
});
|
||||
</script>
|
|
@ -9,22 +9,10 @@
|
|||
<script>
|
||||
"use strict";
|
||||
|
||||
test(t => {
|
||||
assert_equals(MediaQueryListEvent.length, 1);
|
||||
assert_throws(new TypeError(), () => {
|
||||
new MediaQueryListEvent();
|
||||
});
|
||||
}, "type argument is required");
|
||||
|
||||
test(t => {
|
||||
assert_equals(new MediaQueryListEvent("test").type, "test");
|
||||
}, 'type can be different from "change"');
|
||||
|
||||
test(t => {
|
||||
assert_equals(Object.getPrototypeOf(MediaQueryListEvent), Event);
|
||||
assert_true(new MediaQueryListEvent("change") instanceof Event);
|
||||
}, "extends Event");
|
||||
|
||||
test(t => {
|
||||
const event = new MediaQueryListEvent("change");
|
||||
|
||||
|
@ -47,16 +35,4 @@ test(t => {
|
|||
assert_true(event.bubbles);
|
||||
assert_true(event.cancelable);
|
||||
}, "init dictionary overrides");
|
||||
|
||||
test(t => {
|
||||
const event = new MediaQueryListEvent("change");
|
||||
assert_idl_attribute(event, "media");
|
||||
assert_readonly(event, "media");
|
||||
}, "MediaQueryListEvent::media is read-only IDL attribute");
|
||||
|
||||
test(t => {
|
||||
const event = new MediaQueryListEvent("change");
|
||||
assert_idl_attribute(event, "matches");
|
||||
assert_readonly(event, "matches");
|
||||
}, "MediaQueryListEvent::matches is read-only IDL attribute");
|
||||
</script>
|
||||
|
|
79
tests/wpt/web-platform-tests/css/cssom-view/matchMedia.html
Normal file
79
tests/wpt/web-platform-tests/css/cssom-view/matchMedia.html
Normal file
|
@ -0,0 +1,79 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<meta name="flags" content="dom">
|
||||
<title>CSS Test: CSSOM View matchMedia and MediaQueryList</title>
|
||||
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#dom-window-matchmedia">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-1/#serializing-media-queries">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/matchMedia.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
test(() => {
|
||||
assert_equals(
|
||||
typeof window.matchMedia,
|
||||
"function",
|
||||
"FATAL ERROR: The window.matchMedia function is not present. The rest of the testsuite will fail to run."
|
||||
);
|
||||
}, "window.matchMedia is a function");
|
||||
|
||||
test(() => {
|
||||
const mql = window.matchMedia("all");
|
||||
assert_equals(mql.media, "all");
|
||||
assert_true(mql.matches);
|
||||
}, 'window.matchMedia("all") matches');
|
||||
|
||||
test(() => {
|
||||
const mql = window.matchMedia("");
|
||||
assert_equals(mql.media, "");
|
||||
assert_true(mql.matches);
|
||||
}, 'window.matchMedia("") matches');
|
||||
|
||||
test(() => {
|
||||
const mql = window.matchMedia("(min-width: 1px)");
|
||||
assert_equals(mql.media, "(min-width: 1px)");
|
||||
assert_true(mql.matches);
|
||||
}, 'window.matchMedia("(min-width: 1px)") matches');
|
||||
|
||||
test(() => {
|
||||
const mql = window.matchMedia("::");
|
||||
assert_true(mql instanceof MediaQueryList);
|
||||
assert_equals(mql.media, "not all");
|
||||
assert_false(mql.matches);
|
||||
}, 'media query with syntax error is serialized as "not all"');
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIFrame(t, 200);
|
||||
const mql = iframe.contentWindow.matchMedia("(max-width: 199px), all and (min-width: 200px)");
|
||||
assert_equals(mql.media, "(max-width: 199px), (min-width: 200px)");
|
||||
assert_true(mql.matches);
|
||||
}, 'iframe.matchMedia("(max-width: 199px), all and (min-width: 200px)") is serialized w/o "all"');
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIFrame(t);
|
||||
const mql = iframe.contentWindow.matchMedia("(min-aspect-ratio: 1/1)");
|
||||
assert_true(mql.matches);
|
||||
}, 'iframe.matchMedia("(min-aspect-ratio: 1/1)") matches');
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIFrame(t, 200);
|
||||
const mql = iframe.contentWindow.matchMedia("(width: 200px)");
|
||||
assert_true(mql.matches);
|
||||
}, 'iframe.matchMedia("(width: 200px)") matches');
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIFrame(t, 200, 100);
|
||||
const mql = iframe.contentWindow.matchMedia("(max-height: 50px)");
|
||||
assert_false(mql.matches);
|
||||
}, 'iframe.matchMedia("(max-height: 50px)") matches');
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIFrame(t, 200, 100);
|
||||
const mql = iframe.contentWindow.matchMedia("(min-width: 150px)");
|
||||
assert_true(mql.matches);
|
||||
}, 'iframe.matchMedia("(min-width: 150px)") matches');
|
||||
</script>
|
|
@ -1,188 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSS Test: CSSOM View matchMedia and MediaQueryList</title>
|
||||
<meta name="timeout" content="long"/>
|
||||
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#dom-window-matchmedia" />
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface" />
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-1/#serializing-media-queries" />
|
||||
<meta name="flags" content="dom" />
|
||||
<script src="/resources/testharness.js" type="text/javascript" />
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript" />
|
||||
<style type="text/css"><![CDATA[
|
||||
iframe { border: none; }
|
||||
]]></style>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
<div id="log" />
|
||||
<iframe width="200" height="100" />
|
||||
<script type="text/javascript"><![CDATA[
|
||||
function reflow(doc) {
|
||||
doc.body.offsetWidth;
|
||||
}
|
||||
|
||||
var iframe = document.querySelector("iframe");
|
||||
var iframe_window = window.frames[0];
|
||||
|
||||
reflow(iframe_window.document);
|
||||
|
||||
test(function(){
|
||||
assert_inherits(window, "matchMedia");
|
||||
}, "window.matchMedia exists");
|
||||
|
||||
test(function(){
|
||||
assert_true(window.matchMedia instanceof Function, "FATAL ERROR: The window.matchMedia function is not present. The rest of the testsuite will fail to run.");
|
||||
}, "window.matchMedia is a Function");
|
||||
|
||||
var mql, mql1, mql2, mql3;
|
||||
|
||||
test(function(){
|
||||
mql = window.matchMedia("all");
|
||||
assert_true(mql instanceof MediaQueryList, "matchMedia(\"all\") returned MediaQueryList object.");
|
||||
}, "window.matchMedia(\"all\")");
|
||||
|
||||
test(function(){
|
||||
assert_idl_attribute(mql, "media", "Check that MediaQueryList.media exists.");
|
||||
}, "MediaQueryList.media exists");
|
||||
|
||||
test(function(){
|
||||
assert_readonly(mql, "media", "Check that MediaQueryList.media is readonly.");
|
||||
}, "MediaQueryList.media is readonly");
|
||||
|
||||
test(function(){
|
||||
assert_equals(mql.media, "all");
|
||||
}, "MediaQueryList.media for \"all\"");
|
||||
|
||||
test(function(){
|
||||
assert_idl_attribute(mql, "matches", "Check that MediaQueryList.matches exists.");
|
||||
}, "MediaQueryList.matches exists");
|
||||
|
||||
test(function(){
|
||||
assert_readonly(mql, "matches", "Check that MediaQueryList.matches is readonly.");
|
||||
}, "MediaQueryList.matches is readonly");
|
||||
|
||||
test(function(){
|
||||
assert_true(mql.matches);
|
||||
}, "MediaQueryList.matches for \"all\"");
|
||||
|
||||
test(function(){
|
||||
assert_inherits(mql, "addListener");
|
||||
}, "MediaQueryList.addListener exists");
|
||||
|
||||
test(function(){
|
||||
assert_true(mql.addListener instanceof Function);
|
||||
}, "MediaQueryList.addListener is a Function");
|
||||
|
||||
test(function(){
|
||||
assert_inherits(mql, "removeListener");
|
||||
}, "MediaQueryList.removeListener exists");
|
||||
|
||||
test(function(){
|
||||
assert_true(mql.removeListener instanceof Function);
|
||||
}, "MediaQueryList.removeListener is a Function");
|
||||
|
||||
test(function(){
|
||||
mql = window.matchMedia("::");
|
||||
assert_true(mql instanceof MediaQueryList, "window.matchMedia(\"::\") returned MediaQueryList object.");
|
||||
assert_equals(mql.media, "not all", "MediaQueryList.media serialized as \"not all\" from original string with syntax error.");
|
||||
}, "MediaQueryList.media syntax error");
|
||||
|
||||
test(function(){
|
||||
assert_false(mql.matches);
|
||||
}, "MediaQueryList.matches for \"not all\"");
|
||||
|
||||
test(function(){
|
||||
mql = iframe_window.matchMedia("(max-width: 199px), all and (min-width: 200px)");
|
||||
assert_equals(mql.media, "(max-width: 199px), (min-width: 200px)");
|
||||
assert_true(mql.matches);
|
||||
}, "MediaQueryList.matches for \"(max-width: 199px), all and (min-width: 200px)\"")
|
||||
|
||||
test(function(){
|
||||
mql = iframe_window.matchMedia("(min-aspect-ratio: 1/1)");
|
||||
assert_true(mql.matches);
|
||||
}, "MediaQueryList.matches for \"(min-aspect-ratio: 1/1)\"");
|
||||
|
||||
test(function(){
|
||||
mql = iframe_window.matchMedia("(width: 200px)");
|
||||
assert_true(mql.matches);
|
||||
}, "MediaQueryList.matches for \"(width: 200px)\"");
|
||||
|
||||
test(function(){
|
||||
mql1 = iframe_window.matchMedia("(max-height: 50px)");
|
||||
assert_false(mql1.matches);
|
||||
}, "MediaQueryList.matches for \"(max-height: 50px)\"");
|
||||
|
||||
test(function(){
|
||||
mql2 = iframe_window.matchMedia("(min-width: 150px)");
|
||||
assert_true(mql2.matches);
|
||||
}, "MediaQueryList.matches for \"(min-width: 150px)\"");
|
||||
|
||||
var resizeTest = async_test("Resize iframe from 200x100 to 200x50, then to 100x50");
|
||||
var listenerOrderTest = async_test("Listeners are called in the order which they have been added");
|
||||
var duplicateListenerTest = async_test("Listener added twice is only called once.");
|
||||
|
||||
window.onload = function(){
|
||||
|
||||
var rmListener = function(x){
|
||||
resizeTest.step(function(){
|
||||
assert_unreached("removeListener was not successful.");
|
||||
});
|
||||
};
|
||||
|
||||
var dupListener = function(x){
|
||||
duplicateListenerTest.step(function(){
|
||||
assert_false(mql1.dupListenerCalled, "Check that this listener has not been called before.");
|
||||
mql1.dupListenerCalled = true;
|
||||
});
|
||||
};
|
||||
|
||||
mql1.firstListenerCalled = false;
|
||||
mql1.dupListenerCalled = false;
|
||||
// Add listener twice and remove it below. Should not be called.
|
||||
mql1.addListener(rmListener);
|
||||
mql1.addListener(rmListener);
|
||||
// Add listener twice. Should only be called once.
|
||||
mql1.addListener(dupListener);
|
||||
mql1.addListener(dupListener);
|
||||
|
||||
mql1.addListener(function(x){
|
||||
resizeTest.step(function(){
|
||||
assert_equals(x, mql1, "Check that the MediaQueryList passed to the handler is the same that addListener was invoked on.");
|
||||
assert_true(x.matches, "(max-height: 50px) should now pass.");
|
||||
assert_true(mql2.matches, "(min-width: 150px) should still pass.");
|
||||
iframe.width = "100";
|
||||
});
|
||||
|
||||
listenerOrderTest.step(function(){
|
||||
assert_false(mql1.firstListenerCalled, "Check that this listener is only called once.");
|
||||
mql1.firstListenerCalled = true;
|
||||
});
|
||||
});
|
||||
|
||||
mql1.addListener(function(x){
|
||||
listenerOrderTest.step(function(){
|
||||
assert_true(mql1.firstListenerCalled, "Check that the listener added last is called last.");
|
||||
});
|
||||
listenerOrderTest.done();
|
||||
});
|
||||
|
||||
mql1.removeListener(rmListener);
|
||||
|
||||
mql2.addListener(function(x){
|
||||
duplicateListenerTest.done();
|
||||
resizeTest.step(function(){
|
||||
assert_equals(x, mql2, "Check that the MediaQueryList passed to the handler is the same that addListener was invoked on.");
|
||||
assert_true(mql1.matches, "(max-height: 50px) should still pass.");
|
||||
assert_false(x.matches, "(min-width: 150px) should now fail.");
|
||||
});
|
||||
resizeTest.done();
|
||||
});
|
||||
|
||||
iframe.height = "50";
|
||||
};]]>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,136 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: CSSOM View matchMedia handleEvent via addListener</title>
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#callbackdef-eventlistener">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/matchMedia.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
setup({ allow_uncaught_exception: true });
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIframe(t);
|
||||
const mql = iframe.contentWindow.matchMedia(MEDIA_QUERY);
|
||||
|
||||
let _this;
|
||||
let _event;
|
||||
const eventListener = {
|
||||
handleEvent(event) {
|
||||
_this = this;
|
||||
_event = event;
|
||||
},
|
||||
};
|
||||
|
||||
mql.addListener(eventListener);
|
||||
triggerMQLEvent(iframe);
|
||||
await waitForChangesReported();
|
||||
|
||||
assert_equals(_this, eventListener);
|
||||
assert_equals(_event.matches, mql.matches);
|
||||
assert_equals(_event.media, MEDIA_QUERY);
|
||||
}, "calls handleEvent method of event listener");
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIframe(t);
|
||||
const mql = iframe.contentWindow.matchMedia(MEDIA_QUERY);
|
||||
|
||||
let uncaughtError;
|
||||
const errorHandler = event => {
|
||||
uncaughtError = event.error;
|
||||
};
|
||||
window.addEventListener("error", errorHandler);
|
||||
t.add_cleanup(() => {
|
||||
window.removeEventListener("error", errorHandler);
|
||||
});
|
||||
|
||||
const thrownError = { name: "test" };
|
||||
mql.addListener({
|
||||
get handleEvent() {
|
||||
throw thrownError;
|
||||
},
|
||||
});
|
||||
|
||||
triggerMQLEvent(iframe);
|
||||
await waitForChangesReported();
|
||||
assert_equals(uncaughtError, thrownError);
|
||||
}, "rethrows errors when getting handleEvent");
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIframe(t);
|
||||
const mql = iframe.contentWindow.matchMedia(MEDIA_QUERY);
|
||||
|
||||
let calls = 0;
|
||||
mql.addListener({
|
||||
get handleEvent() {
|
||||
calls++;
|
||||
return function() {};
|
||||
},
|
||||
});
|
||||
assert_equals(calls, 0);
|
||||
|
||||
triggerMQLEvent(iframe);
|
||||
await waitForChangesReported();
|
||||
assert_equals(calls, 1);
|
||||
|
||||
triggerMQLEvent(iframe);
|
||||
await waitForChangesReported();
|
||||
assert_equals(calls, 2);
|
||||
}, "looks up handleEvent method on every event dispatch");
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIframe(t);
|
||||
const mql = iframe.contentWindow.matchMedia(MEDIA_QUERY);
|
||||
|
||||
let calls = 0;
|
||||
const eventListener = function() { calls++; };
|
||||
Object.defineProperty(eventListener, "handleEvent", {
|
||||
get: t.unreached_func("handleEvent method should not be looked up on functions"),
|
||||
});
|
||||
mql.addListener(eventListener);
|
||||
|
||||
triggerMQLEvent(iframe);
|
||||
await waitForChangesReported();
|
||||
assert_equals(calls, 1);
|
||||
}, "doesn't look up handleEvent method on callable event listeners");
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIframe(t);
|
||||
const mql = iframe.contentWindow.matchMedia(MEDIA_QUERY);
|
||||
|
||||
let uncaughtError;
|
||||
const errorHandler = event => {
|
||||
uncaughtError = event.error;
|
||||
};
|
||||
window.addEventListener("error", errorHandler);
|
||||
t.add_cleanup(() => {
|
||||
window.removeEventListener("error", errorHandler);
|
||||
});
|
||||
|
||||
mql.addListener({ handleEvent: null });
|
||||
triggerMQLEvent(iframe);
|
||||
await waitForChangesReported();
|
||||
|
||||
assert_equals(uncaughtError.name, "TypeError");
|
||||
}, "throws if handleEvent is falsy and not callable");
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIframe(t);
|
||||
const mql = iframe.contentWindow.matchMedia(MEDIA_QUERY);
|
||||
|
||||
let uncaughtError;
|
||||
const errorHandler = event => {
|
||||
uncaughtError = event.error;
|
||||
};
|
||||
window.addEventListener("error", errorHandler);
|
||||
t.add_cleanup(() => {
|
||||
window.removeEventListener("error", errorHandler);
|
||||
});
|
||||
|
||||
mql.addListener({ handleEvent: "str" });
|
||||
triggerMQLEvent(iframe);
|
||||
await waitForChangesReported();
|
||||
|
||||
assert_equals(uncaughtError.name, "TypeError");
|
||||
}, "throws if handleEvent is thruthy and not callable");
|
||||
</script>
|
|
@ -1,65 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Test: CSSOM View matchMedia addListener</title>
|
||||
<link rel="author" title="Chris Wu" href="mailto:pwx.frontend@gmail.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface" />
|
||||
<meta name="flags" content="dom" />
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
iframe { border: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<iframe width="200" height="100" id="iframe1"></iframe>
|
||||
<script>
|
||||
function reflow(doc) {
|
||||
doc.body.offsetWidth;
|
||||
}
|
||||
|
||||
var iframe = document.querySelector("iframe");
|
||||
var iframe_window = window.frames[0];
|
||||
var iframe1 = document.getElementById("iframe1");
|
||||
reflow(iframe_window.document);
|
||||
|
||||
var i = 0;
|
||||
var totalCount = 10;
|
||||
var count = 0;
|
||||
var divineCount = 10;
|
||||
var width_list = [201,199];
|
||||
var mq1 = iframe_window.matchMedia("(max-width:200px)");
|
||||
mq1.addListener(function(mql){
|
||||
|
||||
count = count + 1;
|
||||
|
||||
});
|
||||
|
||||
var equalAssert = async_test("Check for the correct number of event triggers");
|
||||
|
||||
var changeFrameWidth = function(iWidth) {
|
||||
iframe1.style.width = iWidth + "px";
|
||||
i = (i === 0) ? 1 : 0;
|
||||
totalCount = totalCount - 1;
|
||||
if(totalCount > 0)
|
||||
{
|
||||
step_timeout(function(){
|
||||
changeFrameWidth(width_list[i]);
|
||||
}, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
step_timeout(function(){
|
||||
equalAssert.step(function(){
|
||||
assert_equals(divineCount, count, "this will be 10 times of event triggers by change width");
|
||||
});
|
||||
equalAssert.done();
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
changeFrameWidth(width_list[0]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +1,21 @@
|
|||
const IFRAME_BASE_WIDTH = "200";
|
||||
const MEDIA_QUERY = `(max-width: ${IFRAME_BASE_WIDTH}px)`;
|
||||
const IFRAME_DEFAULT_SIZE = "200";
|
||||
const iframes = new WeakMap();
|
||||
|
||||
async function createMQL(t) {
|
||||
const iframe = await createIFrame(t);
|
||||
const mql = iframe.contentWindow.matchMedia(`(max-width: ${IFRAME_DEFAULT_SIZE}px)`);
|
||||
assert_true(mql.matches, "MQL should match on newly created <iframe>");
|
||||
iframes.set(mql, iframe);
|
||||
return mql;
|
||||
}
|
||||
|
||||
function createIFrame(t, width = IFRAME_DEFAULT_SIZE, height = width) {
|
||||
assert_not_equals(document.body, null, "<body> element is missing");
|
||||
|
||||
function createIframe(t) {
|
||||
const iframe = document.createElement("iframe");
|
||||
iframe.srcdoc = "";
|
||||
iframe.width = IFRAME_BASE_WIDTH;
|
||||
iframe.height = "100";
|
||||
iframe.width = String(width);
|
||||
iframe.height = String(height);
|
||||
iframe.style.border = "none";
|
||||
|
||||
t.add_cleanup(() => {
|
||||
|
@ -14,6 +24,7 @@ function createIframe(t) {
|
|||
|
||||
return new Promise(resolve => {
|
||||
iframe.addEventListener("load", () => {
|
||||
iframe.contentDocument.body.offsetWidth; // reflow
|
||||
resolve(iframe);
|
||||
});
|
||||
|
||||
|
@ -21,8 +32,10 @@ function createIframe(t) {
|
|||
});
|
||||
}
|
||||
|
||||
function triggerMQLEvent(iframe) {
|
||||
iframe.width = iframe.width === IFRAME_BASE_WIDTH ? "250" : IFRAME_BASE_WIDTH;
|
||||
function triggerMQLEvent(mql) {
|
||||
const iframe = iframes.get(mql);
|
||||
assert_not_equals(iframe, undefined, "Passed MQL instance was not created with createMQL");
|
||||
iframe.width = iframe.width === IFRAME_DEFAULT_SIZE ? "250" : IFRAME_DEFAULT_SIZE;
|
||||
}
|
||||
|
||||
function waitForChangesReported() {
|
||||
|
|
|
@ -36,3 +36,62 @@ function test_invalid_value(property, value) {
|
|||
assert_equals(div.style.getPropertyValue(property), "");
|
||||
}, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
|
||||
}
|
||||
|
||||
// serializedSelector can be the expected serialization of selector,
|
||||
// or an array of permitted serializations,
|
||||
// or omitted if value should serialize as selector.
|
||||
function test_valid_selector(selector, serializedSelector) {
|
||||
if (arguments.length < 2)
|
||||
serializedSelector = selector;
|
||||
|
||||
const stringifiedSelector = JSON.stringify(selector);
|
||||
|
||||
test(function(){
|
||||
document.querySelector(selector);
|
||||
assert_true(true, stringifiedSelector + " should not throw in querySelector");
|
||||
|
||||
const style = document.createElement("style");
|
||||
document.head.append(style);
|
||||
const {sheet} = style;
|
||||
document.head.removeChild(style);
|
||||
const {cssRules} = sheet;
|
||||
|
||||
assert_equals(cssRules.length, 0, "Sheet should have no rule");
|
||||
sheet.insertRule(selector + "{}");
|
||||
assert_equals(cssRules.length, 1, "Sheet should have 1 rule");
|
||||
|
||||
const readSelector = cssRules[0].selectorText;
|
||||
if (Array.isArray(serializedSelector))
|
||||
assert_in_array(readSelector, serializedSelector, "serialization should be sound");
|
||||
else
|
||||
assert_equals(readSelector, serializedSelector, "serialization should be canonical");
|
||||
|
||||
sheet.deleteRule(0);
|
||||
assert_equals(cssRules.length, 0, "Sheet should have no rule");
|
||||
sheet.insertRule(readSelector + "{}");
|
||||
assert_equals(cssRules.length, 1, "Sheet should have 1 rule");
|
||||
|
||||
assert_equals(cssRules[0].selectorText, readSelector, "serialization should round-trip");
|
||||
}, stringifiedSelector + " should be a valid selector");
|
||||
}
|
||||
|
||||
function test_invalid_selector(selector) {
|
||||
const stringifiedSelector = JSON.stringify(selector);
|
||||
|
||||
test(function(){
|
||||
assert_throws(
|
||||
DOMException.SYNTAX_ERR,
|
||||
() => document.querySelector(selector),
|
||||
stringifiedSelector + " should throw in querySelector");
|
||||
|
||||
const style = document.createElement("style");
|
||||
document.head.append(style);
|
||||
const {sheet} = style;
|
||||
document.head.removeChild(style);
|
||||
|
||||
assert_throws(
|
||||
DOMException.SYNTAX_ERR,
|
||||
() => sheet.insertRule(selector + "{}"),
|
||||
stringifiedSelector + " should throw in insertRule");
|
||||
}, stringifiedSelector + " should be an invalid selector");
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
recommonmark==0.5.0
|
||||
Sphinx==1.8.5
|
||||
recommonmark==0.6.0
|
||||
# pin this to the last Py2 release
|
||||
Sphinx==1.8.5 # pyup: <2.0
|
||||
sphinx-argparse==0.2.5
|
||||
|
|
|
@ -6,11 +6,11 @@ Currently, Android WebView support is experimental.
|
|||
|
||||
## Prerequisites
|
||||
|
||||
#### Please check [Chrome for Android](chrome_android.md) for the common instructions for Android support first.
|
||||
Please check [Chrome for Android](chrome_android.md) for the common instructions for Android support first.
|
||||
|
||||
#### Ensure you have a userdebug or eng Android build installed on the device.
|
||||
Ensure you have a userdebug or eng Android build installed on the device.
|
||||
|
||||
#### Install an up-to-date version of system webview shell.
|
||||
Install an up-to-date version of system webview shell:
|
||||
1. Go to [chromium-browser-snapshots](https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Android/)
|
||||
2. Find the subdirectory with the highest number and click it, this number can be found
|
||||
in the "Commit Position" column of row "LAST_CHANGE" (at bottom of page).
|
||||
|
@ -21,7 +21,7 @@ Currently, Android WebView support is experimental.
|
|||
* Run an emulator with
|
||||
[writable system partition from command line](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/android_emulator.md/)
|
||||
|
||||
#### If you have an issue with ChromeDriver version mismatch, try one of the following.
|
||||
If you have an issue with ChromeDriver version mismatch, try one of the following:
|
||||
* Try removing `_venv/bin/chromedriver` such that wpt runner can install a matching version
|
||||
automatically. Failing that, please check your environment path and make
|
||||
sure that no other ChromeDriver is used.
|
||||
|
@ -30,16 +30,16 @@ Currently, Android WebView support is experimental.
|
|||
./wpt run --webdriver-binary <binary path> ...
|
||||
```
|
||||
|
||||
#### Configure host remap rules in the [webview commandline file](https://cs.chromium.org/chromium/src/android_webview/docs/commandline-flags.md?l=57).
|
||||
Configure host remap rules in the [webview commandline file](https://cs.chromium.org/chromium/src/android_webview/docs/commandline-flags.md?l=57):
|
||||
```
|
||||
adb shell "echo '_ --host-resolver-rules=\"MAP nonexistent.*.test ~NOTFOUND, MAP *.test 127.0.0.1\"' > /data/local/tmp/webview-command-line"
|
||||
```
|
||||
|
||||
#### Ensure that `adb` can be found on your system's PATH.
|
||||
Ensure that `adb` can be found on your system's PATH.
|
||||
|
||||
## Running Tests
|
||||
|
||||
#### Example command line:
|
||||
Example command line:
|
||||
|
||||
```bash
|
||||
./wpt run --test-type=testharness android_webview <TESTS>
|
||||
|
|
|
@ -452,7 +452,9 @@ is called, the two conditions above apply like normal.
|
|||
|
||||
Dedicated and shared workers don't have an event that corresponds to the `load`
|
||||
event in a document. Therefore these worker tests always behave as if the
|
||||
`explicit_done` property is set to true. Service workers depend on the
|
||||
`explicit_done` property is set to true (unless they are defined using [the
|
||||
"multi-global" pattern](testharness.html#multi-global-tests)). Service workers
|
||||
depend on the
|
||||
[install](https://w3c.github.io/ServiceWorker/#service-worker-global-scope-install-event)
|
||||
event which is fired following the completion of [running the
|
||||
worker](https://html.spec.whatwg.org/multipage/workers.html#run-a-worker).
|
||||
|
|
|
@ -178,6 +178,11 @@ be made available by the framework:
|
|||
self.GLOBAL.isWindow()
|
||||
self.GLOBAL.isWorker()
|
||||
|
||||
Although [the global `done` function must be explicitly invoked for most
|
||||
dedicated worker tests and shared worker
|
||||
tests](testharness-api.html#determining-when-all-tests-are-complete), it is
|
||||
automatically invoked for tests defined using the "multi-global" pattern.
|
||||
|
||||
### Specifying a test title in auto-generated boilerplate tests
|
||||
|
||||
Use `// META: title=This is the title of the test` at the beginning of the resource.
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<script src=/resources/testharnessreport.js></script>
|
||||
<iframe src="Element-getElementsByTagName-change-document-HTMLNess-iframe.xml"></iframe>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
onload = function() {
|
||||
var parent = document.createElement("div");
|
||||
var child1 = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
|
||||
|
|
|
@ -44,36 +44,36 @@
|
|||
create_test("{{host}}:{{ports[https][0]}}", FORCED, {
|
||||
"site": "same-origin",
|
||||
"user": "",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
|
||||
create_test("{{hosts[][www]}}:{{ports[https][0]}}", FORCED, {
|
||||
"site": "same-site",
|
||||
"user": "",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
|
||||
create_test("{{hosts[alt][www]}}:{{ports[https][0]}}", FORCED, {
|
||||
"site": "cross-site",
|
||||
"user": "",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
|
||||
create_test("{{host}}:{{ports[https][0]}}", USER, {
|
||||
"site": "same-origin",
|
||||
"user": "?1",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
|
||||
create_test("{{hosts[][www]}}:{{ports[https][0]}}", USER, {
|
||||
"site": "same-site",
|
||||
"user": "?1",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
|
||||
create_test("{{hosts[alt][www]}}:{{ports[https][0]}}", USER, {
|
||||
"site": "cross-site",
|
||||
"user": "?1",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
assert_header_equals(e.data, {
|
||||
"site": "cross-site",
|
||||
"user": "",
|
||||
"mode": "nested-navigate",
|
||||
"mode": "navigate",
|
||||
});
|
||||
t.done();
|
||||
}));
|
||||
|
|
|
@ -27,18 +27,18 @@
|
|||
create_test("{{host}}:{{ports[https][0]}}", {
|
||||
"site": "same-origin",
|
||||
"user": "",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
|
||||
create_test("{{hosts[][www]}}:{{ports[https][0]}}", {
|
||||
"site": "same-site",
|
||||
"user": "",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
|
||||
create_test("{{hosts[alt][www]}}:{{ports[https][0]}}", {
|
||||
"site": "cross-site",
|
||||
"user": "",
|
||||
"mode": "nested-navigate"
|
||||
"mode": "navigate"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
const channel = new MessageChannel();
|
||||
window.parent.postMessage({ state: "port1", data: channel.port1 }, '*', [channel.port1]);
|
||||
window.onmessage = () => window.parent.postMessage({ state: "port2", data: channel.port2 }, '*', [channel.port2]);
|
||||
</script>
|
|
@ -0,0 +1,2 @@
|
|||
Cross-Origin-Embedder-Policy: require-corp
|
||||
Cross-Origin-Resource-Policy: cross-origin
|
|
@ -0,0 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
const channel = new MessageChannel();
|
||||
window.parent.postMessage(channel.port2, '*', [channel.port2]);
|
||||
channel.port1.onmessage = e => { alert(e.data); channel.port1.postMessage("message event received") };
|
||||
channel.port1.onmessageerror = () => channel.port1.postMessage("messageerror event received");
|
||||
</script>
|
|
@ -0,0 +1,2 @@
|
|||
Cross-Origin-Embedder-Policy: require-corp
|
||||
Cross-Origin-Resource-Policy: cross-origin
|
|
@ -1,23 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Structured cloning of SharedArrayBuffers into windows using MessageChannel</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#structuredserialize">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/test-incrementer.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
promise_test(t => {
|
||||
return new Promise(resolve => {
|
||||
const iframe = document.createElement("iframe");
|
||||
window.onmessage = t.step_func((message) => {
|
||||
// data will be a MessagePort
|
||||
resolve(testSharingViaIncrementerScript(t, message.data, "window", message.data, "iframe"));
|
||||
});
|
||||
iframe.src = "resources/incrementer-iframe-messagechannel.html";
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
}, "postMessaging to a same-origin iframe via MessageChannel allows them to see each others' modifications");
|
||||
</script>
|
|
@ -0,0 +1,70 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Structured cloning of SharedArrayBuffers into windows using MessageChannel</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#structuredserialize">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/test-incrementer.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
["same-origin", "same-site"].forEach(originOrSite => {
|
||||
promise_test(t => {
|
||||
return new Promise(resolve => {
|
||||
const iframe = document.createElement("iframe");
|
||||
window.onmessage = t.step_func((message) => {
|
||||
// data will be a MessagePort
|
||||
resolve(testSharingViaIncrementerScript(t, message.data, "window", message.data, "iframe"));
|
||||
});
|
||||
let url = "resources/incrementer-iframe-messagechannel.html";
|
||||
if (originOrSite === "same-site") {
|
||||
url = get_host_info().HTTPS_REMOTE_ORIGIN + new URL(url, window.location).pathname;
|
||||
}
|
||||
iframe.src = url;
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
}, `postMessaging to a ${originOrSite} iframe via MessageChannel allows them to see each others' modifications`);
|
||||
});
|
||||
|
||||
promise_test(t => {
|
||||
return new Promise(resolve => {
|
||||
const iframe = document.createElement("iframe");
|
||||
window.onmessage = t.step_func(message => {
|
||||
// data will be a MessagePort
|
||||
message.data.postMessage(new SharedArrayBuffer(10));
|
||||
message.data.onmessage = t.step_func(message => {
|
||||
assert_equals(message.data, "messageerror event received");
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
iframe.src = get_host_info().HTTPS_NOTSAMESITE_ORIGIN + new URL("resources/iframe-messagechannel-failure.html", window.location).pathname;
|
||||
document.body.append(iframe);
|
||||
});
|
||||
}, "postMessaging to a cross-site iframe via MessageChannel should fail");
|
||||
|
||||
promise_test(t => {
|
||||
return new Promise(resolve => {
|
||||
const iframe = document.createElement("iframe");
|
||||
let port = null;
|
||||
window.onmessage = t.step_func(message => {
|
||||
if (message.data.state === "port1") {
|
||||
port = message.data.data;
|
||||
port.postMessage(new SharedArrayBuffer(10));
|
||||
message.source.postMessage("send port2", "*");
|
||||
} else if (message.data.state === "port2") {
|
||||
// Note that onmessage calls start()
|
||||
message.data.data.onmessage = t.step_func(message => {
|
||||
assert_true(message.data instanceof SharedArrayBuffer);
|
||||
assert_equals(message.data.byteLength, 10);
|
||||
resolve();
|
||||
});
|
||||
message.data.data.onmessageerror = t.unreached_func();
|
||||
}
|
||||
});
|
||||
iframe.src = get_host_info().HTTPS_NOTSAMESITE_ORIGIN + new URL("resources/iframe-messagechannel-complex.html", window.location).pathname;
|
||||
document.body.append(iframe);
|
||||
});
|
||||
}, "postMessaging with a MessageChannel that's been cross-site should succeed");
|
||||
</script>
|
Binary file not shown.
Binary file not shown.
|
@ -1,2 +1,2 @@
|
|||
// JavaScript file with UTF-8 BOM.
|
||||
executed_utf8_bom = '三村かな子';
|
||||
window.executed_utf8_bom = '三村かな子';
|
||||
|
|
|
@ -84,6 +84,11 @@ dictionary MediaCapabilitiesInfo {
|
|||
|
||||
dictionary MediaCapabilitiesDecodingInfo : MediaCapabilitiesInfo {
|
||||
required MediaKeySystemAccess keySystemAccess;
|
||||
MediaDecodingConfiguration configuration;
|
||||
};
|
||||
|
||||
dictionary MediaCapabilitiesEncodingInfo : MediaCapabilitiesInfo {
|
||||
MediaEncodingConfiguration configuration;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
|
|
|
@ -92,7 +92,7 @@ function step1() {
|
|||
}
|
||||
|
||||
function step2() {
|
||||
assert_equals(entries.length, 4, "Has 3 total notifications because 4th element was added.");
|
||||
assert_equals(entries.length, 4, "Has 4 total notifications because 4th element was added.");
|
||||
checkRect(entries[3].boundingClientRect, [0, 100, 300, 400], "Check 4th entry rect");
|
||||
assert_equals(entries[3].target.id, 'target4', "Check 4th entry target id.");
|
||||
checkIsIntersecting(entries, 3, false);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue