Test for correct handling of "download" attribute
These tests currently fail as there is no special treatment for this kind of attribute. Related: GH-1337
Matthew Dapena-Tretter committed
Mar 31, 2014 at 21:40 UTC
13351dd9379a09d1e431836aea999a208ddd6d37
1 file changed
+27
src/browser/ui/dom/__tests__/DOMPropertyOperations-test.js
+27
@@ -99,6 +99,33 @@ describe('DOMPropertyOperations', function() {
99
)).toBe('');
100
});
101
102
+ it('should create markup for minimizable properties', function() {
103
+ expect(DOMPropertyOperations.createMarkupForProperty(
104
+ 'download',
105
+ 'simple'
106
+ )).toBe('download="simple"');
107
+
108
+ expect(DOMPropertyOperations.createMarkupForProperty(
109
+ 'download',
110
+ true
111
+ )).toBe('download');
112
+
113
+ expect(DOMPropertyOperations.createMarkupForProperty(
114
+ 'download',
115
+ 'true'
116
+ )).toBe('download="true"');
117
+
118
+ expect(DOMPropertyOperations.createMarkupForProperty(
119
+ 'download',
120
+ false
121
+ )).toBe('');
122
+
123
+ expect(DOMPropertyOperations.createMarkupForProperty(
124
+ 'download',
125
+ 'false'
126
+ )).toBe('download="false"');
127
+ });
128
+
129
it('should create markup for custom attributes', function() {
130
expect(DOMPropertyOperations.createMarkupForProperty(
131
'aria-label',