OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 | 4 |
5 window.jsTestIsAsync = true; | 5 window.jsTestIsAsync = true; |
6 var mutations, mutations2, mutationsWithOldValue; | 6 var mutations, mutations2, mutationsWithOldValue; |
7 var calls; | 7 var calls; |
8 var div; | 8 var div; |
9 | 9 |
10 function testBasic() { | 10 function testBasic() { |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 start(); | 588 start(); |
589 } | 589 } |
590 | 590 |
591 function testAttributeFilterNonHTMLDocument() { | 591 function testAttributeFilterNonHTMLDocument() { |
592 var svgDoc, div, path; | 592 var svgDoc, div, path; |
593 var observer; | 593 var observer; |
594 | 594 |
595 function start() { | 595 function start() { |
596 debug('Testing that attributeFilter respects case with non-HTML elements
.'); | 596 debug('Testing that attributeFilter respects case with non-HTML elements
.'); |
597 | 597 |
598 svgDoc = document.implementation.createDocument('http://www.w3.org/2000/
svg', 'svg', 'svg'); | 598 svgDoc = document.implementation.createDocument('http://www.w3.org/2000/
svg', 'svg'); |
599 mutations = null; | 599 mutations = null; |
600 observer = new MutationObserver(function(m) { | 600 observer = new MutationObserver(function(m) { |
601 mutations = m; | 601 mutations = m; |
602 }); | 602 }); |
603 | 603 |
604 div = svgDoc.createElement('div'); | 604 div = svgDoc.createElement('div'); |
605 observer.observe(div, { attributes: true, attributeFilter: ['ID', 'id',
'booM'] }); | 605 observer.observe(div, { attributes: true, attributeFilter: ['ID', 'id',
'booM'] }); |
606 div.setAttribute('ID', 'ID'); | 606 div.setAttribute('ID', 'ID'); |
607 div.setAttribute('id', 'id'); | 607 div.setAttribute('id', 'id'); |
608 div.setAttribute('baz', 'baz'); | 608 div.setAttribute('baz', 'baz'); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 if (testIndex < tests.length) | 994 if (testIndex < tests.length) |
995 tests[testIndex++](); | 995 tests[testIndex++](); |
996 else | 996 else |
997 finishJSTest(); | 997 finishJSTest(); |
998 } | 998 } |
999 | 999 |
1000 description('Test WebKitMutationObserver.observe on attributes'); | 1000 description('Test WebKitMutationObserver.observe on attributes'); |
1001 | 1001 |
1002 runNextTest(); | 1002 runNextTest(); |
1003 </script> | 1003 </script> |
OLD | NEW |