OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <div id="result"></div> | 3 <div id="result"></div> |
4 <style> | 4 <style> |
5 #test {} | 5 #test {} |
6 </style> | 6 </style> |
7 <script> | 7 <script> |
8 if (window.layoutTestController) | 8 if (window.layoutTestController) |
9 layoutTestController.dumpAsText(); | 9 layoutTestController.dumpAsText(); |
10 | 10 |
11 var count = 0; | 11 var count = 0; |
12 | 12 |
13 function setResult() | 13 function setResult() |
14 { | 14 { |
15 if (count == 1) | 15 if (count == 1) |
16 result.innerHTML = "PASS"; | 16 result.innerHTML = "PASS"; |
17 else | 17 else |
18 result.innerHTML = "FAIL"; | 18 result.innerHTML = "FAIL"; |
19 } | 19 } |
20 | 20 |
21 test = document.createElement('div'); | 21 test = document.createElement('div'); |
22 test.addEventListener('DOMSubtreeModified', function() { count++; setResult(); }
, false) | 22 test.addEventListener('DOMSubtreeModified', function() { count++; setResult(); }
, false) |
23 test.setAttribute('class', 'test'); | 23 test.setAttribute('class', 'test'); |
24 </script> | 24 </script> |
25 </html> | 25 </html> |
OLD | NEW |