Bug 801635 - Fix mochitest-1 orange. r=me
authorMounir Lamouri <mounir.lamouri@gmail.com>
Mon, 21 Jan 2013 12:14:15 +0000
changeset 119421 ed17c53be925ee26464f07b243125167857333b5
parent 119420 332f32b1fad9dba707bc9ac749628c119743133b
child 119422 b8791be70fd0b66ec406b0f0404be2f48a079f5c
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersme
bugs801635
milestone21.0a1
Bug 801635 - Fix mochitest-1 orange. r=me
content/html/content/test/forms/test_input_file_b2g_disabled.html
--- a/content/html/content/test/forms/test_input_file_b2g_disabled.html
+++ b/content/html/content/test/forms/test_input_file_b2g_disabled.html
@@ -6,17 +6,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 801635</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 801635 **/
-  var oldPrefValue = SpecialPowers.getBoolPref('dom.disable_input_file');
+  var oldPrefValue = null;
+  try {
+    oldPrefValue = SpecialPowers.getBoolPref('dom.disable_input_file');
+  } catch(e) {
+  }
 
   var input = document.createElement('input');
 
   SpecialPowers.setBoolPref('dom.disable_input_file', true); 
   input.type='file';
   is(input.type, 'text', "<input type='file'> should be disabled");
   input.type ='text';