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

Unified Diff: LayoutTests/dialog/dialogs-with-no-backdrop.html

Issue 17654008: Implement the ::backdrop pseudo-element for modal <dialog>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use element directly Created 7 years, 5 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: LayoutTests/dialog/dialogs-with-no-backdrop.html
diff --git a/LayoutTests/dialog/dialogs-with-no-backdrop.html b/LayoutTests/dialog/dialogs-with-no-backdrop.html
new file mode 100644
index 0000000000000000000000000000000000000000..38a5943f9e2e04720dd4b99982f11431c7534ad8
--- /dev/null
+++ b/LayoutTests/dialog/dialogs-with-no-backdrop.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<style>
+dialog::backdrop {
+ position: absolute;
+ top: 100px;
+ left: 100px;
+ height: 100px;
+ width: 100px;
+ background: red;
+}
+
+#display-none-backdrop::backdrop {
+ display: none;
+}
+</style>
+<body>
+Test that ::backdrop is not shown for non-open or non-modal dialogs.
+The test passes if there is no red shown.
+<dialog id="never-opened-dialog"></dialog>
+<dialog id="display-none-dialog" style="display: none"></dialog>
+<dialog id="non-modal-dialog" style="visibility: hidden"></dialog>
+<dialog id="display-none-backdrop" style="visibility: hidden"></dialog>
+<dialog id="closed-dialog"></dialog>
+<dialog id="removed-dialog"></dialog>
+<script>
+document.getElementById('display-none-dialog').showModal();
+document.getElementById('non-modal-dialog').show();
+document.getElementById('display-none-backdrop').showModal();
+
+var closedDialog = document.getElementById('closed-dialog');
+closedDialog.showModal();
+closedDialog.close();
+
+var removedDialog = document.getElementById('removed-dialog');
+removedDialog.showModal();
+removedDialog.parentNode.removeChild(removedDialog);
+</script>
+</body>
« no previous file with comments | « LayoutTests/dialog/backdrop-stacking-order-expected.html ('k') | LayoutTests/dialog/dialogs-with-no-backdrop-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698