Skip to content

Instantly share code, notes, and snippets.

@neonux
Created September 22, 2011 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neonux/1235976 to your computer and use it in GitHub Desktop.
Save neonux/1235976 to your computer and use it in GitHub Desktop.
diff --git a/browser/devtools/styleeditor/StyleEditorChrome.jsm b/browser/devtools/styleeditor/StyleEditorChrome.jsm
index f8eb4b9..dbff59d 100644
--- a/browser/devtools/styleeditor/StyleEditorChrome.jsm
+++ b/browser/devtools/styleeditor/StyleEditorChrome.jsm
@@ -402,6 +402,7 @@ StyleEditorChrome.prototype = {
data: {
editor: aEditor
},
+ disableAnimations: this._alwaysDisableAnimations,
ordinal: aEditor.styleSheetIndex,
onCreate: function ASV_onItemCreate(aSummary, aDetails, aData) {
let editor = aData.editor;
diff --git a/browser/devtools/styleeditor/test/browser_styleeditor_enabled.js b/browser/devtools/styleeditor/test/browser_styleeditor_enabled.js
index 4d5b9e3..56c2b95 100644
--- a/browser/devtools/styleeditor/test/browser_styleeditor_enabled.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_enabled.js
@@ -10,14 +10,11 @@ function test()
{
waitForExplicitFinish();
- let count = 0;
addTabAndLaunchStyleEditorChromeWhenLoaded(function (aChrome) {
aChrome.addChromeListener({
onEditorAdded: function (aChrome, aEditor) {
- count++;
- if (count != 2) {
- return; // we want to test against the first stylesheet after all
- // stylesheets are loaded
+ if (aEditor.styleSheetIndex != 0) {
+ return; // we test against first stylesheet
}
if (!aEditor.sourceEditor) {
diff --git a/browser/devtools/styleeditor/test/head.js b/browser/devtools/styleeditor/test/head.js
index 9068a48..7ee36e9 100644
--- a/browser/devtools/styleeditor/test/head.js
+++ b/browser/devtools/styleeditor/test/head.js
@@ -21,9 +21,12 @@ function launchStyleEditorChrome(aCallback)
if (gChromeWindow.document.readyState != "complete") {
gChromeWindow.addEventListener("load", function onChromeLoad() {
gChromeWindow.removeEventListener("load", onChromeLoad, true);
+
+ gChromeWindow.styleEditorChrome._alwaysDisableAnimations = true;
aCallback(gChromeWindow.styleEditorChrome);
}, true);
} else {
+ gChromeWindow.styleEditorChrome._alwaysDisableAnimations = true;
aCallback(gChromeWindow.styleEditorChrome);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment