mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This CL is just a search-and-replace. R=esprehn@chromium.org Review URL: https://codereview.chromium.org/694423002
29 lines
885 B
Plaintext
29 lines
885 B
Plaintext
<html>
|
|
<import src="../resources/chai.sky" />
|
|
<import src="../resources/mocha.sky" />
|
|
<script>
|
|
describe('MutationObserver', function() {
|
|
var observer = new MutationObserver(function(mutations) { });
|
|
|
|
it('should have methods', function() {
|
|
assert.equal(typeof observer.observe, 'function');
|
|
assert.equal(typeof observer.disconnect, 'function');
|
|
});
|
|
it('should throw with incorrect constructor args', function() {
|
|
assert.throw(function() {
|
|
new MutationObserver({ handleEvent: function() {} });
|
|
}, TypeError);
|
|
assert.throw(function() {
|
|
new MutationObserver({});
|
|
}, TypeError);
|
|
assert.throw(function() {
|
|
new MutationObserver(42);
|
|
}, TypeError);
|
|
assert.throw(function() {
|
|
new MutationObserver("foo");
|
|
}, TypeError);
|
|
});
|
|
});
|
|
</script>
|
|
</html>
|