diff --git a/lib/legacy/class.html b/lib/legacy/class.html
index b828ecb047..7411d4bb15 100644
--- a/lib/legacy/class.html
+++ b/lib/legacy/class.html
@@ -312,7 +312,7 @@
*/
Polymer.Class = function(info) {
if (!info) {
- Polymer._warn('Polymer.Class requires `info` argument');
+ console.warn('Polymer.Class requires `info` argument');
}
let klass = GenerateClassFromInfo(info, info.behaviors ?
// note: mixinBehaviors ensures `LegacyElementMixin`.
diff --git a/test/unit/mixin-behaviors.html b/test/unit/mixin-behaviors.html
index 139b83b870..3a598b6318 100644
--- a/test/unit/mixin-behaviors.html
+++ b/test/unit/mixin-behaviors.html
@@ -495,11 +495,7 @@
});
test('behavior is null generates warning', function() {
- var warned = false, oldWarn = Polymer._warn;
- Polymer._warn = function(message) {
- assert.match(message, /behavior is null/);
- warned = true;
- };
+ sinon.spy(console, 'warn');
Polymer({
is: 'behavior-null',
behaviors: [
@@ -507,8 +503,8 @@
]
});
document.createElement('behavior-null');
- assert.equal(warned, true, 'Null behaviour should generate warning');
- Polymer.Base._warn = oldWarn;
+ assert.equal(console.warn.callCount, 1, 'Null behaviour should generate warning');
+ console.warn.restore();
});
test('behavior array is unique', function() {