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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/observer/ResizeObservation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="./resources/resizeTestHelper.js"></script> 4 <script src="./resources/resizeTestHelper.js"></script>
5 <p>ResizeObserver svg tests</p> 5 <p>ResizeObserver svg tests</p>
6 <svg height="430" width="500"> 6 <svg height="430" width="500" >
7 <circle cx="10" cy="10" r="5" style="fill:orange;stroke:black;stroke-width:1" /> 7 <circle cx="10" cy="10" r="5" style="fill:orange;stroke:black;stroke-width:1" />
8 <ellipse cx="10" cy="30" rx="5" ry="5" style="fill:orange;stroke:black;stroke- width:1"/> 8 <ellipse cx="10" cy="30" rx="5" ry="5" style="fill:orange;stroke:black;stroke- width:1"/>
9 <foreignObject cy="50" width="100" height="20"> 9 <foreignObject cy="50" width="100" height="20">
10 <body> 10 <body>
11 <p>Here is a paragraph that requires word wrap</p> 11 <p>Here is a paragraph that requires word wrap</p>
12 </body> 12 </body>
13 </foreignObject> 13 </foreignObject>
14 <image xlink:href="" x="0" y="100" height="30" width="100" /> 14 <image xlink:href="" x="0" y="100" height="30" width="100" />
15 <line x1="0" y1="50" x2="20" y2="70" stroke="black" stroke-width="2"/> 15 <line x1="0" y1="50" x2="20" y2="70" stroke="black" stroke-width="2"/>
16 <path d="M 0 100 L 100 100 L 50 150 z" 16 <path d="M 0 100 L 100 100 L 50 150 z"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 setup: observer => { 283 setup: observer => {
284 target.setAttribute('font-size', "25"); 284 target.setAttribute('font-size', "25");
285 }, 285 },
286 notify: (entries, observer) => { 286 notify: (entries, observer) => {
287 assert_equals(entries.length, 1); 287 assert_equals(entries.length, 1);
288 } 288 }
289 } 289 }
290 ]); 290 ]);
291 return helper.start(); 291 return helper.start();
292 } 292 }
293
294
295 function test10() {
296 let target = document.querySelector('svg');
297 let helper = new ResizeTestHelper(
298 "test10: observe svg:svg, top/left is 0 even with padding",
299 [
300 {
301 setup: observer => {
302 observer.observe(target);
303 },
304 notify: (entries, observer) => {
305 assert_equals(entries.length, 1);
306 assert_equals(entries[0].contentRect.top, 0);
307 assert_equals(entries[0].contentRect.left, 0);
308 }
309 }
310 ]);
311 return helper.start();
312 }
313
293 let guard = async_test('guard'); 314 let guard = async_test('guard');
294 test0() 315 test0()
295 .then(() => { return test1(); }) 316 .then(() => { return test1(); })
296 .then(() => { return test2(); }) 317 .then(() => { return test2(); })
297 .then(() => { return test3(); }) 318 .then(() => { return test3(); })
298 .then(() => { return test4(); }) 319 .then(() => { return test4(); })
299 .then(() => { return test5(); }) 320 .then(() => { return test5(); })
300 .then(() => { return test6(); }) 321 .then(() => { return test6(); })
301 .then(() => { return test7(); }) 322 .then(() => { return test7(); })
302 .then(() => { return test8(); }) 323 .then(() => { return test8(); })
303 .then(() => { return test9(); }) 324 .then(() => { return test9(); })
325 .then(() => { return test10(); })
304 .then(() => { guard.done(); }); 326 .then(() => { guard.done(); });
305 327
306 </script> 328 </script>
OLDNEW
« 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