Skip to content

Commit 8066919

Browse files
committed
fix testing failures on assert.notInclude of null
1 parent 58e6713 commit 8066919

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

test/unit/styling-remote.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@
107107
assertComputed(d, '4px');
108108
Polymer.dom(document.body).appendChild(d);
109109
Polymer.dom.flush();
110-
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when added to other root');
110+
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when added to other root');
111111
assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
112112
Polymer.dom(styled.root).appendChild(d);
113113
Polymer.dom.flush();
114114
assertComputed(d, '4px');
115115
Polymer.dom(styled.root).removeChild(d);
116116
Polymer.dom.flush();
117-
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when removed from root');
117+
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when removed from root');
118118
assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
119119
Polymer.dom(styled.root).appendChild(d);
120120
Polymer.dom.flush();
@@ -131,14 +131,14 @@
131131
assertComputed(d, '0px');
132132
Polymer.dom(document.body).appendChild(d);
133133
Polymer.dom.flush();
134-
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when added to other root');
134+
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when added to other root');
135135
assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
136136
Polymer.dom(styled).appendChild(d);
137137
Polymer.dom.flush();
138138
assertComputed(d, '0px');
139139
Polymer.dom(styled).removeChild(d);
140140
Polymer.dom.flush();
141-
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when removed from root');
141+
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when removed from root');
142142
assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
143143
Polymer.dom(styled).appendChild(d);
144144
Polymer.dom.flush();

test/unit/styling-scoped.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@
130130
assertComputed(d, '4px');
131131
Polymer.dom(document.body).appendChild(d);
132132
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');
134134
assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
135135
Polymer.dom(styled.root).appendChild(d);
136136
Polymer.dom.flush();
137137
assertComputed(d, '4px');
138138
Polymer.dom(styled.root).removeChild(d);
139139
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');
141141
assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
142142
Polymer.dom(styled.root).appendChild(d);
143143
Polymer.dom.flush();
@@ -154,14 +154,14 @@
154154
assertComputed(d, '0px');
155155
Polymer.dom(document.body).appendChild(d);
156156
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');
158158
assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
159159
Polymer.dom(styled).appendChild(d);
160160
Polymer.dom.flush();
161161
assertComputed(d, '0px');
162162
Polymer.dom(styled).removeChild(d);
163163
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');
165165
assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
166166
Polymer.dom(styled).appendChild(d);
167167
Polymer.dom.flush();
@@ -336,7 +336,6 @@
336336
test('x-scope with no class attribute', function () {
337337
assert.equal(document.querySelector('x-scope-no-class > div').className, 'style-scope x-scope-no-class');
338338
});
339-
340339
});
341340

342341
test('svg classes are dynamically scoped correctly', function() {

0 commit comments

Comments
 (0)