|
130 | 130 | assertComputed(d, '4px');
|
131 | 131 | Polymer.dom(document.body).appendChild(d);
|
132 | 132 | Polymer.dom.flush();
|
133 |
| - assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when added to other root'); |
| 133 | + assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when added to other root'); |
134 | 134 | assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
|
135 | 135 | Polymer.dom(styled.root).appendChild(d);
|
136 | 136 | Polymer.dom.flush();
|
137 | 137 | assertComputed(d, '4px');
|
138 | 138 | Polymer.dom(styled.root).removeChild(d);
|
139 | 139 | Polymer.dom.flush();
|
140 |
| - assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when removed from root'); |
| 140 | + assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when removed from root'); |
141 | 141 | assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
|
142 | 142 | Polymer.dom(styled.root).appendChild(d);
|
143 | 143 | Polymer.dom.flush();
|
|
154 | 154 | assertComputed(d, '0px');
|
155 | 155 | Polymer.dom(document.body).appendChild(d);
|
156 | 156 | Polymer.dom.flush();
|
157 |
| - assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when added to other root'); |
| 157 | + assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when added to other root'); |
158 | 158 | assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
|
159 | 159 | Polymer.dom(styled).appendChild(d);
|
160 | 160 | Polymer.dom.flush();
|
161 | 161 | assertComputed(d, '0px');
|
162 | 162 | Polymer.dom(styled).removeChild(d);
|
163 | 163 | Polymer.dom.flush();
|
164 |
| - assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when removed from root'); |
| 164 | + assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when removed from root'); |
165 | 165 | assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
|
166 | 166 | Polymer.dom(styled).appendChild(d);
|
167 | 167 | Polymer.dom.flush();
|
|
336 | 336 | test('x-scope with no class attribute', function () {
|
337 | 337 | assert.equal(document.querySelector('x-scope-no-class > div').className, 'style-scope x-scope-no-class');
|
338 | 338 | });
|
339 |
| - |
340 | 339 | });
|
341 | 340 |
|
342 | 341 | test('svg classes are dynamically scoped correctly', function() {
|
|
0 commit comments