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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/custom/animate-svgsvgelement.html

Issue 1729073002: Update SVG tests ahead of offset* removal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update flexitem.html and grid-item-display.html too Created 4 years, 9 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
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <title>Test that width/height animation on SVGSVGElement is removed when the ani mation ends</title> 2 <title>Test that width/height animation on SVGSVGElement is removed when the ani mation ends</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 var width_test = async_test("Test width"); 6 var width_test = async_test("Test width");
7 var height_test = async_test("Test height"); 7 var height_test = async_test("Test height");
8 function do_width_test() { 8 function do_width_test() {
9 width_test.step(function() { 9 width_test.step(function() {
10 assert_equals(document.querySelector('svg').offsetWidth, 0, "width s hould be zero when the animation has ended."); 10 assert_equals(document.querySelector('svg').getBoundingClientRect(). width, 0, "width should be zero when the animation has ended.");
11 }); 11 });
12 width_test.done(); 12 width_test.done();
13 } 13 }
14 function do_height_test() { 14 function do_height_test() {
15 height_test.step(function() { 15 height_test.step(function() {
16 assert_equals(document.querySelector('svg').offsetHeight, 0, "height should be zero when the animation has ended."); 16 assert_equals(document.querySelector('svg').getBoundingClientRect(). height, 0, "height should be zero when the animation has ended.");
17 }); 17 });
18 height_test.done(); 18 height_test.done();
19 } 19 }
20 </script> 20 </script>
21 <svg style="background: red" width="0" height="0"> 21 <svg style="background: red" width="0" height="0">
22 <set attributeName="width" to="100px" dur="1ms" begin="0s" onend="do_width_tes t()"/> 22 <set attributeName="width" to="100px" dur="1ms" begin="0s" onend="do_width_tes t()"/>
23 <set attributeName="height" to="100px" dur="1ms" begin="0s" onend="do_height_t est()"/> 23 <set attributeName="height" to="100px" dur="1ms" begin="0s" onend="do_height_t est()"/>
24 </svg> 24 </svg>
25 <div id="log"></div> 25 <div id="log"></div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698