Auto merge of #22810 - servo-wpt-sync:wpt_update_01-02-2019, r=jdm

Sync WPT with upstream (01-02-2019)

Automated downstream sync of changes from upstream as of 01-02-2019.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22810)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-02-02 07:57:53 -05:00 committed by GitHub
commit 4e463dec65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
175 changed files with 2749 additions and 678 deletions

View file

@ -37,3 +37,6 @@
[Revoke blob URL after creating Request, will fetch] [Revoke blob URL after creating Request, will fetch]
expected: FAIL expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
[child-move-reveals-parent-background.html]
expected: TIMEOUT

View file

@ -332,3 +332,6 @@
[Matching font-style: 'oblique 21deg' should prefer 'oblique 40deg 50deg' over 'oblique 20deg'] [Matching font-style: 'oblique 21deg' should prefer 'oblique 40deg 50deg' over 'oblique 20deg']
expected: FAIL expected: FAIL
[Matching font-style: 'oblique 0deg' should prefer 'oblique 5deg' over 'oblique 15deg 20deg']
expected: FAIL

View file

@ -80,3 +80,9 @@
[Mismatched lengths (to is shorter), partial match: Animation between "rotate(720deg) translateX(0px) scaleX(2)" and "rotate(0deg) scaleX(1)" at progress 0.25] [Mismatched lengths (to is shorter), partial match: Animation between "rotate(720deg) translateX(0px) scaleX(2)" and "rotate(0deg) scaleX(1)" at progress 0.25]
expected: FAIL expected: FAIL
[Match on rotation using collinear rotation axes: Animation between "rotate3d(1, 1, 1, -60deg) translateX(100px)" and "rotate3d(2, 2, 2, 60deg) translateY(200px)" at progress 0.25]
expected: FAIL
[Match on rotation with spherical interpolation: Animation between "rotate3d(1, 0, 0, 360deg) translateX(100px)" and "rotate3d(0, 1, 0, -720deg) translateY(200px)" at progress 0.25]
expected: FAIL

View file

@ -0,0 +1,28 @@
[calc-numbers.html]
[testing tab-size: calc(bla) 10px]
expected: FAIL
[testing tab-size: calc(10px)]
expected: FAIL
[testing tab-size: calc(100%)]
expected: FAIL
[testing tab-size: calc(10px) bla]
expected: FAIL
[testing tab-size: calc(2 * 3)]
expected: FAIL
[testing tab-size: calc(2 * -4)]
expected: FAIL
[testing tab-size: calc(1 + 100%)]
expected: FAIL
[testing tab-size: calc(1 + 1px)]
expected: FAIL
[testing tab-size: calc(2 / 4)]
expected: FAIL

View file

@ -6,3 +6,6 @@
[Instant scrolling while doing history navigation.] [Instant scrolling while doing history navigation.]
expected: FAIL expected: FAIL
[Smooth scrolling while doing history navigation.]
expected: FAIL

View file

@ -384,3 +384,21 @@
[DOMMatrixReadOnly interface: operation scaleNonUniform(unrestricted double, unrestricted double)] [DOMMatrixReadOnly interface: operation scaleNonUniform(unrestricted double, unrestricted double)]
expected: FAIL expected: FAIL
[DOMPointReadOnly interface: default toJSON operation on new DOMPoint()]
expected: FAIL
[DOMPointReadOnly interface: default toJSON operation on new DOMPointReadOnly()]
expected: FAIL
[DOMRectReadOnly interface: default toJSON operation on new DOMRect()]
expected: FAIL
[DOMRectReadOnly interface: default toJSON operation on new DOMRectReadOnly()]
expected: FAIL
[DOMQuad interface: default toJSON operation on new DOMQuad()]
expected: FAIL
[DOMMatrixReadOnly interface: default toJSON operation on new DOMMatrixReadOnly()]
expected: FAIL

View file

@ -107,3 +107,21 @@
[DOMMatrixReadOnly interface: operation scaleNonUniform(unrestricted double, unrestricted double)] [DOMMatrixReadOnly interface: operation scaleNonUniform(unrestricted double, unrestricted double)]
expected: FAIL expected: FAIL
[DOMPointReadOnly interface: default toJSON operation on new DOMPoint()]
expected: FAIL
[DOMPointReadOnly interface: default toJSON operation on new DOMPointReadOnly()]
expected: FAIL
[DOMRectReadOnly interface: default toJSON operation on new DOMRect()]
expected: FAIL
[DOMRectReadOnly interface: default toJSON operation on new DOMRectReadOnly()]
expected: FAIL
[DOMQuad interface: default toJSON operation on new DOMQuad()]
expected: FAIL
[DOMMatrixReadOnly interface: default toJSON operation on new DOMMatrixReadOnly()]
expected: FAIL

View file

@ -1,2 +1,2 @@
[parser-sets-attributes-and-children.html] [parser-sets-attributes-and-children.html]
expected: TIMEOUT expected: CRASH

View file

