Bug 1390000 - Set prefs before loading input test page. r=esawin

Set prefs in testInputConnection itself, before we load
robocop_input.html, so the page uses new pref values.
This commit is contained in:
Jim Chen 2017-08-15 13:10:00 -04:00
Родитель 102696496d
Коммит 2413c60be8
2 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -26,11 +26,6 @@
setTimeout(function() { designMode.contentDocument.designMode = "on" }, 0);
}
// Spatial navigation interferes with design-mode key event tests.
SpecialPowers.setBoolPref("snav.enabled", false);
// Enable "selectionchange" events for input/textarea.
SpecialPowers.setBoolPref("dom.select_events.textcontrols.enabled", true);
// An input that resets the editor on every input by resetting the value property.
let resetting_input = document.getElementById("resetting-input");
resetting_input.addEventListener("input", function() {

Просмотреть файл

@ -30,6 +30,12 @@ public class testInputConnection extends JavascriptBridgeTest {
public void testInputConnection() throws InterruptedException {
GeckoHelper.blockForReady();
// Spatial navigation interferes with design-mode key event tests.
mActions.setPref("snav.enabled", false, /* flush */ false);
// Enable "selectionchange" events for input/textarea.
mActions.setPref("dom.select_events.enabled", true, /* flush */ false);
mActions.setPref("dom.select_events.textcontrols.enabled", true, /* flush */ false);
final String url = mStringHelper.ROBOCOP_INPUT_URL;
NavigationHelper.enterAndLoadUrl(url);
mToolbar.assertTitle(url);