mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision ea852ede3b4e0632fd453ed520b26b22692c2d92
This commit is contained in:
parent
2ab23c79a7
commit
92fa6ede85
109 changed files with 2169 additions and 873 deletions
|
@ -1,22 +1,27 @@
|
|||
// DO NOT EDIT! This test has been generated by tools/gentest.py.
|
||||
// OffscreenCanvas test in a worker:2d.text.measure.width.empty
|
||||
// Description:The empty string has zero width
|
||||
// Description:The empty string has zero width for OffscreenCanvas
|
||||
// Note:
|
||||
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("/common/canvas-tests.js");
|
||||
|
||||
var t = async_test("The empty string has zero width");
|
||||
var t = async_test("The empty string has zero width for OffscreenCanvas");
|
||||
t.step(function() {
|
||||
|
||||
var offscreenCanvas = new OffscreenCanvas(100, 50);
|
||||
var ctx = offscreenCanvas.getContext('2d');
|
||||
|
||||
deferTest();
|
||||
step_timeout(t.step_func_done(function () {
|
||||
ctx.font = '50px CanvasTest';
|
||||
_assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0");
|
||||
}), 500);
|
||||
var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf");
|
||||
let fonts = (self.fonts ? self.fonts : document.fonts);
|
||||
fonts.add(f);
|
||||
fonts.ready.then(() => {
|
||||
step_timeout(t.step_func_done(function () {
|
||||
ctx.font = '50px CanvasTest';
|
||||
_assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0");
|
||||
}), 500);
|
||||
});
|
||||
|
||||
t.done();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue