function onInlineStyleRecieved(result)
{
- var styleSheetId = result.inlineStyle.styleId.styleSheetId;
+ var styleSheetId = result.inlineStyle.styleSheetId;
setPropertyText = InspectorTest.setPropertyText.bind(InspectorTest, styleSheetId, false);
verifyProtocolError = InspectorTest.setPropertyText.bind(InspectorTest, styleSheetId, true);
dumpStyleSheet = InspectorTest.dumpStyleSheetText.bind(null, styleSheetId);
function testEditProperty(next)
{
setPropertyText({
- styleIndex: 0,
- propertyIndex: 0,
- overwrite: true,
+ range: { startLine: 0, startColumn: 0, endLine: 0, endColumn: 11 },
text: "content: 'EDITED PROPERTY';"
}, InspectorTest.undoAndNext(next));
},
function testBreakingCommentEditProperty(next)
{
verifyProtocolError({
- styleIndex: 0,
- propertyIndex: 0,
- overwrite: true,
+ range: { startLine: 0, startColumn: 0, endLine: 0, endColumn: 11 },
text: "/*<--OPENED COMMENT"
}, next);
},
function testInsertFirstProperty(next)
{
setPropertyText({
- styleIndex: 0,
- propertyIndex: 0,
- overwrite: false,
+ range: { startLine: 0, startColumn: 0, endLine: 0, endColumn: 0 },
text: "content: 'INSERTED PROPERTY';"
}, InspectorTest.undoAndNext(next));
},
function testInsertMultipleProperties(next)
{
setPropertyText({
- styleIndex: 0,
- propertyIndex: 0,
- overwrite: true,
+ range: { startLine: 0, startColumn: 11, endLine: 0, endColumn: 11 },
text: "content: 'INSERTED #1';content: 'INSERTED #2';"
}, InspectorTest.undoAndNext(next));
},
function testInsertLastProperty(next)
{
setPropertyText({
- styleIndex: 0,
- propertyIndex: 2,
- overwrite: false,
+ range: { startLine: 0, startColumn: 24, endLine: 0, endColumn: 24 },
text: "content: 'INSERTED PROPERTY';"
}, InspectorTest.undoAndNext(next));
},