blob: 2c1d9de58f027c1961aefc1c03f8e1bf1ae82203 [file] [log] [blame]
<html>
<import src="../resources/chai.sky" />
<import src="../resources/mocha.sky" />
<script>
describe('MutationRecord', function() {
it('should be exposed on window but not constructable', function() {
assert.ok(window.MutationRecord);
assert.equal(typeof MutationRecord, "function");
assert.throw(function() {
new MutationRecord
}, TypeError);
var div = document.createElement('div');
var observer = new MutationObserver(function(){});
observer.observe(div, {attributes: true});
div.id = 'foo';
var record = observer.takeRecords()[0];
assert.ok(record instanceof MutationRecord);
});
});
</script>
</html>