mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
23 lines
688 B
HTML
23 lines
688 B
HTML
<html>
|
|
<link rel="import" href="../resources/chai.html" />
|
|
<link rel="import" href="../resources/mocha.html" />
|
|
<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>
|