Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: third_party/WebKit/LayoutTests/html/dialog/abspos-dialog-layout.html

Issue 2671603003: Move DIALOG element tests to html/dialog/. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <dialog id="dialog">It is my dialog.</dialog> 4 <dialog id="dialog">It is my dialog.</dialog>
5 <div id="absolute-div"> 5 <div id="absolute-div">
6 <div id="relative-div"></div> 6 <div id="relative-div"></div>
7 </div> 7 </div>
8 <script> 8 <script>
9 description('Tests layout of absolutely positioned modal dialogs.'); 9 description('Tests layout of absolutely positioned modal dialogs.');
10 10
11 function checkCentered(dialog) { 11 function checkCentered(dialog) {
12 centeredTop = (window.innerHeight - dialog.offsetHeight) / 2; 12 centeredTop = (window.innerHeight - dialog.offsetHeight) / 2;
13 shouldBe('dialog.getBoundingClientRect().top', 'centeredTop'); 13 shouldBe('dialog.getBoundingClientRect().top', 'centeredTop');
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 (function() { 183 (function() {
184 debug('<br>A dialog with specified \'bottom\' should be positioned as usual' ); 184 debug('<br>A dialog with specified \'bottom\' should be positioned as usual' );
185 offset = 50; 185 offset = 50;
186 dialog.style.bottom = offset + 'px'; 186 dialog.style.bottom = offset + 'px';
187 dialog.showModal(); 187 dialog.showModal();
188 shouldBe('dialog.getBoundingClientRect().bottom + window.scrollY', 'window.i nnerHeight - offset'); 188 shouldBe('dialog.getBoundingClientRect().bottom + window.scrollY', 'window.i nnerHeight - offset');
189 dialog.style.bottom = 'auto'; 189 dialog.style.bottom = 'auto';
190 reset(); 190 reset();
191 }()); 191 }());
192 </script> 192 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698