Bug 1263784 - Fix tests.
authorJustin Dolske <dolske@mozilla.com>
Thu, 14 Apr 2016 15:37:28 -0700
changeset 740901 01a7eb03d01d30efdce87812c17cf3e91dfa4419
parent 740900 3f7ff16b269deef09c41abd0b5901a1b19b3eba1
child 740902 cea44398857d32ec4212980b870ad37a92e2cb12
push id119700
push userjdolske@mozilla.com
push dateThu, 14 Apr 2016 22:37:52 +0000
treeherdertry@cea44398857d [default view] [failures only]
bugs1263784
milestone48.0a1
Bug 1263784 - Fix tests. MozReview-Commit-ID: Bghnsl0rSXM
toolkit/components/prompts/test/chromeScript.js
--- a/toolkit/components/prompts/test/chromeScript.js
+++ b/toolkit/components/prompts/test/chromeScript.js
@@ -106,17 +106,19 @@ function getPromptState(ui) {
   state.defButton0 = isDefaultButton(ui.button0);
   state.defButton1 = isDefaultButton(ui.button1);
   state.defButton2 = isDefaultButton(ui.button2);
 
   let fm = Cc["@mozilla.org/focus-manager;1"].
            getService(Ci.nsIFocusManager);
   let e = fm.focusedElement;
 
-  if (ui.button0.isSameNode(e)) {
+  if (e == null) {
+    state.focused = null;
+  } else if (ui.button0.isSameNode(e)) {
     state.focused = "button0";
   } else if (ui.button1.isSameNode(e)) {
     state.focused = "button1";
   } else if (ui.button2.isSameNode(e)) {
     state.focused = "button2";
   } else if (ui.loginTextbox.inputField.isSameNode(e)) {
     state.focused = "textField";
   } else if (ui.password1Textbox.inputField.isSameNode(e)) {