Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: third_party/WebKit/LayoutTests/svg/as-object/sizing/svg-in-object.js

Issue 1423093005: Split <object> tests further to reduce timeout risk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also include assert_approx_equals adjustment Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/svg/as-object/sizing/svg-in-object.js
diff --git a/third_party/WebKit/LayoutTests/svg/as-object/sizing/svg-in-object.js b/third_party/WebKit/LayoutTests/svg/as-object/sizing/svg-in-object.js
index b704e5e27afcd619d455a2dfb7ec0be9d42fa86f..3110c28042cfa3cef8f1926c30ada08b44ad2d0c 100644
--- a/third_party/WebKit/LayoutTests/svg/as-object/sizing/svg-in-object.js
+++ b/third_party/WebKit/LayoutTests/svg/as-object/sizing/svg-in-object.js
@@ -386,13 +386,11 @@ if (window.location.search) {
debugHint = function(id) { return ""; };
}
-function testSVGInObjectWithPlaceholderHeightAttr(placeholderHeightAttr) {
- // Separated over placeholderHeightAttr so that the test count is around ~200
-
+function testSVGInObjectWithPlaceholder(placeholderWidthAttr, placeholderHeightAttr) {
doCombinationTest(
[["containerWidthStyle", [null, "400px"]],
["containerHeightStyle", [null, "400px"]],
- ["placeholderWidthAttr", [null, "100", "50%"]],
+ ["placeholderWidthAttr", [placeholderWidthAttr]],
["placeholderHeightAttr", [placeholderHeightAttr]],
["svgViewBoxAttr", [ null, "0 0 100 200" ]],
["svgWidthAttr", [ null, "200", "25%" ]],
@@ -413,12 +411,14 @@ function testSVGInObjectWithPlaceholderHeightAttr(placeholderHeightAttr) {
placeholder.getBoundingClientRect();
try {
- assert_equals(placeholderRect.width,
- expectedRect.width,
- debugHint(id) + "Wrong width");
- assert_equals(placeholderRect.height,
- expectedRect.height,
- debugHint(id) + "Wrong height");
+ assert_approx_equals(placeholderRect.width,
+ expectedRect.width,
+ 0.5,
+ debugHint(id) + "Wrong width");
+ assert_approx_equals(placeholderRect.height,
+ expectedRect.height,
+ 0.5,
+ debugHint(id) + "Wrong height");
} finally {
testContainer.removeChild(container);
if (testSingleId)

Powered by Google App Engine
This is Rietveld 408576698