@ -2,7 +2,7 @@
type: testharness type: testharness
[single-byte-decoder.html?document] [single-byte-decoder.html?document]
expected: TIMEOUT expected: CRASH
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)] [ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
expected: FAIL expected: FAIL

View file

@ -312,3 +312,9 @@
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk] [<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
expected: FAIL

View file

@ -11,3 +11,6 @@
[X-Content-Type-Options%3A%20nosniff%0C] [X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL expected: FAIL
[X-Content-Type-Options%3A%0D%0AX-Content-Type-Options%3A%20nosniff]
expected: FAIL

View file

@ -11,6 +11,9 @@
[Test default toJSON operation of Performance] [Test default toJSON operation of Performance]
expected: FAIL expected: FAIL
[Performance interface: default toJSON operation on performance]
expected: FAIL
[idlharness.any.serviceworker.html] [idlharness.any.serviceworker.html]
[idlharness] [idlharness]
@ -41,3 +44,6 @@
[Test default toJSON operation of Performance] [Test default toJSON operation of Performance]
expected: FAIL expected: FAIL
[Performance interface: default toJSON operation on performance]
expected: FAIL

View file

@ -1,4 +0,0 @@
[javascript-url-abort-return-value-string.tentative.html]
[Aborting fetch for javascript:string navigation]
expected: FAIL

View file

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

View file

@ -0,0 +1,4 @@
[embedded-opener.html]
[opener and embedded documents; using window.open()]
expected: FAIL

View file

@ -0,0 +1,5 @@
[link-multiple-error-events.html]
expected: ERROR
[Check if the <link>'s error event fires for each style sheet it fails to load]
expected: NOTRUN

View file

@ -0,0 +1,5 @@
[link-multiple-load-events.html]
expected: ERROR
[Check if the <link>'s load event fires for each style sheet it loads]
expected: NOTRUN

View file

@ -0,0 +1,10 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -1,4 +0,0 @@
[DOMContentLoaded-defer.html]
[The end: DOMContentLoaded and defer scripts]
expected: FAIL

View file

@ -34,6 +34,9 @@
[PerformanceMark interface object length] [PerformanceMark interface object length]
expected: FAIL expected: FAIL
[PerformanceEntry interface: default toJSON operation on mark]
expected: FAIL
[idlharness.any.html] [idlharness.any.html]
[Untitled] [Untitled]
@ -66,6 +69,9 @@
[PerformanceMark interface object length] [PerformanceMark interface object length]
expected: FAIL expected: FAIL
[PerformanceEntry interface: default toJSON operation on mark]
expected: FAIL
[idlharness.https.any.serviceworker.html] [idlharness.https.any.serviceworker.html]
type: testharness type: testharness

View file

@ -0,0 +1,33 @@
[po-observe-type.any.html]
[Calling observe() with entryTypes and then type should throw an InvalidModificationError]
expected: FAIL
[Calling observe() with type and then entryTypes should throw an InvalidModificationError]
expected: FAIL
[Calling observe() with type and entryTypes should throw a SyntaxError]
expected: FAIL
[Passing in unknown values to type does throw an exception.]
expected: FAIL
[observe() with different type values stacks.]
expected: FAIL
[po-observe-type.any.worker.html]
[Calling observe() with entryTypes and then type should throw an InvalidModificationError]
expected: FAIL
[Calling observe() with type and then entryTypes should throw an InvalidModificationError]
expected: FAIL
[Calling observe() with type and entryTypes should throw a SyntaxError]
expected: FAIL
[Passing in unknown values to type does throw an exception.]
expected: FAIL
[observe() with different type values stacks.]
expected: FAIL

View file

@ -9,6 +9,15 @@
[Check observer callback parameter and this values] [Check observer callback parameter and this values]
expected: FAIL expected: FAIL
[no 'type' or 'entryTypes' throws a SyntaxError]
expected: FAIL
[Empty sequence entryTypes does not throw an exception.]
expected: FAIL
[Unknown entryTypes do not throw an exception.]
expected: FAIL
[po-observe.any.html] [po-observe.any.html]
type: testharness type: testharness
@ -21,3 +30,12 @@
[Check observer callback parameter and this values] [Check observer callback parameter and this values]
expected: FAIL expected: FAIL
[no 'type' or 'entryTypes' throws a SyntaxError]
expected: FAIL
[Empty sequence entryTypes does not throw an exception.]
expected: FAIL
[Unknown entryTypes do not throw an exception.]
expected: FAIL

View file

@ -12,6 +12,3 @@
[Verifies the resolution of entry.startTime is at least 5 microseconds.] [Verifies the resolution of entry.startTime is at least 5 microseconds.]
expected: TIMEOUT expected: TIMEOUT
[Verifies the resolution of performance.now() is at least 5 microseconds.]
expected: FAIL

View file

@ -56,9 +56,6 @@
[PerformanceResourceTiming interface: attribute domainLookupStart] [PerformanceResourceTiming interface: attribute domainLookupStart]
expected: FAIL expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "redirectStart" with the proper type]
expected: PASS
[PerformanceResourceTiming interface: attribute connectStart] [PerformanceResourceTiming interface: attribute connectStart]
expected: FAIL expected: FAIL
@ -80,12 +77,12 @@
[PerformanceResourceTiming interface: attribute domainLookupEnd] [PerformanceResourceTiming interface: attribute domainLookupEnd]
expected: FAIL expected: FAIL
[PerformanceResourceTiming interface: attribute redirectStart]
expected: PASS
[PerformanceResourceTiming interface: resource must inherit property "connectEnd" with the proper type] [PerformanceResourceTiming interface: resource must inherit property "connectEnd" with the proper type]
expected: FAIL expected: FAIL
[PerformanceResourceTiming interface: default toJSON operation on resource]
expected: FAIL
[idlharness.any.worker.html] [idlharness.any.worker.html]
[PerformanceResourceTiming interface: resource must inherit property "workerStart" with the proper type] [PerformanceResourceTiming interface: resource must inherit property "workerStart" with the proper type]
@ -187,6 +184,6 @@
[PerformanceResourceTiming interface: attribute domainLookupEnd] [PerformanceResourceTiming interface: attribute domainLookupEnd]
expected: FAIL expected: FAIL
[PerformanceResourceTiming interface: attribute redirectStart] [PerformanceResourceTiming interface: default toJSON operation on resource]
expected: PASS expected: FAIL

View file

@ -0,0 +1,4 @@
[broadcastchannel-success-and-failure.html]
[WebAssembly.Module cannot cross agent clusters, BroadcastChannel edition]
expected: FAIL

View file

@ -0,0 +1,4 @@
[broadcastchannel-success.html]
[Structured cloning of WebAssembly.Module: BroadcastChannel within the same agent cluster]
expected: FAIL

View file

@ -0,0 +1,11 @@
[identity-not-preserved.html]
expected: ERROR
[postMessaging to this window does not give back the same WebAssembly.Module]
expected: TIMEOUT
[postMessaging to a worker and back does not give back the same WebAssembly.Module]
expected: TIMEOUT
[postMessaging to an iframe and back does not give back the same WebAssembly.Module]
expected: TIMEOUT

View file

@ -0,0 +1,9 @@
[nested-worker-success.any.sharedworker.html]
[nested-worker-success]
expected: FAIL
[nested-worker-success.any.worker.html]
[postMessaging to a dedicated sub-worker allows them to see each others' modifications]
expected: FAIL

View file

@ -0,0 +1,10 @@
[no-transferring.html]
[Trying to transfer a WebAssembly.Module to a worker throws]
expected: FAIL
[Trying to transfer a WebAssembly.Module through a MessagePort throws]
expected: FAIL
[Trying to transfer a WebAssembly.Module to this window throws]
expected: FAIL

View file

@ -0,0 +1,15 @@
[serialization-via-idb.any.html]
[WebAssembly.Module cloning via the IndexedDB: is interleaved correctly]
expected: FAIL
[WebAssembly.Module cloning via IndexedDB: basic case]
expected: FAIL
[serialization-via-idb.any.worker.html]
[WebAssembly.Module cloning via the IndexedDB: is interleaved correctly]
expected: FAIL
[WebAssembly.Module cloning via IndexedDB: basic case]
expected: FAIL

View file

@ -0,0 +1,15 @@
[serialization-via-notifications-api.any.worker.html]
[WebAssembly.Module cloning via the Notifications API's data member: basic case]
expected: FAIL
[WebAssembly.Module cloning via the Notifications API's data member: is interleaved correctly]
expected: FAIL
[serialization-via-notifications-api.any.html]
[WebAssembly.Module cloning via the Notifications API's data member: basic case]
expected: FAIL
[WebAssembly.Module cloning via the Notifications API's data member: is interleaved correctly]
expected: FAIL

View file

@ -0,0 +1,4 @@
[window-domain-success.sub.html]
[postMessaging to a same-origin-domain (but not same-origin) iframe allows them to instantiate]
expected: FAIL

View file

@ -0,0 +1,4 @@
[window-messagechannel-success.html]
[postMessaging to a dedicated worker via MessageChannel allows them to instantiate]
expected: FAIL

View file

@ -0,0 +1,4 @@
[window-serviceworker-failure.https.html]
[WebAssembly.Module cannot cross agent clusters, service worker edition]
expected: FAIL

View file

@ -0,0 +1,4 @@
[window-sharedworker-failure.html]
[WebAssembly.Modules cannot cross agent clusters, shared worker edition]
expected: FAIL

View file

@ -0,0 +1,4 @@
[window-similar-but-cross-origin-success.sub.html]
[postMessaging to a not same-origin-domain, but similar origin, iframe allows them to instantiate]
expected: FAIL

View file

@ -0,0 +1,13 @@
[window-simple-success.html]
[postMessaging to a same-origin opened window allows them to instantiate]
expected: FAIL
[postMessaging to a same-origin deeply-nested iframe allows them to instantiate]
expected: FAIL
[postMessaging to a dedicated worker allows them to instantiate]
expected: FAIL
[postMessaging to a same-origin iframe allows them to instantiate]
expected: FAIL

View file

@ -1,4 +1,5 @@
[realtimeanalyser-fft-scaling.html] [realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.] [X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,9 @@
[Worker-location.sub.any.sharedworker.html]
[Worker-location]
expected: FAIL
[Worker-location.sub.any.worker.html]
[Test WorkerLocation properties.]
expected: FAIL

View file

@ -13,6 +13,11 @@
# - A scheduled build needs to be set up for the the epochs/daily branch. # - A scheduled build needs to be set up for the the epochs/daily branch.
# - To get results from scheduled builds into wpt.fyi, a service connection # - To get results from scheduled builds into wpt.fyi, a service connection
# named wpt.fyi with URL https://wpt.fyi is needed. # named wpt.fyi with URL https://wpt.fyi is needed.
# - Self-hosted agents for Windows 10 are used:
# - 'Hosted Windows Client' is the latest Windows 10
# - 'Hosted Windows Client Next' is Windows 10 Insider Preview
# Documention for the setup of these agents:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows
jobs: jobs:
# The affected tests jobs are unconditional for speed, as most PRs have one or # The affected tests jobs are unconditional for speed, as most PRs have one or
@ -127,6 +132,59 @@ jobs:
parameters: parameters:
directory: tools/wpt/ directory: tools/wpt/
- job: infrastructure_win10
displayName: 'infrastructure/ tests (Windows 10)'
# This job is only triggered manually until it has been shown to be robust.
condition: and(eq(variables['Build.Reason'], 'Manual'), variables['run_infrastructure_win10'])
pool:
name: 'Hosted Windows Client'
steps:
- template: tools/ci/azure/system_info.yml
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/install_python.yml
- template: tools/ci/azure/pip_install.yml
parameters:
packages: virtualenv
- template: tools/ci/azure/install_certs.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 $(Build.ArtifactStagingDirectory)/edge.tbpl.log --log-tbpl-level info edge_webdriver infrastructure/
displayName: 'Run tests (Edge)'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'
inputs:
artifactName: 'infrastructure'
condition: succeededOrFailed()
- template: tools/ci/azure/cleanup_win10.yml
- job: all_edge
displayName: 'all tests (Edge)'
# This job is only triggered manually until it has been shown to be robust.
condition: and(eq(variables['Build.Reason'], 'Manual'), variables['run_all_edge'])
# There are 5 agents in the pool, but use more jobs so that each takes <1h.
strategy:
parallel: 20
timeoutInMinutes: 360
pool:
name: 'Hosted Windows Client'
steps:
- template: tools/ci/azure/system_info.yml
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/install_python.yml
- template: tools/ci/azure/pip_install.yml
parameters:
packages: virtualenv
- template: tools/ci/azure/install_certs.yml
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
- script: python ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --test-types reftest testharness --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json edge_webdriver
displayName: 'Run tests'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'
inputs:
artifactName: 'results'
- template: tools/ci/azure/cleanup_win10.yml
- job: all_macOS - job: all_macOS
displayName: 'all tests (Safari Technology Preview)' displayName: 'all tests (Safari Technology Preview)'
condition: eq(variables['Build.Reason'], 'Schedule') condition: eq(variables['Build.Reason'], 'Schedule')

View file

@ -14,83 +14,146 @@
} }
</style> </style>
<script> <div id="target" class='target'></div>
function CreateTest(target, effect, verify, test_name) {
promise_test(async function() {
await registerConstantLocalTimeAnimator(2000);
const animation = new WorkletAnimation('constant_time', effect);
animation.play();
await waitForAsyncAnimationFrames(1); <script>
// waitTwoAnimationFrames guarantees a compositor frame that could update setup(setupAndRegisterTests, {explicit_done: true});
// the opacity value in the worklet. Meanwhile, getComputedStyle needs an
// extra frame to fetch the updated value. function setupAndRegisterTests() {
await waitForNextFrame(); registerConstantLocalTimeAnimator(2000).then(() => {
verify(); promise_test(
animation.cancel(); effect_with_fill_mode_forwards,
}, test_name); "Effect with fill mode forwards in after phase produces output that is equivalent to effect's end value.");
promise_test(
effect_without_fill_mode_forwards,
'Effect without fill mode forwards in after phase (local time beyond end) should deactivate the animation.');
promise_test(
effect_without_fill_forwards_at_end,
'Effect without fill mode in after phase (local time at end) should deactivate the animation.');
promise_test(
effect_with_fill_backwards,
"Effect with fill mode backwards in before phase produces output that is equivalent to effect's start value.");
promise_test(
effect_without_fill_backwards,
'Effect without fill mode backwards in before phase (local time before start) should deactivate the animation.');
promise_test(
effect_without_fill_backwards_at_start,
'Effect with local time at start point is in active phase.');
done();
});
}
async function effect_with_fill_mode_forwards(t) {
const effect_with_fill_forwards = new KeyframeEffect(
target,
{ opacity: [0.5, 0] },
{ duration: 1000, fill: 'forwards' });
const animation = new WorkletAnimation(
'constant_time',
effect_with_fill_forwards);
animation.play();
await waitForAsyncAnimationFrames(1);
await waitForNextFrame();
assert_equals(getComputedStyle(target).opacity, '0');
animation.cancel();
}
async function effect_without_fill_mode_forwards(t) {
const effect_without_fill_forwards = new KeyframeEffect(
target,
{ opacity: [0.5, 0] },
{ duration: 1000 });
const animation = new WorkletAnimation(
'constant_time',
effect_without_fill_forwards);
animation.play();
await waitForAsyncAnimationFrames(1);
await waitForNextFrame();
assert_equals(getComputedStyle(target).opacity, '1');
animation.cancel();
}
async function effect_without_fill_forwards_at_end(t) {
const effect_without_fill_forwards_at_end = new KeyframeEffect(
target,
{ opacity: [0.5, 0] },
{ duration: 2000 });
const animation = new WorkletAnimation(
'constant_time',
effect_without_fill_forwards_at_end);
animation.play();
await waitForAsyncAnimationFrames(1);
await waitForNextFrame();
assert_equals(getComputedStyle(target).opacity, '1');
animation.cancel();
}
async function effect_with_fill_backwards(t) {
const effect_with_fill_backwards = new KeyframeEffect(
target,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2001, fill: 'backwards' });
const animation = new WorkletAnimation(
'constant_time',
effect_with_fill_backwards);
animation.play();
await waitForAsyncAnimationFrames(1);
await waitForNextFrame();
assert_equals(getComputedStyle(target).opacity, '0.5');
animation.cancel();
}
async function effect_without_fill_backwards(t) {
const effect_without_fill_backwards = new KeyframeEffect(
target,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2001 });
const animation = new WorkletAnimation(
'constant_time',
effect_without_fill_backwards);
animation.play();
await waitForAsyncAnimationFrames(1);
await waitForNextFrame();
assert_equals(getComputedStyle(target).opacity, '1');
animation.cancel();
}
async function effect_without_fill_backwards_at_start(t) {
const effect_without_fill_backwards_at_start = new KeyframeEffect(
target,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2000 });
const animation = new WorkletAnimation(
'constant_time',
effect_without_fill_backwards_at_start);
animation.play();
await waitForAsyncAnimationFrames(1);
await waitForNextFrame();
assert_equals(getComputedStyle(target).opacity, '0.5');
animation.cancel();
} }
</script> </script>
<div id="target1" class='target'></div>
<div id="target2" class='target'></div>
<div id="target3" class='target'></div>
<div id="target4" class='target'></div>
<div id="target5" class='target'></div>
<div id="target6" class='target'></div>
<script>
const effect_with_fill_forwards = new KeyframeEffect(
target1,
{ opacity: [0.5, 0] },
{ duration: 1000, fill: 'forwards' });
CreateTest(target1,
effect_with_fill_forwards,
function() { assert_equals(getComputedStyle(target1).opacity, '0'); },
"Effect with fill mode forwards in after phase produces output that is equivalent to effect's end value.");
const effect_without_fill_forwards = new KeyframeEffect(
target2,
{ opacity: [0.5, 0] },
{ duration: 1000 });
CreateTest(target2,
effect_without_fill_forwards,
function() { assert_equals(getComputedStyle(target2).opacity, '1'); },
'Effect without fill mode forwards in after phase (local time beyond end) should deactivate the animation.');
const effect_without_fill_forwards_at_end = new KeyframeEffect(
target3,
{ opacity: [0.5, 0] },
{ duration: 2000 });
CreateTest(target3,
effect_without_fill_forwards_at_end,
function() { assert_equals(getComputedStyle(target3).opacity, '1'); },
'Effect without fill mode in after phase (local time at end) should deactivate the animation.');
const effect_with_fill_backwards = new KeyframeEffect(
target4,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2001, fill: 'backwards' });
CreateTest(target4,
effect_with_fill_backwards,
function() { assert_equals(getComputedStyle(target4).opacity, '0.5'); },
"Effect with fill mode backwards in before phase produces output that is equivalent to effect's start value.");
const effect_without_fill_backwards = new KeyframeEffect(
target5,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2001 });
CreateTest(target5,
effect_without_fill_backwards,
function() { assert_equals(getComputedStyle(target5).opacity, '1'); },
'Effect without fill mode backwards in before phase (local time before start) should deactivate the animation.');
const effect_without_fill_backwards_at_start = new KeyframeEffect(
target6,
{ opacity: [0.5, 0] },
{ duration: 1000, delay: 2000 });
CreateTest(target6,
effect_without_fill_backwards_at_start,
function() { assert_equals(getComputedStyle(target6).opacity, '0.5'); },
'Effect with local time at start point is in active phase.');
</script>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<style>
#parent {
width: 150px;
height: 150px;
background-color: green;
}
</style>
<p>There should be a green square below.</p>
<div id="parent"></div>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>Child moves and reveals previously obscured background of the parent</title>
<link rel="match" href="child-move-reveals-parent-background-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds">
<script src="/common/reftest-wait.js"></script>
<style>
#parent {
width: 150px;
height: 150px;
background-color: green;
}
#child {
width: 150px;
height: 150px;
background-color: white;
position: relative;
}
</style>
<p>There should be a green square below.</p>
<div id="parent">
<div id="child"></div>
</div>
<script>
requestAnimationFrame(() => requestAnimationFrame(() => {
child.style.left = '150px';
takeScreenshot();
}));
</script>

