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

Unified Diff: third_party/WebKit/LayoutTests/resize-observer/svg.html

Issue 2305893002: Fix svg contentrect location (Closed)
Patch Set: forgot to fix c++ tests Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/observer/ResizeObservation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/resize-observer/svg.html
diff --git a/third_party/WebKit/LayoutTests/resize-observer/svg.html b/third_party/WebKit/LayoutTests/resize-observer/svg.html
index ce901b8afc3d817876125d4bb08123520347eea4..2d300abe0a717ce04464466ce2b6b2eacf09a2c0 100644
--- a/third_party/WebKit/LayoutTests/resize-observer/svg.html
+++ b/third_party/WebKit/LayoutTests/resize-observer/svg.html
@@ -3,7 +3,7 @@
<script src="../resources/testharnessreport.js"></script>
<script src="./resources/resizeTestHelper.js"></script>
<p>ResizeObserver svg tests</p>
-<svg height="430" width="500">
+<svg height="430" width="500" >
<circle cx="10" cy="10" r="5" style="fill:orange;stroke:black;stroke-width:1" />
<ellipse cx="10" cy="30" rx="5" ry="5" style="fill:orange;stroke:black;stroke-width:1"/>
<foreignObject cy="50" width="100" height="20">
@@ -290,6 +290,27 @@ function test9() {
]);
return helper.start();
}
+
+
+function test10() {
+ let target = document.querySelector('svg');
+ let helper = new ResizeTestHelper(
+ "test10: observe svg:svg, top/left is 0 even with padding",
+ [
+ {
+ setup: observer => {
+ observer.observe(target);
+ },
+ notify: (entries, observer) => {
+ assert_equals(entries.length, 1);
+ assert_equals(entries[0].contentRect.top, 0);
+ assert_equals(entries[0].contentRect.left, 0);
+ }
+ }
+ ]);
+ return helper.start();
+}
+
let guard = async_test('guard');
test0()
.then(() => { return test1(); })
@@ -301,6 +322,7 @@ test0()
.then(() => { return test7(); })
.then(() => { return test8(); })
.then(() => { return test9(); })
+ .then(() => { return test10(); })
.then(() => { guard.done(); });
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/observer/ResizeObservation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698