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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedBoolean.html

Issue 2705293005: Convert LayoutTests/svg/dom/SVGAnimated*.html js-tests.js to testharness.js based tests. (Closed)
Patch Set: Created 3 years, 10 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 PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML>
2 <html> 2 <title>SVGAnimatedBoolean interface - utilizing the preserveAlpha property of SV GFEConvolveMatrixElement</title>
3 <head> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 </head> 5 <script>
6 <body> 6 test(function() {
7 <p id="description"></p> 7 // This test checks the SVGAnimatedBoolean API - utilizing the preserveAlpha p roperty of SVGFEConvolveMatrixElement.
8 <div id="console"></div> 8
9 <script src="script-tests/SVGAnimatedBoolean.js"></script> 9 var convElement = document.createElementNS("http://www.w3.org/2000/svg", "feCo nvolveMatrix");
10 </body> 10 // Check initial preserveAlpha value.
11 </html> 11 assert_false(convElement.preserveAlpha.baseVal);
12
13 // Set value to true.
14 convElement.preserveAlpha.baseVal = true;
15 assert_true(convElement.preserveAlpha.baseVal);
16
17 // Caching baseVal in local variable.
18 var baseVal = convElement.preserveAlpha.baseVal;
19 assert_true(baseVal);
20
21 // Modify local baseVal variable to false.
22 baseVal = false;
23
24 // Assure that convElement.preserveAlpha has not been changed, but the local b aseVal variable.
25 assert_false(baseVal);
26 assert_true(convElement.preserveAlpha.baseVal);
27
28 // Check assigning values of various types.
29 // ECMA-262, 9.2, "ToBoolean"
30 convElement.preserveAlpha.baseVal = convElement.preserveAlpha;
31 assert_equals(convElement.preserveAlpha.baseVal, convElement.preserveAlpha.bas eVal);
fs 2017/02/22 13:10:59 Drop this.
Shanmuga Pandi 2017/02/22 13:14:12 Done.
32 assert_true(convElement.preserveAlpha.baseVal);
33
34 convElement.preserveAlpha.baseVal = null;
35 assert_false(convElement.preserveAlpha.baseVal);
36
37 convElement.preserveAlpha.baseVal = 'aString';
38 assert_true(convElement.preserveAlpha.baseVal);
39
40 convElement.preserveAlpha.baseVal = false;
41 assert_false(convElement.preserveAlpha.baseVal);
42
43 convElement.preserveAlpha.baseVal = convElement;
44 assert_true(convElement.preserveAlpha.baseVal);
45 });
46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698