View file

@ -11,6 +11,8 @@
test(() => { test(() => {
assert_true(CSS.supports("background: env(test)")); assert_true(CSS.supports("background: env(test)"));
assert_true(CSS.supports("background", "env(test)")); assert_true(CSS.supports("background", "env(test)"));
assert_true(CSS.supports("background", "env(test, 10px)"));
assert_true(CSS.supports("background", "foobar(env(test))"));
assert_false(CSS.supports("background", "env()")); assert_false(CSS.supports("background", "env()"));
assert_false(CSS.supports("background", "env(test,)")); assert_false(CSS.supports("background", "env(test,)"));
}); });

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Multi-column Layout Test: Insert a block containing a spanner kid. The spanner kid should correctly span across all columns</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">
<link rel="match" href="multicol-span-all-dynamic-add-003-ref.html">
<meta name="assert" content="This test checks that an inserted block containing 'column-span' element should be rendered correctly.">
<script>
function runTest() {
document.body.offsetHeight;
// Create a subtree like the following, and insert it into column as the
// first child.
// <div>
// block1
// <h3>spanner</h3>
// </div>
var spanner = document.createElement("h3");
var spannerText = document.createTextNode("spanner");
spanner.appendChild(spannerText);
var block1 = document.createElement("div");
var block1Text = document.createTextNode("block1");
block1.appendChild(block1Text)
block1.appendChild(spanner);
var column = document.getElementById("column");
column.insertBefore(block1, column.children[0]);
document.documentElement.removeAttribute("class");
}
</script>
<style>
#column {
column-count: 3;
column-rule: 6px solid;
width: 400px;
outline: 1px solid black;
}
h3 {
column-span: all;
outline: 1px solid blue;
}
</style>
<body onload="runTest();">
<article id="column">
<div>block2</div>
</article>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS Multi-column Layout Test Reference: Append a block containing a spanner kid. The spanner kid should correctly span across all columns</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
#column {
column-count: 3;
column-rule: 6px solid;
width: 400px;
outline: 1px solid black;
}
h3 {
column-span: all;
outline: 1px solid blue;
}
</style>
<body>
<article id="column">
<div>block1
<div>
<h3>spanner</h3>
block2
</div>
</div>
</article>
</body>
</html>

