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

Side by Side Diff: third_party/WebKit/LayoutTests/html/dialog/fixpos-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 <style> 3 <style>
4 dialog { 4 dialog {
5 position: fixed; 5 position: fixed;
6 } 6 }
7 </style> 7 </style>
8 <script src="../../../resources/js-test.js"></script> 8 <script src="../../resources/js-test.js"></script>
9 <dialog id="dialog">It is my dialog.</dialog> 9 <dialog id="dialog">It is my dialog.</dialog>
10 <div id="absolute-div"> 10 <div id="absolute-div">
11 <div id="relative-div"></div> 11 <div id="relative-div"></div>
12 </div> 12 </div>
13 <script> 13 <script>
14 description('Tests layout of fixed positioned dialogs.'); 14 description('Tests layout of fixed positioned dialogs.');
15 15
16 function checkCentered(dialog) { 16 function checkCentered(dialog) {
17 centeredTop = (window.innerHeight - dialog.offsetHeight) / 2; 17 centeredTop = (window.innerHeight - dialog.offsetHeight) / 2;
18 shouldBe('dialog.getBoundingClientRect().top', 'centeredTop'); 18 shouldBe('dialog.getBoundingClientRect().top', 'centeredTop');
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 (function() { 152 (function() {
153 debug('<br>A dialog with specified \'top\' should be positioned as usual'); 153 debug('<br>A dialog with specified \'top\' should be positioned as usual');
154 offset = 50; 154 offset = 50;
155 dialog.style.top = offset + 'px'; 155 dialog.style.top = offset + 'px';
156 dialog.showModal(); 156 dialog.showModal();
157 shouldBe('dialog.getBoundingClientRect().top', 'offset'); 157 shouldBe('dialog.getBoundingClientRect().top', 'offset');
158 158
159 reset(); 159 reset();
160 }()); 160 }());
161 </script> 161 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698