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

Unified Diff: LayoutTests/fast/html/marquee-element.html

Issue 393543002: Reflected attributes should be removed when 'null', 'undefined' or 'false' is specified (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | LayoutTests/fast/html/marquee-element-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/html/marquee-element.html
diff --git a/LayoutTests/fast/html/marquee-element.html b/LayoutTests/fast/html/marquee-element.html
index 4dca79b8be67975fb265fb98e502265f1d71939e..5687f3b3baeaceddd78325eb0b25efaa92cf4e29 100644
--- a/LayoutTests/fast/html/marquee-element.html
+++ b/LayoutTests/fast/html/marquee-element.html
@@ -19,7 +19,7 @@ shouldBe('marquee.behavior', '"slide"');
debug('"behavior" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" behavior="slide">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.behavior="alternate";
+marquee.behavior = "alternate";
shouldBe('marquee.behavior', '"alternate"');
debug('"bgColor" IDL attribute reflects content attribute:');
@@ -30,7 +30,7 @@ shouldBe('marquee.bgColor', '"red"');
debug('"bgColor" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" bgcolor="red">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.bgColor="blue";
+marquee.bgColor = "blue";
shouldBe('marquee.bgColor', '"blue"');
debug('"direction" IDL attribute reflects content attribute:');
@@ -41,7 +41,7 @@ shouldBe('marquee.direction', '"right"');
debug('"direction" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" direction="right">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.direction="left";
+marquee.direction = "left";
shouldBe('marquee.direction', '"left"');
debug('"height" IDL attribute reflects content attribute:');
@@ -52,7 +52,7 @@ shouldBe('marquee.height', '"100px"');
debug('"height" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" height="100px">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.height="200px";
+marquee.height = "200px";
shouldBe('marquee.height', '"200px"');
debug('"hspace" IDL attribute reflects content attribute:');
@@ -63,7 +63,7 @@ shouldBe('marquee.hspace', '10');
debug('"hspace" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" hspace="10">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.hspace=20;
+marquee.hspace = 20;
shouldBe('marquee.hspace', '20');
debug('"hspace" IDL attribute is 0 when content attribute is negative:');
@@ -84,7 +84,7 @@ shouldBe('marquee.loop', '3');
debug('"loop" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" loop="3">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.loop=4;
+marquee.loop = 4;
shouldBe('marquee.loop', '4');
debug('"scrollAmount" IDL attribute reflects content attribute:');
@@ -95,7 +95,7 @@ shouldBe('marquee.scrollAmount', '5');
debug('"scrollAmount" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" scrollamount="5">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.scrollAmount=6;
+marquee.scrollAmount = 6;
shouldBe('marquee.scrollAmount', '6');
debug('"scrollDelay" IDL attribute reflects content attribute:');
@@ -106,7 +106,7 @@ shouldBe('marquee.scrollDelay', '50');
debug('"scrollDelay" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" scrolldelay="50">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.scrollDelay=60;
+marquee.scrollDelay = 60;
shouldBe('marquee.scrollDelay', '60');
debug('"trueSpeed" IDL attribute reflects content attribute:');
@@ -117,8 +117,21 @@ shouldBeTrue('marquee.trueSpeed');
debug('"trueSpeed" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" truespeed="true">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.trueSpeed=false;
+marquee.trueSpeed = false;
shouldBe('marquee.trueSpeed', 'false');
+shouldBe('marquee.hasAttribute("truespeed")', 'false');
+
+debug('"trueSpeed" IDL attribute can be modified:');
+testParent.innerHTML = '<marquee id="marquee" truespeed="true">test</marquee>';
arv (Not doing code reviews) 2014/07/14 15:24:29 testParent.innerHTML = '<marquee id="marquee" true
haraken 2014/07/14 15:28:49 Done.
+marquee = document.getElementById('marquee');
arv (Not doing code reviews) 2014/07/14 15:24:29 just do testParent.firstChild?
haraken 2014/07/14 15:28:49 Other tests in this file are using getElementById,
+marquee.trueSpeed = null;
+shouldBe('marquee.hasAttribute("truespeed")', 'false');
+
+debug('"trueSpeed" IDL attribute can be modified:');
+testParent.innerHTML = '<marquee id="marquee" truespeed="true">test</marquee>';
+marquee = document.getElementById('marquee');
+marquee.trueSpeed = undefined;
+shouldBe('marquee.hasAttribute("truespeed")', 'false');
debug('"vspace" IDL attribute reflects content attribute:');
testParent.innerHTML = '<marquee id="marquee" vspace="10">test</marquee>';
@@ -128,7 +141,7 @@ shouldBe('marquee.vspace', '10');
debug('"vspace" IDL attribute can be modified:');
testParent.innerHTML = '<marquee id="marquee" vspace="10">test</marquee>';
marquee = document.getElementById('marquee');
-marquee.vspace=20;
+marquee.vspace = 20;
shouldBe('marquee.vspace', '20');
debug('"vspace" IDL attribute is 0 when content attribute is negative:');
« no previous file with comments | « no previous file | LayoutTests/fast/html/marquee-element-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698