Index: third_party/WebKit/LayoutTests/fast/dom/inert/simulated-click-inert.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/simulated-click-inert.html b/third_party/WebKit/LayoutTests/fast/dom/inert/simulated-click-inert.html |
similarity index 66% |
copy from third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/simulated-click-inert.html |
copy to third_party/WebKit/LayoutTests/fast/dom/inert/simulated-click-inert.html |
index 5454a8132e99a25b7c0e20994d3970a3b5c9e6a9..5d99a52c0dbc1d746710f374dfdad9d90b091131 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/simulated-click-inert.html |
+++ b/third_party/WebKit/LayoutTests/fast/dom/inert/simulated-click-inert.html |
@@ -1,6 +1,18 @@ |
<!DOCTYPE html> |
<html> |
<head> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+</head> |
+<body onload="runTest()"> |
+ <p>Ensure that simulated click is still dispatched to an inert node. |
+ To test manually, click the CLICK ME label and verify it does change the value of the checkbox.</p> |
+ <div inert id="container"> |
+ <div> |
+ </div> |
+ <input type="checkbox" id="target"> |
+ </div> |
+ <label for="target">CLICK ME</label> |
<script> |
function clickOn(element) |
{ |
@@ -21,23 +33,10 @@ function clickOn(element) |
eventSender.mouseUp(); |
} |
-function runTest() |
-{ |
- if (window.testRunner) |
- testRunner.dumpAsText(); |
- |
- document.querySelector('dialog').showModal(); |
+test(function() { |
clickOn(document.querySelector('label')); |
- document.querySelector('div').textContent = document.getElementById('target').checked ? 'PASS' : 'FAIL'; |
-} |
+ assert_true(document.getElementById('target').checked); |
+}, "Simulated click should still be dispatched to an inert node."); |
</script> |
-</head> |
-<body onload="runTest()"> |
- <p>Ensure that simulated click is still dispatched to an inert node. |
- To test manually, click the CLICK ME label and verify it does change the value of the checkbox.</p> |
- <div> |
- </div> |
- <input type="checkbox" id="target"> |
- <dialog><label for="target">CLICK ME</label></dialog> |
</body> |
</html> |