diff options
author | Matt A. Tobin <email@mattatobin.com> | 2014-07-02 00:07:24 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2014-07-02 05:58:53 -0400 |
commit | 77707b62085f862709562185e615634e7431080a (patch) | |
tree | cb1d173d0dbae3332df6d4a1160336e04c2286a7 /browser/devtools/styleeditor/test/browser_styleeditor_pretty.js | |
parent | 432326d2eae38aaacaeff9e790a2835d6578ee3b (diff) | |
download | palemoon-gre-77707b62085f862709562185e615634e7431080a.tar.gz |
Remove tests from /browser (except /browser/metro)
Diffstat (limited to 'browser/devtools/styleeditor/test/browser_styleeditor_pretty.js')
-rw-r--r-- | browser/devtools/styleeditor/test/browser_styleeditor_pretty.js | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/browser/devtools/styleeditor/test/browser_styleeditor_pretty.js b/browser/devtools/styleeditor/test/browser_styleeditor_pretty.js deleted file mode 100644 index 94cd695c8..000000000 --- a/browser/devtools/styleeditor/test/browser_styleeditor_pretty.js +++ /dev/null @@ -1,52 +0,0 @@ -/* vim: set ts=2 et sw=2 tw=80: */ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -const TESTCASE_URI = TEST_BASE + "minified.html"; - -let gUI; - -function test() -{ - waitForExplicitFinish(); - - addTabAndOpenStyleEditor(function(panel) { - gUI = panel.UI; - gUI.on("editor-added", function(event, editor) { - editor.getSourceEditor().then(function() { - testEditor(editor); - }); - }); - }); - - content.location = TESTCASE_URI; -} - -let editorTestedCount = 0; -function testEditor(aEditor) -{ - if (aEditor.styleSheet.styleSheetIndex == 0) { - let prettifiedSource = "body\{\r?\n\tbackground\:white;\r?\n\}\r?\n\r?\ndiv\{\r?\n\tfont\-size\:4em;\r?\n\tcolor\:red\r?\n\}\r?\n"; - let prettifiedSourceRE = new RegExp(prettifiedSource); - - ok(prettifiedSourceRE.test(aEditor.sourceEditor.getText()), - "minified source has been prettified automatically"); - editorTestedCount++; - let summary = gUI.editors[1].summary; - EventUtils.synthesizeMouseAtCenter(summary, {}, gPanelWindow); - } - - if (aEditor.styleSheet.styleSheetIndex == 1) { - let originalSource = "body \{ background\: red; \}\r?\ndiv \{\r?\nfont\-size\: 5em;\r?\ncolor\: red\r?\n\}"; - let originalSourceRE = new RegExp(originalSource); - - ok(originalSourceRE.test(aEditor.sourceEditor.getText()), - "non-minified source has been left untouched"); - editorTestedCount++; - } - - if (editorTestedCount == 2) { - gUI = null; - finish(); - } -} |