diff -r 000000000000 -r 6474c204b198 browser/devtools/styleinspector/test/browser_ruleview_livepreview.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/devtools/styleinspector/test/browser_ruleview_livepreview.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,66 @@ +/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test that changes are previewed when editing a property value + +// Format +// { +// value : what to type in the field +// expected : expected computed style on the targeted element +// } +const TEST_DATA = [ + {value: "inline", expected: "inline"}, + {value: "inline-block", expected: "inline-block"}, + + // Invalid property values should not apply, and should fall back to default + {value: "red", expected: "block"}, + {value: "something", expected: "block"}, + + {escape: true, value: "inline", expected: "block"} +]; + +let test = asyncTest(function*() { + yield addTab("data:text/html,test rule view live preview on user changes"); + + let style = '#testid {display:block;}'; + let styleNode = addStyle(content.document, style); + content.document.body.innerHTML = '