View file

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Multi-column Layout Test: Append a block containing a spanner kid. The spanner kid should correctly span across all columns</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">
<link rel="match" href="multicol-span-all-dynamic-add-012-ref.html">
<meta name="assert" content="This test checks that an appended block containing 'column-span' element should be rendered correctly.">
<script>
function runTest() {
document.body.offsetHeight;
// Create a subtree like the following, and append it to block1.
// <div>
// <h3>spanner</h3>
// block2
// </div>
var spanner = document.createElement("h3");
var spannerText = document.createTextNode("spanner");
spanner.appendChild(spannerText);
var block2 = document.createElement("div");
var block2Text = document.createTextNode("block2");
block2.appendChild(spanner);
block2.appendChild(block2Text)
var block1 = document.getElementById("block1");
block1.appendChild(block2);
document.documentElement.removeAttribute("class");
}
</script>
<style>
#column {
column-count: 3;
column-rule: 6px solid;
width: 400px;
outline: 1px solid black;
}
h3 {
column-span: all;
outline: 1px solid blue;
}
</style>
<body onload="runTest();">
<article id="column">
<div id="block1">block1</div>
</article>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-sizing/#available">
<link rel="help" href="https://drafts.csswg.org/css-sizing/#percentage-sizing">
<p>There should be a green square below, and no red.</p>
<div id="container" style="width:100px; background:red;">
<div style="float:right; width:50px; height:100px; background:green;"></div>
<div style="display:table; max-width:50%; height:100px; background:green;" data-expected-width="50">
<div style="float:left; width:20px; height:10px;"></div>
<div style="float:left; width:20px; height:10px;"></div>
<div style="float:left; width:20px; height:10px;"></div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<script>
checkLayout("#container");
</script>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-sizing/#available">
<link rel="help" href="https://drafts.csswg.org/css-sizing/#percentage-sizing">
<p>There should be a blue square below.</p>
<div id="container" style="width:100px;">
<div style="float:right; width:50px; height:10px;"></div>
<div style="display:table; width:10px; min-width:100%; height:100px; background:blue;" data-expected-width="100"></div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<script>
checkLayout("#container");
</script>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-sizing/#available">
<link rel="help" href="https://drafts.csswg.org/css-sizing/#percentage-sizing">
<p>There should be a green square below, and no red.</p>
<div id="container" style="width:100px; background:red;">
<div style="float:right; width:50px; height:100px; background:green;"></div>
<div style="display:table; width:10px; min-width:50%; height:100px; background:green;" data-expected-width="50"></div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<script>
checkLayout("#container");
</script>

