Skip to content

Commit

Permalink
Bug 1675349: Update tests under widget/tests for the removal of plugi…
Browse files Browse the repository at this point in the history
…ns. r=jmathies

UPDATED
-------
widget/tests/test_imestate.html
Test that plugin IME state properly tracks focus
Update to reflect that plugins are not IME focusable.

REMOVED
-------
widget/tests/test_plugin_scroll_consistency.html
On most platforms does nothing but on Windows performs basic test that layout positions and sizes are internally consistent.

widget/tests/test_chrome_context_menus_win.xhtml
Make sure that right-clickable chrome context menus appear when a plugin has focus.

widget/tests/test_plugin_input_event.html
Test plugin keyboard input

Differential Revision: https://phabricator.services.mozilla.com/D95920
  • Loading branch information
davidp3 committed Nov 18, 2020
1 parent 1dbe5ce commit 19001b7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 207 deletions.
6 changes: 0 additions & 6 deletions widget/tests/chrome.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ support-files = window_bug593307_offscreen.xhtml window_bug593307_centerscreen.x
support-files = window_wheeltransaction.xhtml
[test_imestate.html]
support-files = window_imestate_iframes.html
[test_plugin_scroll_consistency.html]
[test_composition_text_querycontent.xhtml]
support-files = window_composition_text_querycontent.xhtml
[test_input_events_on_deactive_window.xhtml]
Expand Down Expand Up @@ -95,11 +94,6 @@ run-if = toolkit == 'gtk' # Currently the test works on only gtk3
# Windows
# taskbar_previews.xhtml
# window_state_windows.xhtml
[test_chrome_context_menus_win.xhtml]
skip-if = toolkit != "windows"
support-files = chrome_context_menus_win.xhtml
[test_plugin_input_event.html]
skip-if = toolkit != "windows"
[test_mouse_scroll.xhtml]
skip-if = toolkit != "windows"
support-files =
Expand Down
98 changes: 0 additions & 98 deletions widget/tests/chrome_context_menus_win.xhtml

This file was deleted.

26 changes: 0 additions & 26 deletions widget/tests/test_chrome_context_menus_win.xhtml

This file was deleted.

16 changes: 8 additions & 8 deletions widget/tests/test_imestate.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body onload="setTimeout(runTests, 0);" style="ime-mode: disabled;">
<script>
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
</script>
<div id="display" style="ime-mode: disabled;">
<!-- input elements -->
<input type="text" id="text"/><br/>
Expand Down Expand Up @@ -674,21 +671,24 @@

var plugin = document.getElementById("plugin");

// Plugins are not supported and their elements should not accept focus;
// therefore, IME should not enable when we play with it.

document.activeElement.blur();
is(gUtils.IMEStatus, gUtils.IME_STATUS_DISABLED,
"runPluginTest: unexpected enabled state when no element has focus");

plugin.focus();
is(gUtils.IMEStatus, gUtils.IME_STATUS_PLUGIN,
"runPluginTest: unexpected enabled state when plugin has focus");
is(gUtils.IMEStatus, gUtils.IME_STATUS_DISABLED,
"runPluginTest: unexpected enabled state when attempting to give focus to plugin");

plugin.blur();
is(gUtils.IMEStatus, gUtils.IME_STATUS_DISABLED,
"runPluginTest: unexpected enabled state when plugin has focus");
"runPluginTest: unexpected enabled state after unfocusing plugin");

plugin.focus();
is(gUtils.IMEStatus, gUtils.IME_STATUS_PLUGIN,
"runPluginTest: unexpected enabled state when plugin has focus #2");
is(gUtils.IMEStatus, gUtils.IME_STATUS_DISABLED,
"runPluginTest: unexpected enabled state when attempting to give focus to plugin #2");

var parent = plugin.parentNode;
parent.removeChild(plugin);
Expand Down
69 changes: 0 additions & 69 deletions widget/tests/test_plugin_input_event.html

This file was deleted.

0 comments on commit 19001b7

Please sign in to comment.