mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1187681 - [Rule View] Ensure the property value copied also includes the priority r=mikeratcliffe
This commit is contained in:
parent
85a86a8c8c
commit
4335253456
@ -1110,7 +1110,8 @@ TextProperty.prototype = {
|
||||
*/
|
||||
stringifyProperty: function() {
|
||||
// Get the displayed property value
|
||||
let declaration = this.name + ": " + this.editor.committed.value + ";";
|
||||
let declaration = this.name + ": " + this.editor.valueSpan.textContent +
|
||||
";";
|
||||
|
||||
// Comment out property declarations that are not enabled
|
||||
if (!this.enabled) {
|
||||
|
@ -52,6 +52,20 @@ add_task(function*() {
|
||||
copyRule: false
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: "Test Copy Property Value with Priority",
|
||||
node: ruleEditor.rule.textProps[3].editor.valueSpan,
|
||||
menuItem: contextmenu.menuitemCopyPropertyValue,
|
||||
expectedPattern: "#00F !important",
|
||||
hidden: {
|
||||
copyLocation: true,
|
||||
copyPropertyDeclaration: false,
|
||||
copyPropertyName: true,
|
||||
copyPropertyValue: false,
|
||||
copySelector: true,
|
||||
copyRule: false
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: "Test Copy Property Declaration",
|
||||
node: ruleEditor.rule.textProps[2].editor.nameSpan,
|
||||
@ -66,6 +80,20 @@ add_task(function*() {
|
||||
copyRule: false
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: "Test Copy Property Declaration with Priority",
|
||||
node: ruleEditor.rule.textProps[3].editor.nameSpan,
|
||||
menuItem: contextmenu.menuitemCopyPropertyDeclaration,
|
||||
expectedPattern: "border-color: #00F !important;",
|
||||
hidden: {
|
||||
copyLocation: true,
|
||||
copyPropertyDeclaration: false,
|
||||
copyPropertyName: false,
|
||||
copyPropertyValue: true,
|
||||
copySelector: true,
|
||||
copyRule: false
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: "Test Copy Rule",
|
||||
node: ruleEditor.rule.textProps[2].editor.nameSpan,
|
||||
@ -74,6 +102,7 @@ add_task(function*() {
|
||||
"\tcolor: #F00;[\\r\\n]+" +
|
||||
"\tbackground-color: #00F;[\\r\\n]+" +
|
||||
"\tfont-size: 12px;[\\r\\n]+" +
|
||||
"\tborder-color: #00F !important;[\\r\\n]+" +
|
||||
"}",
|
||||
hidden: {
|
||||
copyLocation: true,
|
||||
@ -124,6 +153,7 @@ add_task(function*() {
|
||||
"\t\/\\* color: #F00; \\*\/[\\r\\n]+" +
|
||||
"\tbackground-color: #00F;[\\r\\n]+" +
|
||||
"\tfont-size: 12px;[\\r\\n]+" +
|
||||
"\tborder-color: #00F !important;[\\r\\n]+" +
|
||||
"}",
|
||||
hidden: {
|
||||
copyLocation: true,
|
||||
|
@ -6,4 +6,5 @@ html, body, #testid {
|
||||
color: #F00;
|
||||
background-color: #00F;
|
||||
font-size: 12px;
|
||||
border-color: #00F !important;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user