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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLElement/resources/class-list.js

Issue 2903803002: DOMTokenList should unify duplicated tokens. (Closed)
Patch Set: Update a -expected.txt Created 3 years, 7 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
Index: third_party/WebKit/LayoutTests/fast/dom/HTMLElement/resources/class-list.js
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/resources/class-list.js b/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/resources/class-list.js
index 2b423a30e232450800a14f96bf1506380c032481..46c663076f98f44e1db9f9a463ded113d2e18842 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/resources/class-list.js
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/resources/class-list.js
@@ -30,7 +30,7 @@ shouldEvaluateTo('element.classList.length', 1);
// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/003.htm
createElement('x x');
-shouldEvaluateTo('element.classList.length', 2);
+shouldEvaluateTo('element.classList.length', 1);
// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/004.htm
createElement('x y');
@@ -49,7 +49,7 @@ shouldBeEqualToString('element.className', 'x');
// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/007.htm
createElement('x x');
element.classList.add('x');
-shouldBeEqualToString('element.className', 'x x');
+shouldBeEqualToString('element.className', 'x');
// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/008.htm
createElement('y');
@@ -69,7 +69,7 @@ shouldBeEqualToString('element.className', '');
// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/011.htm
createElement(' y x y ');
element.classList.remove('x');
-shouldBeEqualToString('element.className', 'y y');
+shouldBeEqualToString('element.className', 'y');
// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/012.htm
createElement(' x y x ');
@@ -201,8 +201,8 @@ shouldBeEqualToString('element.classList[0]', 'x');
shouldBeEqualToString('element.classList.item(0)', 'x');
createElement('x x');
-shouldBeEqualToString('element.classList[1]', 'x');
-shouldBeEqualToString('element.classList.item(1)', 'x');
+shouldBeUndefined('element.classList[1]');
+shouldBeNull('element.classList.item(1)');
createElement('x y');
shouldBeEqualToString('element.classList[1]', 'y');

Powered by Google App Engine
This is Rietveld 408576698