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

Unified Diff: LayoutTests/fast/frames/frame-focus-no-focusout-event.html

Issue 284823005: Calling focus() on an iframe should not trigger a 'focusout' event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/frames/frame-focus-no-focusout-event.html
diff --git a/LayoutTests/fast/frames/frame-focus-no-focusout-event.html b/LayoutTests/fast/frames/frame-focus-no-focusout-event.html
new file mode 100644
index 0000000000000000000000000000000000000000..d092557a6476ed3de139ceaa9043b1286ac6e206
--- /dev/null
+++ b/LayoutTests/fast/frames/frame-focus-no-focusout-event.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<iframe></iframe>
+<script>
+ var iframe = document.getElementsByTagName('iframe')[0];
+ var focusoutEventCount = 0;
+ iframe.contentDocument.documentElement.addEventListener('focusout', function () {
+ ++focusoutEventCount;
+ });
+
+ test(function() {
+ iframe.contentDocument.documentElement.contentEditable = true;
+ iframe.contentDocument.documentElement.focus();
+ assert_equals(focusoutEventCount, 0);
+ }, "Test that calling focus() on an iframe does not cause a focusout event to be fired");
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698