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
28 lines
917 B
Plaintext
28 lines
917 B
Plaintext
<html>
|
|
<import src="../resources/chai.sky" />
|
|
<import src="../resources/mocha.sky" />
|
|
<script>
|
|
describe('MutationObserver', function() {
|
|
it('should not invoke callbacks when appending a script', function() {
|
|
var mutationsDelivered = false;
|
|
function callback(mutations) {
|
|
mutationsDelivered = true;
|
|
}
|
|
|
|
var observer = new MutationObserver(callback);
|
|
var div = document.createElement('div');
|
|
observer.observe(div, {attributes: true});
|
|
div.setAttribute('foo', 'bar');
|
|
assert.notOk(mutationsDelivered);
|
|
var scriptDidRun = false;
|
|
var script = document.createElement('script');
|
|
script.textContent = 'scriptDidRun = true';
|
|
assert.notOk(scriptDidRun);
|
|
document.documentElement.appendChild(script);
|
|
assert.notOk(scriptDidRun);
|
|
assert.notOk(mutationsDelivered);
|
|
});
|
|
});
|
|
</script>
|
|
</html>
|