| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <link href="resources/dialog-layout.css" rel="stylesheet"> | 2 <link href="resources/dialog-layout.css" rel="stylesheet"> |
| 3 <script src="../../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
| 4 <div id="absolute-div"> | 4 <div id="absolute-div"> |
| 5 <div id="relative-div"> | 5 <div id="relative-div"> |
| 6 <dialog id="dialog">It is my dialog.</dialog> | 6 <dialog id="dialog">It is my dialog.</dialog> |
| 7 </div> | 7 </div> |
| 8 </div> | 8 </div> |
| 9 <script> | 9 <script> |
| 10 description('Tests layout of non-modal dialogs.'); | 10 description('Tests layout of non-modal dialogs.'); |
| 11 | 11 |
| 12 dialog = document.querySelector('#dialog'); | 12 dialog = document.querySelector('#dialog'); |
| 13 div = document.querySelector('#div-dialog'); | 13 div = document.querySelector('#div-dialog'); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 44 | 44 |
| 45 (function() { | 45 (function() { |
| 46 debug('<br>Test fixed position'); | 46 debug('<br>Test fixed position'); |
| 47 dialog.style.position = 'fixed'; | 47 dialog.style.position = 'fixed'; |
| 48 dialog.show(); | 48 dialog.show(); |
| 49 shouldBe('dialog.getBoundingClientRect().top', 'offset'); | 49 shouldBe('dialog.getBoundingClientRect().top', 'offset'); |
| 50 shouldBe('dialog.getBoundingClientRect().left', 'offset'); | 50 shouldBe('dialog.getBoundingClientRect().left', 'offset'); |
| 51 dialog.close(); | 51 dialog.close(); |
| 52 }()); | 52 }()); |
| 53 </script> | 53 </script> |
| OLD | NEW |