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

Side by Side Diff: LayoutTests/fast/dom/HTMLDialogElement/non-anchored-dialog-positioning.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 /* Remove body margin and dialog styles to allow comparing dialog's position wit h that of plain span elements. */ 5 /* Remove body margin and dialog styles to allow comparing dialog's position wit h that of plain span elements. */
6 body { 6 body {
7 margin: 0; 7 margin: 0;
8 } 8 }
9 9
10 dialog { 10 dialog {
11 border: 0; 11 border: 0;
12 padding: 0; 12 padding: 0;
13 height: auto; 13 height: auto;
14 width: auto; 14 width: auto;
15 } 15 }
16 16
17 .filler { 17 .filler {
18 height: 20000px; 18 height: 20000px;
19 } 19 }
20 20
21 </style> 21 </style>
22 <script src="../../js/resources/js-test-pre.js"></script> 22 <script src="../../../resources/js-test.js"></script>
23 <script> 23 <script>
24 function checkTopOfViewport(dialog) { 24 function checkTopOfViewport(dialog) {
25 shouldBe('dialog.getBoundingClientRect().top', '0'); 25 shouldBe('dialog.getBoundingClientRect().top', '0');
26 } 26 }
27 27
28 function checkCentered(dialog) { 28 function checkCentered(dialog) {
29 expectedTop = (window.innerHeight - dialog.offsetHeight) / 2; 29 expectedTop = (window.innerHeight - dialog.offsetHeight) / 2;
30 shouldBe('dialog.getBoundingClientRect().top', 'expectedTop'); 30 shouldBe('dialog.getBoundingClientRect().top', 'expectedTop');
31 } 31 }
32 32
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 plainSpan.parentNode.removeChild(plainSpan); 206 plainSpan.parentNode.removeChild(plainSpan);
207 dialog.style.position = 'relative'; 207 dialog.style.position = 'relative';
208 dialog.style.top = '50px'; 208 dialog.style.top = '50px';
209 // Just test non-modal since modal is covered by other tests (for modal, relativ e computes to absolute) 209 // Just test non-modal since modal is covered by other tests (for modal, relativ e computes to absolute)
210 dialog.show(); 210 dialog.show();
211 shouldBe('dialog.getBoundingClientRect().top', 'expectedTop'); 211 shouldBe('dialog.getBoundingClientRect().top', 'expectedTop');
212 dialog.close(); 212 dialog.close();
213 </script> 213 </script>
214 </body> 214 </body>
215 </html> 215 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698