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

Side by Side Diff: LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-value.js

Issue 178253006: Output Element defaultValue should be based on textContent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 description('Tests for assigning the value attribute to output elements.'); 1 description('Tests for assigning the value attribute to output elements.');
2 2
3 var output; 3 var output;
4 var childNode; 4 var childNode;
5 5
6 debug('- Sets the defaultValue attribute with the value mode flag is in mode "de falut".'); 6 debug('- Sets the defaultValue attribute with the value mode flag is in mode "de falut".');
7 output = document.createElement('output'); 7 output = document.createElement('output');
8 output.defaultValue = "defaultValue"; 8 output.defaultValue = "defaultValue";
9 shouldBeEqualToString('output.defaultValue', 'defaultValue'); 9 shouldBeEqualToString('output.defaultValue', 'defaultValue');
10 shouldBeEqualToString('output.value', 'defaultValue'); 10 shouldBeEqualToString('output.value', 'defaultValue');
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 shouldBeEqualToString('output.defaultValue', 'defaultValue'); 112 shouldBeEqualToString('output.defaultValue', 'defaultValue');
113 shouldBeEqualToString('output.value', 'aValue and childText'); 113 shouldBeEqualToString('output.value', 'aValue and childText');
114 shouldBeEqualToString('output.innerText', 'aValue and childText'); 114 shouldBeEqualToString('output.innerText', 'aValue and childText');
115 shouldBeEqualToString('output.innerHTML', 'aValue<span> and childText</span>'); 115 shouldBeEqualToString('output.innerHTML', 'aValue<span> and childText</span>');
116 debug('- Then removes the child node from the output element with the value mode flag is in mode "default".'); 116 debug('- Then removes the child node from the output element with the value mode flag is in mode "default".');
117 output.removeChild(childNode); 117 output.removeChild(childNode);
118 shouldBeEqualToString('output.defaultValue', 'defaultValue'); 118 shouldBeEqualToString('output.defaultValue', 'defaultValue');
119 shouldBeEqualToString('output.value', 'aValue'); 119 shouldBeEqualToString('output.value', 'aValue');
120 shouldBeEqualToString('output.innerText', 'aValue'); 120 shouldBeEqualToString('output.innerText', 'aValue');
121 shouldBeEqualToString('output.innerHTML', 'aValue'); 121 shouldBeEqualToString('output.innerHTML', 'aValue');
122
123 debug('- Output defaultValue based on textContent if flag is in mode default')
124 var output1 = document.createElement('output');
keishi 2014/03/03 02:00:12 nit: Maybe use the variable "output" to match prev
Habib Virji 2014/03/04 11:11:17 Done.
125 output1.textContent = 'A';
126 shouldBeTrue('output1.defaultValue == \'A\'');
keishi 2014/03/03 02:00:12 Use shouldBeEqualToString.
keishi 2014/03/03 02:00:12 Maybe we should test output1.value too just in cas
Habib Virji 2014/03/04 11:11:17 Done.
Habib Virji 2014/03/04 11:11:17 Done.
127 output1.textContent = 'B'
128 shouldBeTrue('output1.defaultValue == \'B\'');
keishi 2014/03/03 02:00:12 Ditto.
Habib Virji 2014/03/04 11:11:17 Done.
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value-expected.txt ('k') | Source/core/html/HTMLOutputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698