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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/inert-inlines.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/inert-inlines.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/inert-inlines.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/inert-inlines.html
deleted file mode 100644
index 8d95ae6b8e5640320e66cdab6dfa42c5b0430ef3..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/inert-inlines.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-dialog {
- width: 50px;
-}
-</style>
-<script src="../../../resources/js-test.js"></script>
-</head>
-<body>
-<a id="a" href="javascript:void(0)">Click me</a>
-<button id="button">Click me</button>
-<div id="div" style="background-color: blue; width: 50px; height: 50px">Click meeee</div>
-<span id="span">Click me</span>
-<div id="dialog-parent" style="width: 50px; height: 50px">
- <span id="dialog-sibling">Click meeee</span>
- <dialog></dialog>
-</div>
-<script>
-function clickOn(element)
-{
- if (!window.eventSender)
- return;
-
- var absoluteTop = 0;
- var absoluteLeft = 0;
- for (var parentNode = element; parentNode; parentNode = parentNode.offsetParent) {
- absoluteLeft += parentNode.offsetLeft;
- absoluteTop += parentNode.offsetTop;
- }
-
- var x = absoluteLeft + element.offsetWidth / 2;
- var y = absoluteTop + element.offsetHeight / 2;
- eventSender.mouseMoveTo(x, y);
- eventSender.mouseDown();
- eventSender.mouseUp();
- eventSender.mouseMoveTo(0, 0);
-}
-
-function eventFiredOnInertElement(e) {
- e.target.style.background = 'red';
- inertElementFiredOn = true;
-}
-
-description('Tests that inert inlines do not receive mouse events. ' +
- 'To test manually, click on all the "Click me"s. The test ' +
- 'fails if you see red.');
-inertElements = ['a', 'button', 'div', 'span']
-inertElements.forEach(function(id) {
- element = document.getElementById(id);
- element.addEventListener('click', eventFiredOnInertElement);
- element.addEventListener('mousemove', eventFiredOnInertElement);
-});
-
-document.addEventListener('click', function(e) {
- document.firedOn = true;
-});
-
-document.getElementById('dialog-parent').addEventListener('click', function(e) {
- e.target.firedOn = true;
-});
-
-document.querySelector('dialog').showModal();
-inertElements.forEach(function(id) {
- expectedTarget = document;
- if (id == 'dialog-sibling')
- expectedTarget = document.getElementById('dialog-parent')
- element = document.getElementById(id);
- inertElementFiredOn = false;
- expectedTarget.firedOn = false;
- debug('clicking on ' + id);
- clickOn(element);
- shouldBeFalse('inertElementFiredOn');
- shouldBeTrue('expectedTarget.firedOn');
-});
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698