2 <script src=
"../../../resources/js-test.js"></script>
5 description('Test MutationObserver.observe options related to character data');
7 var observer
= new MutationObserver(function() {});
8 var text
= document
.createTextNode('0');
10 observer
.observe(text
, {characterDataOldValue
: true});
12 var records
= observer
.takeRecords();
13 shouldBe('records.length', '1');
14 shouldBeEqualToString('records[0].oldValue', '0');
15 observer
.disconnect();
17 observer
.observe(text
, {characterDataOldValue
: false});
19 var records
= observer
.takeRecords();
20 shouldBe('records.length', '1');
21 shouldBeNull('records[0].oldValue');
22 observer
.disconnect();