mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Update web-platform-tests to revision 0f0b7a7e353421b600ee555bf354d3a98bb603ae
This commit is contained in:
parent
363073568e
commit
71dcf37d55
175 changed files with 2749 additions and 678 deletions
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if ja and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if ja and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if ja and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if ja and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if ja and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if ja and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if ja and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if ja and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if ja and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if zh and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if zh and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if zh and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if zh and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if zh and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may appear at line start if zh and loose');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and normal');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
|
@ -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>'
|
||||
}
|
||||
function spansNearEnough(counter) {
|
||||
return Math.abs( document.getElementById('testSpan'+counter).getBoundingClientRect().left
|
||||
- document.getElementById('refSpan'+counter).getBoundingClientRect().left ) < 1;
|
||||
}
|
||||
|
||||
document.querySelector('body').innerHTML = out
|
||||
// hide successful tests
|
||||
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'
|
||||
}
|
||||
// run the test framework
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(document.getElementById('testSpan'+i).offsetLeft === document.getElementById('refSpan'+i).offsetLeft);
|
||||
}, lines[i]+' may NOT appear at line start if zh and strict');
|
||||
}
|
||||
setup({explicit_done: true});
|
||||
|
||||
document.fonts.ready.then(validate);
|
||||
|
||||
function validate() {
|
||||
for (i=0;i<lines.length;i++) {
|
||||
test(function() {
|
||||
assert_true(spansNearEnough(i));
|
||||
}, 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>
|
||||
<!--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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue