| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 br { | 3 br { |
| 4 touch-action: none; | 4 touch-action: none; |
| 5 } | 5 } |
| 6 </style> | 6 </style> |
| 7 <!-- | 7 <!-- |
| 8 This is a regression test against a double unregistration of a touch action | 8 This is a regression test against a double unregistration of a touch action |
| 9 event handler on a <br> element. When the document finishes loading and is | 9 event handler on a <br> element. When the document finishes loading and is |
| 10 attached to the view, all of its RenderObjects are destroyed and recreated. If | 10 attached to the view, all of its LayoutObjects are destroyed and recreated. If |
| 11 a RenderObject had a touch action associated with it, it will need to remove | 11 a LayoutObject had a touch action associated with it, it will need to remove |
| 12 the fake event handler it registered for it in the EventHandlerRegistry. | 12 the fake event handler it registered for it in the EventHandlerRegistry. |
| 13 However, when the document gets detached, all of the event handlers within it | 13 However, when the document gets detached, all of the event handlers within it |
| 14 are automatically unregistered. When the RenderObject tries to unregister its | 14 are automatically unregistered. When the LayoutObject tries to unregister its |
| 15 own handler after the fact, it is no longer there and we hit an assertion | 15 own handler after the fact, it is no longer there and we hit an assertion |
| 16 failure. | 16 failure. |
| 17 | 17 |
| 18 Note that this test doesn't use js-test.js because it also inadvertedly | 18 Note that this test doesn't use js-test.js because it also inadvertedly |
| 19 triggers the same bug by appending <br> elements to the document. | 19 triggers the same bug by appending <br> elements to the document. |
| 20 | 20 |
| 21 The test passes if it doesn't trigger an assertion failure in a debug build. | 21 The test passes if it doesn't trigger an assertion failure in a debug build. |
| 22 --> | 22 --> |
| 23 <script> | 23 <script> |
| 24 if (window.testRunner) | 24 if (window.testRunner) |
| 25 testRunner.dumpAsText(); | 25 testRunner.dumpAsText(); |
| 26 </script> | 26 </script> |
| 27 PASS<br> | 27 PASS<br> |
| OLD | NEW |