Try to fix test_bug536537
authorMounir Lamouri <mounir.lamouri@gmail.com>
Thu, 20 May 2010 00:35:37 -0400
changeset 42491 cdd4ec63ff262e3bd204fc0dca9441da6d637165
parent 42490 9e21705b20751031a16442545f4816ea80323078
child 42493 2e60eafd92ba25f10c64d575adaf886bc7b02ed2
push id13363
push userCallek@gmail.com
push dateThu, 20 May 2010 05:03:56 +0000
treeherdermozilla-central@2e60eafd92ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs536537
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Try to fix test_bug536537
layout/forms/test/test_bug377624.html
--- a/layout/forms/test/test_bug377624.html
+++ b/layout/forms/test/test_bug377624.html
@@ -29,16 +29,19 @@ const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cm = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 const Cu = Components.utils;
 
 const FILE_PICKER_CID = "@mozilla.org/filepicker;1";
 const FILE_PICKER_ID = Components.ID(Cc[FILE_PICKER_CID].number);
 const FILE_PICKER_DESCRIPTION = "File Picker Test Service";
 
+const kDefaultFilePicker = Cm.getClassObject(Cc[FILE_PICKER_CID],
+                                             Ci.nsIFactory);
+
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function FilePickerService()
 {
 }
 
 FilePickerService.prototype = {
   _obs: Cc["@mozilla.org/observer-service;1"].
@@ -143,16 +146,21 @@ function runTests()
             is(observer.filterIndex, 1,
                "File picker should show the second filter index (first is zero)");
 
             obs.removeObserver(observer, "TEST_FILEPICKER_APPENDFILTER", false);
             obs.removeObserver(observer, "TEST_FILEPICKER_APPENDFILTERS", false);
             obs.removeObserver(observer, "TEST_FILEPICKER_SHOW", false);
             Cm.unregisterFactory(FILE_PICKER_ID, factory);
 
+            Cm.registerFactory(FILE_PICKER_ID,
+                               "File Picker Service",
+                               FILE_PICKER_CID,
+                               kDefaultFilePicker);
+
             SimpleTest.finish();
           } );
           break;
       }
     },
     shown: false,
     appendFilterCalled: false,
     filters: [],