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

Unified Diff: Source/web/tests/data/focus_blur_events.html

Issue 26149002: Don't dispatch blur/focus events if the element's page is not focused. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert to original approach, update test. Created 7 years, 2 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 | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/data/focus_blur_events.html
diff --git a/Source/web/tests/data/focus_blur_events.html b/Source/web/tests/data/focus_blur_events.html
new file mode 100644
index 0000000000000000000000000000000000000000..691658a6779b44a3a75e690ca1fa1e27aaa40fd5
--- /dev/null
+++ b/Source/web/tests/data/focus_blur_events.html
@@ -0,0 +1,18 @@
+<input id="field" />
+<div id="message"></div>
+<script>
+ var field = document.getElementById('field');
+
+ field.addEventListener('blur', function() {
+ document.getElementById('message').innerText += 'blur';
+
+ field.addEventListener('focus', function() {
+ document.getElementById('message').innerText += 'focus';
+ });
+
+ field.blur();
+ field.focus();
+ });
+
+ field.focus();
+</script>
« no previous file with comments | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698