View file

@ -0,0 +1,173 @@
<!doctype html>
<title>Urange Parsing</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@font-face {
font-family: foo;
src: url(http://example.com);
}
.error {}
</style>
<meta name=author title="Tab Atkins-Bittner">
<link rel=help href="https://drafts.csswg.org/css-syntax/#urange-syntax">
<script>
function testUrange(input, expected) {
test(()=>{
const rule = document.styleSheets[0].cssRules[0];
rule.style.unicodeRange = "U+1357";
rule.style.unicodeRange = input;
assert_equals(rule.style.unicodeRange.toUpperCase(), expected.toUpperCase());
}, `"${input}" => "${expected}"`)
}
function testInvalidUrange(input) {
test(()=>{
const rule = document.styleSheets[0].cssRules[0];
rule.style.unicodeRange = "U+1357";
rule.style.unicodeRange = input;
assert_equals(rule.style.unicodeRange.toUpperCase(), "U+1357");
}, `"${input}" is invalid`);
}
/* First exercise all the clauses individually */
//<urange> =
// u '+' <ident-token> '?'* |
/* comments can go between tokens */
testUrange("u/**/+/**/a/**/?", "U+A0-AF");
/* capitalization doesn't matter */
testUrange("u+abc", "U+ABC");
testUrange("U+abc", "U+ABC");
testUrange("u+ABC", "U+ABC");
testUrange("U+ABC", "U+ABC");
testUrange("u+AbC", "U+ABC");
/* only hex */
testInvalidUrange("u+efg");
/* no spacing */
testInvalidUrange("u+ abc");
testInvalidUrange("u +abc");
testInvalidUrange("u + abc");
testInvalidUrange("U + a b c");
/* 1-6 characters */
testUrange("u+a", "U+A");
testUrange("u+aa", "U+AA");
testUrange("u+aaa", "U+AAA");
testUrange("u+aaaa", "U+AAAA");
testUrange("u+aaaaa", "U+AAAAA");
testInvalidUrange("u+aaaaaaa");
/* Or ? at the end, still up to 6 */
testUrange("u+a?", "U+A0-AF");
testUrange("u+a??", "U+A00-AFF");
testUrange("u+a???", "U+A000-AFFF");
testUrange("u+a????", "U+A0000-AFFFF");
testInvalidUrange("u+aaaaaa?");
testInvalidUrange("u+aaaaa??");
testInvalidUrange("u+aaaa???");
testInvalidUrange("u+aaa????");
testInvalidUrange("u+aa?????");
testInvalidUrange("u+a??????");
/* no characters after ? */
testInvalidUrange("u+a?a");
// Too large!
testInvalidUrange("u+aaaaaa");
testInvalidUrange("u+a?????");
// u <dimension-token> '?'* |
testUrange("u/**/+0a/**/?", "U+A0-AF");
testUrange("u+0a", "U+A");
testUrange("U+0a0", "U+A0");
testUrange("u+0aaaaa", "U+AAAAA");
testInvalidUrange("u+0aaaaaa");
testUrange("u+0a0000", "U+A0000");
testInvalidUrange("u+0a00000");
testInvalidUrange("u+0aaaaa0");
testUrange("u+00000a", "U+A");
testInvalidUrange("u+00000aa");
testInvalidUrange("u+00000a0")
testInvalidUrange("u+000000a");
testUrange("u+0a????", "U+A0000-AFFFF");
testInvalidUrange("u+0a?????");
testInvalidUrange("u+00a????");
// Too large!
testInvalidUrange("u+22222a");
// Scinot!
testUrange("u+1e9a", "U+1E9A");
// u <number-token> '?'* |
testUrange("u/**/+0/**/?", "U+0-F");
testInvalidUrange("u/**/0");
testUrange("u+0", "U+0");
testUrange("u+00", "U+0");
testUrange("u+000", "U+0");
testUrange("u+0000", "U+0");
testUrange("u+00000", "U+0");
testUrange("u+000000", "U+0");
testInvalidUrange("u+0000000");
testUrange("u+00000?", "U+0-F");
testUrange("u+0?????", "U+0-FFFFF");
testInvalidUrange("u+0?a");
testInvalidUrange("u+000000?");
testInvalidUrange("u+00000??");
testInvalidUrange("u+0??????");
// Scinot!
testUrange("u+1e3", "U+1E3");
testUrange("u+1e-20", "U+1E-20");
// Too large!
testInvalidUrange("u+222222");
testInvalidUrange("u+2?????");
// u <number-token> <dimension-token> |
testUrange("u/**/+0/**/-0a", "U+0-A");
testUrange("u+0-0a", "U+0-A");
testUrange("u+000000-0aaaaa", "U+0-AAAAA");
testInvalidUrange("u+0000000-0a");
testInvalidUrange("u+0-0aaaaaa");
testInvalidUrange("u+0-000000a");
testInvalidUrange("u+0+0a");
testInvalidUrange("u+0?-0a");
testInvalidUrange("u+0-0a?");
// Too large!
testInvalidUrange("u+222222-22222a");
// u <number-token> <number-token> |
testUrange("u/**/+0/**/-1", "U+0-1");
testUrange("u+0-1", "U+0-1");
testInvalidUrange("u-0-1");
testInvalidUrange("u-0+1");
testInvalidUrange("u+0+1");
testUrange("u+000000-000001", "U+0-1");
testInvalidUrange("u+0000000-1");
testInvalidUrange("u+0-0000001");
// Too large!
testInvalidUrange("u+0-222222");
// u '+' '?'+
testUrange("u/**/+/**/?", "U+0-F");
testUrange("u+?", "U+0-F");
testUrange("u+?????", "u+0-FFFFF");
testInvalidUrange("u+???????");
testInvalidUrange("u+?a");
// U+FFFFFF is too large!
testInvalidUrange("u+??????");
/* Finally, verify that u+a is properly parsed
as IDENT(u) DELIM(+) IDENT(a) in other contexts */
test(()=>{
const rule = document.styleSheets[0].cssRules[1];
// Establish that it works with whitespace...
rule.selectorText = "u + a";
assert_equals(rule.selectorText, "u + a");
// And then again without...
rule.selectorText = ".error";
rule.selectorText = "u+a";
assert_equals(rule.selectorText, "u + a");
}, "u+a is a valid selector");
</script>

View file

@ -89,17 +89,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if ja and loose'); }, lines[i]+' may appear at line start if ja and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -89,17 +89,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if ja and normal'); }, lines[i]+' may appear at line start if ja and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -89,17 +89,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and strict'); }, lines[i]+' may NOT appear at line start if ja and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if ja and loose'); }, lines[i]+' may appear at line start if ja and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and normal'); }, lines[i]+' may NOT appear at line start if ja and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and strict'); }, lines[i]+' may NOT appear at line start if ja and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -42,17 +42,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if ja and loose'); }, lines[i]+' may appear at line start if ja and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -42,17 +42,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if ja and normal'); }, lines[i]+' may appear at line start if ja and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -42,17 +42,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and strict'); }, lines[i]+' may NOT appear at line start if ja and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -43,17 +43,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if ja and loose'); }, lines[i]+' may appear at line start if ja and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -43,17 +43,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and normal'); }, lines[i]+' may NOT appear at line start if ja and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -43,17 +43,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and strict'); }, lines[i]+' may NOT appear at line start if ja and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -44,17 +44,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if ja and loose'); }, lines[i]+' may appear at line start if ja and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -44,17 +44,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and normal'); }, lines[i]+' may NOT appear at line start if ja and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -44,17 +44,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and strict'); }, lines[i]+' may NOT appear at line start if ja and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if ja and loose'); }, lines[i]+' may appear at line start if ja and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and normal'); }, lines[i]+' may NOT appear at line start if ja and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="ja">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if ja and strict'); }, lines[i]+' may NOT appear at line start if ja and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if zh and loose'); }, lines[i]+' may appear at line start if zh and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and normal'); }, lines[i]+' may NOT appear at line start if zh and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and strict'); }, lines[i]+' may NOT appear at line start if zh and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -42,17 +42,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if zh and loose'); }, lines[i]+' may appear at line start if zh and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -42,17 +42,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if zh and normal'); }, lines[i]+' may appear at line start if zh and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -42,17 +42,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and strict'); }, lines[i]+' may NOT appear at line start if zh and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -43,17 +43,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if zh and loose'); }, lines[i]+' may appear at line start if zh and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -43,17 +43,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and normal'); }, lines[i]+' may NOT appear at line start if zh and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -43,17 +43,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and strict'); }, lines[i]+' may NOT appear at line start if zh and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -44,17 +44,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if zh and loose'); }, lines[i]+' may appear at line start if zh and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -44,17 +44,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and normal'); }, lines[i]+' may NOT appear at line start if zh and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -44,17 +44,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and strict'); }, lines[i]+' may NOT appear at line start if zh and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may appear at line start if zh and loose'); }, lines[i]+' may appear at line start if zh and loose');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and normal'); }, lines[i]+' may NOT appear at line start if zh and normal');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -48,17 +48,26 @@ for (var i=0;i<lines.length;i++) {
'<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' + '<div class="ref" id="ref'+i+'" lang="zh">文文文文文<br/>&#x'+hex+';<span id="refSpan'+i+'"></span></div>' +
'</div>' '</div>'
} }
function spansNearEnough(counter) {
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
}
document.querySelector('body').innerHTML = out document.querySelector('body').innerHTML = out
// hide successful tests setup({explicit_done: true});
for (i=0;i<lines.length;i++) {
if (document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft) document.getElementById('test'+i).parentNode.style.display = 'none' document.fonts.ready.then(validate);
}
// run the test framework function validate() {
for (i=0;i<lines.length;i++) { for (i=0;i<lines.length;i++) {
test(function() { test(function() {
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft); assert_true(spansNearEnough(i));
}, lines[i]+' may NOT appear at line start if zh and strict'); }, lines[i]+' may NOT appear at line start if zh and strict');
} // Hide successful tests.
if (spansNearEnough(i)) document.getElementById('test'+i).parentNode.style.display = 'none'
}
done();
}
</script> </script>
<!--Notes: <!--Notes:
The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited. The test creates a box with room for 6 characters, causing wrapping to occur either between the 6th and the 7th character, or before the 6th if the breaks after the 6th or before the 7th are prohibited.

