mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 17:16:12 +00:00
1df3f9208d
--HG-- rename : content/html/content/test/test_bug546995-1.html => content/html/content/test/test_bug546995.html extra : rebase_source : 5f84b2ef8ce5bf4cad9c736dc63393e7286ae51f
25 lines
960 B
JavaScript
25 lines
960 B
JavaScript
function test() {
|
|
waitForExplicitFinish();
|
|
|
|
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
|
.getService(Components.interfaces.nsIPrefBranch);
|
|
var gAutofocusPref = prefs.getBoolPref("browser.autofocus");
|
|
prefs.setBoolPref("browser.autofocus", false);
|
|
|
|
gBrowser.selectedTab.linkedBrowser.addEventListener("load", function () {
|
|
gBrowser.selectedTab.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
|
|
|
executeSoon(function () {
|
|
is(gBrowser.selectedTab.linkedBrowser.contentDocument.activeElement,
|
|
gBrowser.selectedTab.linkedBrowser.contentDocument.body,
|
|
"foo");
|
|
|
|
prefs.setBoolPref("browser.autofocus", gAutofocusPref);
|
|
|
|
finish();
|
|
});
|
|
}, true);
|
|
|
|
gBrowser.selectedTab.linkedBrowser.loadURI("data:text/html,<!DOCTYPE html><html><body><input autofocus><button autofocus></button><textarea autofocus></textarea><select autofocus></select></body></html>");
|
|
}
|