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

Unified Diff: third_party/WebKit/LayoutTests/plugins/focus-change-3-change-blur.html

Issue 2797943002: Set plugin focus via element dispatch (Closed)
Patch Set: Set plugin focus after dispatching DOM events and making sure focus has not changed. Created 3 years, 8 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/plugins/focus-change-3-change-blur.html
diff --git a/third_party/WebKit/LayoutTests/plugins/focus-change-3-change-blur.html b/third_party/WebKit/LayoutTests/plugins/focus-change-3-change-blur.html
new file mode 100644
index 0000000000000000000000000000000000000000..4d67f70cbd42c111d6414879ca67462575bd1849
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/plugins/focus-change-3-change-blur.html
@@ -0,0 +1,33 @@
+<script src="../resources/js-test.js"></script>
+<p>Test changing focus inside plugin onblur event</p>
+<input id="input1" type="text" onfocus="i1Focus()" onblur="i1Blur()"></input>
+<input id="input2" type="text" onfocus="i2Focus()" onblur="i2Blur()"></input>
+<input id="input3" type="text" onfocus="i3Focus()" onblur="i3Blur()"></input>
+<embed id="plugin" type="application/x-blink-test-plugin" onfocus="pFocus()" onblur="pBlur()"></embed>
+<script>
+function i1Focus() { debug('i1focus'); }
+function i1Blur() { debug('i1blur'); }
+function i2Focus() { debug('i2focus'); }
+function i2Blur() { debug('i2blur'); }
+function i3Focus() { debug('i3focus'); }
+function i3Blur() { debug('i3blur'); }
+function pFocus() { debug('pfocus'); }
+function pBlur() {
+ debug('pblur-change-2');
+ document.getElementById('input2').focus();
+}
+
+if (testRunner)
+ testRunner.waitUntilDone();
+
+document.getElementById('input1').focus();
+document.getElementById('plugin').focus();
+document.getElementById('input3').focus();
+
+setTimeout(
+ function() {
+ if (testRunner)
+ testRunner.notifyDone();
+ },
+ 0);
+</script>

Powered by Google App Engine
This is Rietveld 408576698