Bug 939534 - Follow-up to the follow-up to address review comments to address orange that caused (mark tests fuzzy). r=me
authorJonathan Watt <jwatt@jwatt.org>
Mon, 18 Nov 2013 11:17:09 +0000
changeset 170685 67278f2624971c8da0ac8461d3c709570731020d
parent 170684 3d78b5d79128793fd0579201df9bf8d6c8b88afa
child 170686 a42ee99942e1be6d423689d1ff9eceb3c4d86b01
push idunknown
push userunknown
push dateunknown
reviewersme
bugs939534
milestone28.0a1
Bug 939534 - Follow-up to the follow-up to address review comments to address orange that caused (mark tests fuzzy). r=me
content/svg/content/test/test_text.html
content/svg/content/test/test_text_scaled.html
--- a/content/svg/content/test/test_text.html
+++ b/content/svg/content/test/test_text.html
@@ -143,17 +143,17 @@ function runTest()
   ok(text3.getComputedTextLength() > 0, "text3 measured length");
   is(text3.getComputedTextLength(), text3.getSubStringLength(0, 26), "text3 substring length");
   
   // character 12 should be on the bottom side
   is(text3.getStartPositionOfChar(12).y, 253, "text3 char 12 start offset");
   is(text3.getEndPositionOfChar(12).y, 253, "text3 char 12 end offset");
   ok(text3.getExtentOfChar(12).y < 253, "text3 char 12 extent y");
   ok(ymost(text3.getExtentOfChar(12)) > 253, "text3 char 12 extent height");
-  is(text3.getRotationOfChar(12), 180, "text3 char 12 rotation");
+  isfuzzy(text3.getRotationOfChar(12), 180, 0.001, "text3 char 12 rotation");
   p.x = text3.getExtentOfChar(12).x + 0.1;
   p.y = ymost(text3.getExtentOfChar(12)) - 0.1;
   is(text3.getCharNumAtPosition(p), 12, "text3 finding char 12");
   // This next test is tricky. The glyph for character 3 may overlap from the above
   // but character 12 wins because it's the last to render
   p.y = text3.getExtentOfChar(12).y + 0.1;
   is(text3.getCharNumAtPosition(p), 12, "text3 finding last rendered char");
 
--- a/content/svg/content/test/test_text_scaled.html
+++ b/content/svg/content/test/test_text_scaled.html
@@ -106,20 +106,20 @@ function runTest()
   charWidth = text2.getSubStringLength(0, 1);
 
   is(text2.getNumberOfChars(), 26, "text2 length");
   ok(text2.getComputedTextLength() > 0, "text2 measured length");
   is(text2.getComputedTextLength(), text2.getSubStringLength(0, 26), "text2 substring length");
   
   // character 12 should be on the bottom side
   is(text2.getStartPositionOfChar(12).y, 860, "text2 char 12 start offset");
-  is(text2.getEndPositionOfChar(12).y, 860, "text2 char 12 end offset");
+  isfuzzy(text2.getEndPositionOfChar(12).y, 860, 0.001, "text2 char 12 end offset");
   ok(text2.getExtentOfChar(12).y < 860, "text2 char 12 extent y");
   ok(ymost(text2.getExtentOfChar(12)) > 860, "text2 char 12 extent height");
-  is(text2.getRotationOfChar(12), 180, "text2 char 12 rotation");
+  isfuzzy(text2.getRotationOfChar(12), 180, 0.001, "text2 char 12 rotation");
   p.x = text2.getExtentOfChar(12).x + 0.1;
   p.y = ymost(text2.getExtentOfChar(12)) - 0.1;
   is(text2.getCharNumAtPosition(p), 12, "text2 finding char 12");
   // This next test is tricky. The glyph for character 3 may overlap from the above
   // but character 12 wins because it's the last to render
   p.y = text2.getExtentOfChar(12).y + 0.1;
   is(text2.getCharNumAtPosition(p), 12, "text2 finding last rendered char");
 }