imported/w3c/canvas/2d.text.measure.width.empty.html is flaky
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Apr 2015 00:07:35 +0000 (00:07 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Apr 2015 00:07:35 +0000 (00:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143671

Reviewed by Tim Horton.

* canvas/2d.text.measure.width.empty.html:
* canvas/2d.text.measure.width.empty-expected.txt:
Updated the test to trunk, where it uses testharness, which knows about waitUntilDone.

* fonts: Added.
* fonts/CanvasTest.ttf: Added.
While at it, added a font that this test includes (probably for no good reason).
This avoids hitting a sandbox violation.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182769 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/canvas/2d.text.measure.width.empty-expected.txt
LayoutTests/imported/w3c/canvas/2d.text.measure.width.empty.html
LayoutTests/imported/w3c/fonts/CanvasTest.ttf [new file with mode: 0644]

index e7260a52bf6f20880e4d5e75b139bd09c252845a..476a6cd57b2d2270d2bf9e0288fd38483205395b 100644 (file)
@@ -1,3 +1,19 @@
+2015-04-13  Alexey Proskuryakov  <ap@apple.com>
+
+        imported/w3c/canvas/2d.text.measure.width.empty.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=143671
+
+        Reviewed by Tim Horton.
+
+        * canvas/2d.text.measure.width.empty.html:
+        * canvas/2d.text.measure.width.empty-expected.txt:
+        Updated the test to trunk, where it uses testharness, which knows about waitUntilDone.
+
+        * fonts: Added.
+        * fonts/CanvasTest.ttf: Added.
+        While at it, added a font that this test includes (probably for no good reason).
+        This avoids hitting a sandbox violation.
+
 2015-04-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
 
         W3C test importer should generate the modules installed dynamically to run wpt tests
index bfb533a7d4bb759f099c1617e57362c6bde80c3e..a90d618968846f7f2d87d29d5cd9e214e2279968 100644 (file)
@@ -1,5 +1,6 @@
 2d.text.measure.width.empty
 The empty string has zero width
-Spec references: 2d.text.measure
 Actual output:
 
+PASS The empty string has zero width 
+
index 6b541e2e3da5bbb8679d90b0f2dbcee9d9780cbb..15a37bcbf1e9e9122068a1ae7cc3ceb1361c9f52 100644 (file)
@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <title>Canvas test: 2d.text.measure.width.empty</title>
-<meta name="author" content="Philip Taylor">
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
 <script src="../common/canvas-tests.js"></script>
 <link rel="stylesheet" href="../common/canvas-tests.css">
 <style>
 </style>
 <body class="show_output">
 
-<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.measure.html">measure</a>.<a href="index.2d.text.measure.width.html">width</a>.empty</h1>
+<h1>2d.text.measure.width.empty</h1>
 <p class="desc">The empty string has zero width</p>
 
-<div class="refs">Spec references:
-<ul>
-<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.measure">2d.text.measure</a>
-</ul>
-</div>
 
 <span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
 <p class="output">Actual output:</p>
 
 <ul id="d"></ul>
 <script>
+var t = async_test("The empty string has zero width");
 _addTest(function(canvas, ctx) {
 
 deferTest();
-setTimeout(wrapFunction(function () {
+setTimeout(t.step_func_done(function () {
     ctx.font = '50px CanvasTest';
     _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0");
 }), 500);
@@ -37,4 +34,3 @@ setTimeout(wrapFunction(function () {
 
 });
 </script>
-
diff --git a/LayoutTests/imported/w3c/fonts/CanvasTest.ttf b/LayoutTests/imported/w3c/fonts/CanvasTest.ttf
new file mode 100644 (file)
index 0000000..9023592
Binary files /dev/null and b/LayoutTests/imported/w3c/fonts/CanvasTest.ttf differ