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

Unified Diff: LayoutTests/fast/dom/domstring-attribute-reflection.html

Issue 59903003: Remove TreatNullAs=NullString for HTMLButtonElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@nullb
Patch Set: update tests Created 7 years, 1 month 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: LayoutTests/fast/dom/domstring-attribute-reflection.html
diff --git a/LayoutTests/fast/dom/domstring-attribute-reflection.html b/LayoutTests/fast/dom/domstring-attribute-reflection.html
index 8388c194e25aa823bff1600cc507b2301218bb0d..3369447d9a4a09f1cb809553032cdae3abf80060 100644
--- a/LayoutTests/fast/dom/domstring-attribute-reflection.html
+++ b/LayoutTests/fast/dom/domstring-attribute-reflection.html
@@ -5,7 +5,7 @@
<script>
var element;
-function testDOMStringReflection(elementName, contentAttributeName, idlAttributeName) {
+function testDOMStringReflection(elementName, contentAttributeName, idlAttributeName, treatNullAsString) {
idlAttributeName = idlAttributeName || contentAttributeName;
element = document.createElement(elementName);
debug('Reflected DOMString attribute test for ' + elementName + '/@' + contentAttributeName);
@@ -22,8 +22,13 @@ function testDOMStringReflection(elementName, contentAttributeName, idlAttribute
shouldBeEqualToString('element.getAttribute("' + contentAttributeName + '")', ' bar\n');
debug('Setting null via the IDL attribute:');
- shouldBeEqualToString('element.' + idlAttributeName + ' = null; element.' + idlAttributeName, '');
- shouldBeNull('element.getAttribute("' + contentAttributeName + '")');
+ if (treatNullAsString) {
+ shouldBeEqualToString('element.' + idlAttributeName + ' = null; element.' + idlAttributeName, 'null');
+ shouldBeEqualToString('element.getAttribute("' + contentAttributeName + '")', 'null');
+ } else {
+ shouldBeEqualToString('element.' + idlAttributeName + ' = null; element.' + idlAttributeName, '');
+ shouldBeNull('element.getAttribute("' + contentAttributeName + '")');
+ }
debug('Setting null via the content attribute:');
shouldBeEqualToString('element.setAttribute("' + contentAttributeName + '", null); element.' + idlAttributeName, 'null');
@@ -48,7 +53,7 @@ function testDOMStringReflection(elementName, contentAttributeName, idlAttribute
debug('\n');
}
-testDOMStringReflection('button', 'name');
+testDOMStringReflection('button', 'name', 'name', true);
testDOMStringReflection('fieldset', 'name');
testDOMStringReflection('form', 'name');
testDOMStringReflection('input', 'name');

Powered by Google App Engine
This is Rietveld 408576698