View file

@ -106,6 +106,24 @@ test_interpolation(
'Match on rotation due to 0deg angle' 'Match on rotation due to 0deg angle'
); );
test_interpolation(
{
property: 'transform',
from: 'rotate3d(1, 1, 1, -60deg) translateX(100px)',
to: 'rotate3d(2, 2, 2, 60deg) translateY(200px)',
}, [{ at: 0.25, expect: 'rotate3d(1, 1, 1, -30deg) translate(75px, 50px)' }],
'Match on rotation using collinear rotation axes'
);
test_interpolation(
{
property: 'transform',
from: 'rotate3d(1, 0, 0, 360deg) translateX(100px)',
to: 'rotate3d(0, 1, 0, -720deg) translateY(200px)',
}, [{ at: 0.25, expect: 'rotate3d(0, 0, 1, 0deg) translate(75px, 50px)' }],
'Match on rotation with spherical interpolation'
);
test_interpolation( test_interpolation(
{ {
property: 'transform', property: 'transform',

View file

@ -63,7 +63,15 @@
<div id="matrix" class="block"></div> <div id="matrix" class="block"></div>
<script type="text/javascript"> <script type="text/javascript">
function getTransformFor(id) { function getTransformFor(id) {
return window.getComputedStyle(document.getElementById(id)).getPropertyValue("transform"); let transform =
window.getComputedStyle(document.getElementById(id)).getPropertyValue("transform");
// Round matrix arguments to allow for small errors in numerical precision.
transform = transform.replace(/matrix\(([^\)]*)\)/g, function(match, arguments) {
let parts = arguments.split(",");
parts = parts.map(str => parseFloat(parseFloat(str).toFixed(6)));
return 'matrix(' + parts.join(", ") + ')';
});
return transform;
} }
function clear(id) { function clear(id) {
document.getElementById(id).style.display = 'none'; document.getElementById(id).style.display = 'none';

View file

@ -0,0 +1,88 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: computed value of 'tab-size' and 'opacity' when specified with calc() function</title>
<!--
Original test is:
https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793f5b9668cc/third_party/WebKit/LayoutTests/css3/calc/calc-numbers.html
-->
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-color-3/#transparency">
<link rel="help" href="https://www.w3.org/TR/css-text-3/#tab-size-property">
<link rel="help" href="https://www.w3.org/TR/css3-values/#calc-computed-value">
<meta name="flags" content="invalid">
<meta content="This test verifies how 12 calc() functions are computed for 'opacity' and 'tab-size'." name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="target"></div>
<script>
function startTesting()
{
function verifyComputedStyle(property_name, initial_value, specified_value, expected_value, description)
{
var elemTarget = document.getElementById("target");
test(function()
{
elemTarget.style.setProperty(property_name, initial_value);
/*
In exactly 9 out of the 12 sub-tests, the initial_value will
act as a fallback value because the calc() function in the
specified value generates an invalid value. Since we are
running 12 consecutive tests on the same element, then
it is necessary to 'reset' its property to an initial
value.
*/
elemTarget.style.setProperty(property_name, specified_value);
assert_equals(getComputedStyle(elemTarget)[property_name], expected_value, specified_value + ' should compute to ' + expected_value);
}, description);
}
/* verifyComputedStyle(property_name, initial_value, specified_value, expected_value, description) */
verifyComputedStyle("tab-size", "initial", "calc(2 * 3)", "6", "testing tab-size: calc(2 * 3)");
verifyComputedStyle("tab-size", "12345", "calc(2 * -4)", "12345", "testing tab-size: calc(2 * -4)");
verifyComputedStyle("opacity", "initial", "calc(2 / 4)", "0.5", "testing opacity: calc(2 / 4)");
verifyComputedStyle("tab-size", "12345", "calc(2 / 4)", "0.5", "testing tab-size: calc(2 / 4)");
verifyComputedStyle("opacity", "0.9", "calc(2 / 4) * 1px", "0.9", "testing opacity: calc(2 / 4) * 1px");
verifyComputedStyle("tab-size", "12345", "calc(1 + 1px)", "12345", "testing tab-size: calc(1 + 1px)");
verifyComputedStyle("tab-size", "12345", "calc(1 + 100%)", "12345", "testing tab-size: calc(1 + 100%)");
verifyComputedStyle("tab-size", "12345", "calc(100%)", "12345", "testing tab-size: calc(100%)");
verifyComputedStyle("tab-size", "12345", "calc(10px) bla", "12345", "testing tab-size: calc(10px) bla");
verifyComputedStyle("tab-size", "12345", "calc(bla) 10px", "12345", "testing tab-size: calc(bla) 10px");
verifyComputedStyle("tab-size", "initial", "calc(10px)", "10px", "testing tab-size: calc(10px)");
/* verifyComputedStyle(property_name, initial_value, specified_value, expected_value, description) */
}
startTesting();
</script>

View file

@ -26,6 +26,8 @@
assert_equals(CSS.supports("color: red"), true, "CSS.supports: Single-argument form allows for declarations without enclosing parentheses"); assert_equals(CSS.supports("color: red"), true, "CSS.supports: Single-argument form allows for declarations without enclosing parentheses");
assert_equals(CSS.supports("(color: red) and (color: blue)"), true, "CSS.supports: Complex conditions allowed"); assert_equals(CSS.supports("(color: red) and (color: blue)"), true, "CSS.supports: Complex conditions allowed");
assert_equals(CSS.supports("not (foobar)"), true, "CSS.supports: general_enclosed still parses"); assert_equals(CSS.supports("not (foobar)"), true, "CSS.supports: general_enclosed still parses");
assert_equals(CSS.supports("color: something-pointless var(--foo)"), true, "Variable references always parse");
assert_equals(CSS.supports("color: something-pointless(var(--foo))"), true, "Variable references in an unknown function always parse");
}, "CSS.supports, one argument form"); }, "CSS.supports, one argument form");
test(function () { test(function () {
// https://drafts.csswg.org/css-conditional/#dom-css-supports // https://drafts.csswg.org/css-conditional/#dom-css-supports

View file

@ -0,0 +1,30 @@
<!doctype html>
<title>opener and embedded documents; using a and form</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<iframe name=matchesastring></iframe>
<a href=/common/blank.html target=matchesastring>&lt;a></a>
<form action=/common/blank.html target=matchesastring><input type=submit value="<form>"></form>
<script>
async_test(t => {
const frame = document.querySelector("iframe");
let counter = 0;
frame.onload = t.step_func(() => {
// Firefox and Chrome/Safari load differently
if (frame.contentWindow.location.href === "about:blank") {
return;
}
// Test bits
assert_equals(frame.contentWindow.opener, null);
if (counter === 0) {
document.querySelector("input").click();
} else {
t.done();
}
counter++;
});
document.querySelector("a").click();
});
</script>

View file

@ -0,0 +1,32 @@
<!doctype html>
<title>opener and embedded documents; using window.open()</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<iframe name=matchesastring></iframe>
<script>
async_test(t => {
const frame = document.querySelector("iframe");
frame.onload = t.step_func(() => {
// Firefox and Chrome/Safari load differently
if (frame.contentWindow.location.href === "about:blank") {
return;
}
// Test bits
assert_equals(frame.contentWindow.opener, window, "opener before setting it to null");
const openerDesc = Object.getOwnPropertyDescriptor(frame.contentWindow, "opener"),
openerGet = openerDesc.get;
assert_equals(openerGet(), window, "opener before setting it to null via directly invoking the getter");
frame.contentWindow.opener = null;
frame.contentWindow.opener = "immaterial";
assert_equals(openerGet(), null, "opener after setting it to null via directly invoking the getter");
assert_equals(frame.contentWindow.opener, "immaterial");
t.done();
});
window.open("/common/blank.html", "matchesastring");
});
</script>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link id=link rel=stylesheet id=style_test
onload="t.unreached_func('Sheet should fail to load')">
<script>
var t = async_test("Check if the <link>'s error event fires for each style " +
"sheet it fails to load");
link.onerror = t.step_func(() => {
link.onerror = t.step_func_done(() => {});
link.href = 'nonexistent.css?second';
});
link.href = 'nonexistent.css?first';
</script>
</head>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link id=link rel=stylesheet id=style_test
onerror="t.unreached_func('Sheet should load successfully')">
<script>
var t = async_test("Check if the <link>'s load event fires for each style " +
"sheet it loads");
link.onload = t.step_func(() => {
link.onload = t.step_func_done(() => {});
link.href = 'style.css?second';
});
link.href = 'style.css?first';
</script>
</head>
</html>

View file

@ -15,6 +15,7 @@
<span><a b='"'></a></span> <span><a b='"'></a></span>
<span><a b="<"></a></span> <span><a b="<"></a></span>
<span><a b=">"></a></span> <span><a b=">"></a></span>
<span><a href="javascript:&quot;&lt;>&quot;"></a></span>
<span><svg xlink:href="a"></svg></span> <span><svg xlink:href="a"></svg></span>
<span><svg xmlns:svg="test"></svg></span> <span><svg xmlns:svg="test"></svg></span>
<span>a</span> <span>a</span>
@ -49,6 +50,7 @@ var expected = [
["<a b=\"&quot;\"></a>", "<span><a b=\"&quot;\"></a></span>"], ["<a b=\"&quot;\"></a>", "<span><a b=\"&quot;\"></a></span>"],
["<a b=\"<\"></a>", "<span><a b=\"<\"></a></span>"], ["<a b=\"<\"></a>", "<span><a b=\"<\"></a></span>"],
["<a b=\">\"></a>", "<span><a b=\">\"></a></span>"], ["<a b=\">\"></a>", "<span><a b=\">\"></a></span>"],
["<a href=\"javascript:&quot;<>&quot;\"></a>", "<span><a href=\"javascript:&quot;<>&quot;\"></a></span>"],
["<svg xlink:href=\"a\"></svg>", "<span><svg xlink:href=\"a\"></svg></span>"], ["<svg xlink:href=\"a\"></svg>", "<span><svg xlink:href=\"a\"></svg></span>"],
["<svg xmlns:svg=\"test\"></svg>", "<span><svg xmlns:svg=\"test\"></svg></span>"], ["<svg xmlns:svg=\"test\"></svg>", "<span><svg xmlns:svg=\"test\"></svg></span>"],
["a", "<span>a</span>"], ["a", "<span>a</span>"],

View file

@ -1,8 +1,10 @@
[allowed-to-play.html] [allowed-to-play.html]
expected: expected:
if product == "edge_webdriver": TIMEOUT
if product == "safari": ERROR # https://bugs.webkit.org/show_bug.cgi?id=190775 if product == "safari": ERROR # https://bugs.webkit.org/show_bug.cgi?id=190775
[<audio> autoplay] [<audio> autoplay]
expected: expected:
if product == "edge_webdriver": TIMEOUT
if product == "safari": FAIL # https://bugs.webkit.org/show_bug.cgi?id=190775 if product == "safari": FAIL # https://bugs.webkit.org/show_bug.cgi?id=190775

View file

@ -1,4 +1,9 @@
[html-elements.html] [html-elements.html]
[(pre-req for comparison tests) all CSS short-hand supported]
expected:
if product == "edge_webdriver": FAIL
[Compare CSS span definitions (only valid if pre-reqs pass)] [Compare CSS span definitions (only valid if pre-reqs pass)]
expected: expected:
if product == "safari": FAIL # https://webkit.org/show_bug.cgi?id=187052 if product == "safari": FAIL # https://webkit.org/show_bug.cgi?id=187052

View file

@ -0,0 +1,4 @@
[size.html]
type: reftest
expected:
if product == "edge_webdriver": FAIL # https://github.com/web-platform-tests/wpt/issues/15159

View file

@ -1,4 +1,5 @@
[context.any.sharedworker.html] [context.any.sharedworker.html]
[context] [context]
expected: expected:
if product == "edge_webdriver": FAIL
if product == "safari": FAIL # https://bugs.webkit.org/show_bug.cgi?id=149850 if product == "safari": FAIL # https://bugs.webkit.org/show_bug.cgi?id=149850

View file

@ -1,4 +1,27 @@
[order-of-metas.any.worker.html]
expected:
if product == "edge_webdriver": TIMEOUT
[order-of-metas.any.html]
[<meta name=timeout> exists]
expected:
if product == "edge_webdriver": FAIL
[order-of-metas.any.sharedworker.html] [order-of-metas.any.sharedworker.html]
[foo\n]
expected:
if product == "edge_webdriver": FAIL
[foo] [foo]
expected: expected:
if product == "edge_webdriver": FAIL
if product == "safari": FAIL # https://bugs.webkit.org/show_bug.cgi?id=149850 if product == "safari": FAIL # https://bugs.webkit.org/show_bug.cgi?id=149850
[order-of-metas.window.html]
[<meta name=timeout> exists]
expected:
if product == "edge_webdriver": FAIL

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