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

Unified Diff: LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html

Issue 135103003: Updating <object> upon changing "data", "classid", "type" attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 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: LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html
diff --git a/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html b/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html
index 446966d1c2a3aeb588f71189e5cbd131cd3a4b22..5223a4370728c42328a75799eae068c56d4e59c4 100644
--- a/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html
+++ b/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html
@@ -1,6 +1,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<script>window.enablePixelTesting = true;</script>
+<script>
+window.enablePixelTesting = true;
+window.jsTestIsAsync = true;
+</script>
<script src="../../resources/js-test.js"></script>
<script src="../../fast/repaint/resources/repaint.js"></script>
<script type="text/javascript">
@@ -17,10 +20,14 @@
shouldBe("newObject.offsetWidth", "302");
// Switch to document: "<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"><rect width="400" height="200" fill="green"/></svg>".
- // FIXME: This currently fails in WebKit trunk. We don't react on dataAttr changes at all. When manually relayouting using eg. zoom in/out it takes affect.
newObject.setAttribute("data", "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iMjAwIj48cmVjdCB3aWR0aD0iNDAwIiBoZWlnaHQ9IjIwMCIgZmlsbD0iZ3JlZW4iLz48L3N2Zz4=");
- shouldBe("newObject.offsetWidth", "502");
- shouldBe("newObject.offsetWidth", "502");
+
+ // The replacement isn't synchronous, wait before testing.
+ setTimeout(function () {
+ shouldBe("newObject.offsetWidth", "402");
+ shouldBe("newObject.offsetWidth", "402");
+ finishJSTest();
+ }, 50);
abarth-chromium 2014/01/14 18:11:45 This looks like it's going to be flaky.
eseidel 2014/01/15 00:09:41 Yeah, please find a non-time-based way. newobject
sof 2014/01/15 15:26:58 I used postMessage().
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698