Skip to content

Commit 3e16165

Browse files
committed
Fixed save/load crash in FF38 by renaming mentions of 'Preferences' to 'Prefs'.
1 parent 6f9c48a commit 3e16165

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

seleniumbuilder/chrome/content/html/js/builder/dialogs/exportscript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,4 @@ builder.dialogs.exportscript.saveAs = function() {
240240

241241

242242

243-
if (builder && builder.loader && builder.loader.loadNextMainScript) { builder.loader.loadNextMainScript(); }
243+
if (builder && builder.loader && builder.loader.loadNextMainScript) { builder.loader.loadNextMainScript(); }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var fc = new bridge.FormatCollection(bridge.SeleniumIDE.Preferences.DEFAULT_OPTIONS);
1+
var fc = new bridge.FormatCollection(bridge.SeleniumIDE.Prefs.DEFAULT_OPTIONS);
22
var format = fc.findFormat('default');
33
var tc = new bridge.TestCase();
4-
format.saveAs(tc);
4+
format.saveAs(tc);

seleniumbuilder/chrome/content/html/js/builder/selenium1/adapter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ builder.selenium1.adapter.exportScriptWithFormatToPath = function(script, format
236236
};
237237

238238
builder.selenium1.adapter.formatCollection = function() {
239-
return new bridge.FormatCollection(bridge.SeleniumIDE.Preferences.DEFAULT_OPTIONS);
239+
return new bridge.FormatCollection(bridge.SeleniumIDE.Prefs.DEFAULT_OPTIONS);
240240
};
241241

242242
builder.selenium1.adapter.findBaseUrl = function(script) {
@@ -382,4 +382,4 @@ builder.selenium1.io.getSaveSuiteFormat = function() {
382382

383383

384384

385-
if (builder && builder.loader && builder.loader.loadNextMainScript) { builder.loader.loadNextMainScript(); }
385+
if (builder && builder.loader && builder.loader.loadNextMainScript) { builder.loader.loadNextMainScript(); }

seleniumbuilder/chrome/content/html/js/selenium-ide/format.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ FormatCollection.prototype.getDefaultFormat = function() {
210210

211211
FormatCollection.loadPluginFormats = function(options) {
212212
var formats = [];
213-
var pluginProvided = SeleniumIDE.Preferences.getString("pluginProvidedFormatters");
213+
var pluginProvided = SeleniumIDE.Prefs.getString("pluginProvidedFormatters");
214214

215215
if (pluginProvided) {
216216
var split_pluginProvided = pluginProvided.split(",");
@@ -517,4 +517,4 @@ PluginFormat.prototype.getSource = function() {
517517

518518
PluginFormat.prototype.getFormatURI = function() {
519519
return this.url;
520-
}
520+
}

seleniumbuilder/chrome/content/html/js/selenium-ide/preferences.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
if (!this.SeleniumIDE) this.SeleniumIDE = {};
1818

19-
SeleniumIDE.Preferences = {
19+
SeleniumIDE.Prefs = {
2020
TEST_BRANCH: Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions.selenium-ide.test."),
2121
branch: Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions.selenium-ide."),
2222

@@ -111,7 +111,7 @@ SeleniumIDE.Preferences = {
111111
}
112112
};
113113

114-
SeleniumIDE.Preferences.DEFAULT_OPTIONS = {
114+
SeleniumIDE.Prefs.DEFAULT_OPTIONS = {
115115
encoding: "UTF-8",
116116

117117
// This should be called 'userExtensionsPaths', but it is left for backward compatibility.
@@ -150,4 +150,4 @@ SeleniumIDE.Preferences.DEFAULT_OPTIONS = {
150150

151151
recordOnOpen:
152152
"true"
153-
};
153+
};

seleniumbuilder/chrome/content/html/js/selenium-ide/tools.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17-
if (this.SeleniumIDE && SeleniumIDE.Preferences) {
18-
this.Preferences = SeleniumIDE.Preferences;
17+
if (this.SeleniumIDE && SeleniumIDE.Prefs) {
18+
this.Prefs = SeleniumIDE.Prefs;
1919
} else {
20-
// Preferences is not available when called from xlator
21-
this.Preferences = {
20+
// Prefs is not available when called from xlator
21+
this.Prefs = {
2222
getString: function(name, defaultValue) {
2323
return defaultValue;
2424
}
@@ -55,7 +55,7 @@ function Log(category) {
5555
Log.prototype = {
5656
_getThreshold: function() {
5757
if (!this.threshold) {
58-
this.threshold = Preferences.getString("internalLogThreshold", "INFO");
58+
this.threshold = Prefs.getString("internalLogThreshold", "INFO");
5959
}
6060
return this.threshold;
6161
},
@@ -94,7 +94,7 @@ function showFilePicker(window, title, mode, defaultDirPrefName, handler, defaul
9494
var nsIFilePicker = Components.interfaces.nsIFilePicker;
9595
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
9696
fp.init(window, title, mode);
97-
var defaultDir = Preferences.getString(defaultDirPrefName);
97+
var defaultDir = Prefs.getString(defaultDirPrefName);
9898
if (defaultDir) {
9999
fp.displayDirectory = SeFileUtils.getFile(defaultDir);
100100
}
@@ -104,7 +104,7 @@ function showFilePicker(window, title, mode, defaultDirPrefName, handler, defaul
104104
}
105105
var res = fp.show();
106106
if (res == nsIFilePicker.returnOK || res == nsIFilePicker.returnReplace) {
107-
Preferences.setString(defaultDirPrefName, fp.file.parent.path);
107+
Prefs.setString(defaultDirPrefName, fp.file.parent.path);
108108
return handler(fp);
109109
} else {
110110
return null;
@@ -268,4 +268,4 @@ function defineEnum(clazz, names) {
268268

269269
function $(id) {
270270
return document.getElementById(id);
271-
}
271+
}

seleniumbuilder/chrome/content/seleniumBuilder2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,4 @@ bridge.SeleniumIDE = SeleniumIDE;
290290
bridge.TestCase = TestCase;
291291
bridge.TestSuite = TestSuite;
292292
bridge.showFilePicker = showFilePicker;
293-
bridge.Format = Format;
293+
bridge.Format = Format;

0 commit comments

Comments
 (0)