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

Side by Side Diff: LayoutTests/fast/plugins/plugin-placeholder-focus.html

Issue 717193003: HTMLPlugInElement: Use custom focus logic only when there is a plugin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/plugins/plugin-placeholder-focus-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <div id="description"></div>
4 <div id="console"></div>
5
6 <input id="input1">
7 <object id="plugin1" type="application/x-fake-plugin"></object>
8
9 <script>
10 description('Ensures that elements within a plugin placeholder can be keyboard f ocused.');
11
12 // Close buttons are focusable, so we expect focus to move into and out of the p laceholder.
13 var input1 = document.getElementById("input1");
14 var plugin1 = document.getElementById("plugin1");
15 internals.forcePluginPlaceholder(plugin1, { closeable: true });
16 var shadowRoot1 = internals.youngestShadowRoot(plugin1);
17 input1.focus();
18 shouldBe("document.activeElement", "input1");
19 shouldBeNull("shadowRoot1.activeElement");
20 eventSender.keyDown("\t");
21 shouldBe("document.activeElement", "plugin1");
22 shouldBeNonNull("shadowRoot1.activeElement");
23 eventSender.keyDown("\t", ["shiftKey"]);
24 shouldBe("document.activeElement", "input1");
25 shouldBeNull("shadowRoot1.activeElement");
26 document.activeElement.blur();
27 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/plugins/plugin-placeholder-focus-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698