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

Unified Diff: LayoutTests/fast/dom/shadow/shadowdom-for-input-file.html

Issue 23484032: Shadow DOM: Move handleDOMActivateEvent back from InputTypeView to InputType. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/fast/dom/shadow/shadowdom-for-input-file.html
diff --git a/LayoutTests/fast/dom/shadow/shadowdom-for-input-file.html b/LayoutTests/fast/dom/shadow/shadowdom-for-input-file.html
new file mode 100644
index 0000000000000000000000000000000000000000..d3ddd5dec7b066e41445bc4ce0324aa238330615
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/shadowdom-for-input-file.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<body>
+<script src="../../js/resources/js-test-pre.js"></script>
+<input type="file">
+<script>
+description('Clicking on a file control should open a file chooser dialog even if it has author ShadowRoots. This test requires testRunner, and should open the file chooser dialog just once.');
+var file = document.querySelector('input');
+var root = file.createShadowRoot();
+root.innerHTML = '<span>Click to choose a file</span>';
+eventSender.mouseMoveTo(file.offsetLeft + 8, file.offsetTop + 8);
+eventSender.mouseDown();
+eventSender.mouseUp();
+
+file.addEventListener('DOMActivate', function(event) { event.preventDefault(); }, false);
+eventSender.mouseDown();
+eventSender.mouseUp();
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698