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

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: 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..5cdd6f0ed949645166cbc8271ee01a4f67a316a0 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,
+ 1,
fs 2015/10/29 09:52:46 One full (CSS) pixel seems a bit high as an error
davve 2015/10/29 10:16:10 Yes, I had roughly the same thought but it felt sl
fs 2015/10/29 10:19:41 0.5 would be "within one pixel" (rather than "with
davve 2015/10/29 10:30:33 Done.
+ debugHint(id) + "Wrong width");
+ assert_approx_equals(placeholderRect.height,
+ expectedRect.height,
+ 1,
+ debugHint(id) + "Wrong height");
} finally {
testContainer.removeChild(container);
if (testSingleId)

Powered by Google App Engine
This is Rietveld 408576698