Skip to content

Commit

Permalink
fix testing failures on assert.notInclude of null
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Mar 8, 2016
1 parent 58e6713 commit 8066919
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions test/unit/styling-remote.html
Expand Up @@ -107,14 +107,14 @@
assertComputed(d, '4px');
Polymer.dom(document.body).appendChild(d);
Polymer.dom.flush();
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when added to other root');
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when added to other root');
assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
Polymer.dom(styled.root).appendChild(d);
Polymer.dom.flush();
assertComputed(d, '4px');
Polymer.dom(styled.root).removeChild(d);
Polymer.dom.flush();
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when removed from root');
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when removed from root');
assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
Polymer.dom(styled.root).appendChild(d);
Polymer.dom.flush();
Expand All @@ -131,14 +131,14 @@
assertComputed(d, '0px');
Polymer.dom(document.body).appendChild(d);
Polymer.dom.flush();
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when added to other root');
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when added to other root');
assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
Polymer.dom(styled).appendChild(d);
Polymer.dom.flush();
assertComputed(d, '0px');
Polymer.dom(styled).removeChild(d);
Polymer.dom.flush();
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when removed from root');
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when removed from root');
assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
Polymer.dom(styled).appendChild(d);
Polymer.dom.flush();
Expand Down
9 changes: 4 additions & 5 deletions test/unit/styling-scoped.html
Expand Up @@ -130,14 +130,14 @@
assertComputed(d, '4px');
Polymer.dom(document.body).appendChild(d);
Polymer.dom.flush();
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when added to other root');
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when added to other root');
assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
Polymer.dom(styled.root).appendChild(d);
Polymer.dom.flush();
assertComputed(d, '4px');
Polymer.dom(styled.root).removeChild(d);
Polymer.dom.flush();
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when removed from root');
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when removed from root');
assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
Polymer.dom(styled.root).appendChild(d);
Polymer.dom.flush();
Expand All @@ -154,14 +154,14 @@
assertComputed(d, '0px');
Polymer.dom(document.body).appendChild(d);
Polymer.dom.flush();
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when added to other root');
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when added to other root');
assert.notInclude(d.className, styled.is, 'scoping class not removed when added to other root');
Polymer.dom(styled).appendChild(d);
Polymer.dom.flush();
assertComputed(d, '0px');
Polymer.dom(styled).removeChild(d);
Polymer.dom.flush();
assert.notInclude(d.getAttribute('style-scoped'), styled.is, 'scoping attribute not removed when removed from root');
assert.notInclude(d.getAttribute('style-scoped') || '', styled.is, 'scoping attribute not removed when removed from root');
assert.notInclude(d.className, styled.is, 'scoping class not removed when removed from root');
Polymer.dom(styled).appendChild(d);
Polymer.dom.flush();
Expand Down Expand Up @@ -336,7 +336,6 @@
test('x-scope with no class attribute', function () {
assert.equal(document.querySelector('x-scope-no-class > div').className, 'style-scope x-scope-no-class');
});

});

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

0 comments on commit 8066919

Please sign in to comment.