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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport.html

Issue 2671603003: Move DIALOG element tests to html/dialog/. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport.html
deleted file mode 100644
index 2ee7f264099ddfa9d91d5049d12f929332c48e18..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-body {
- margin: 0;
-}
-
-dialog {
- padding : 0;
-}
-
-#console {
- position: fixed;
-}
-</style>
-<script src="../../../resources/js-test.js"></script>
-</head>
-<body style="height: 10000px; width: 10000px">
-<div style="position: absolute; top: 5000px; left: 5000px; width: 20px;">
- <dialog id="dialog" style="top: 1200px; left: 1200px; right: auto; height: 100px; width: 50%; background-color: yellow">
- </dialog>
-</div>
-<script>
-debug("This tests that a modal dialog's containing block is the initial containing block.");
-debug('The dialog should be onscreen with a width of 50% of the viewport. It is the child of a ' +
- 'narrow element positioned off screen, but its containing block is the initial containing ' +
- 'block, so its position and percent lengths are relative to that.');
-
-function checkPosition(dialog) {
- shouldBe('dialog.offsetParent', 'null');
- shouldBe('dialog.offsetTop', '1200');
- shouldBe('dialog.offsetLeft', '1200');
- // Since dialog's 'width' is '50%', the expected width is half of the
- // viewport width, but viewport width may be odd. It seems Blink rounds up for
- // percentage lengths, so use Math.ceil here.
- expectedWidth = Math.ceil(document.documentElement.clientWidth / 2);
- shouldBe('dialog.clientWidth', 'expectedWidth');
-}
-
-window.scroll(1000, 1000);
-dialog = document.getElementById('dialog');
-dialog.showModal();
-checkPosition(dialog);
-dialog.close();
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698