diff -r 000000000000 -r 6474c204b198 browser/devtools/styleeditor/test/browser_styleeditor_bug_870339.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/devtools/styleeditor/test/browser_styleeditor_bug_870339.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,46 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +function test() +{ + const SIMPLE = TEST_BASE_HTTP + "simple.css"; + const DOCUMENT_WITH_ONE_STYLESHEET = "data:text/html;charset=UTF-8," + + encodeURIComponent( + ["", + "", + " ", + " Bug 870339", + ' ', + " ", + " ", + " ", + "" + ].join("\n")); + + waitForExplicitFinish(); + addTabAndOpenStyleEditors(1, function (aPanel) { + let UI = aPanel.UI; + + // Spam the _onNewDocument callback multiple times before the + // StyleEditorActor has a chance to respond to the first one. + const SPAM_COUNT = 2; + for (let i=0; i