blob: c6d614d138f2b3f8ae7d9db89a9ece7dac85a214 [file] [log] [blame]
The test verifies functionality of protocol method CSS.setStyleTexts.
==== Initial style sheet text ====
#test {
box-sizing: border-box;
}
#test {
/* resetting some properties */
line-height: 1;
font-family: "Arial";
color: blue;
display: flex; /* flex FTW! */
}
@media (min-width: 1px) {
#test {
font-size: 200%;
}
#test {
}
}
Running test: testMalformedArguments1
Expected protocol error: Invalid parameters (edits.1.styleSheetId: string value expected)
Running test: testMalformedArguments2
Expected protocol error: Invalid parameters (edits.0.range: object expected; edits.0.text: string value expected; edits.2.styleSheetId: string value expected)
Running test: testMalformedArguments3
Expected protocol error: Invalid parameters (edits.0.range.startLine: integer value expected)
Running test: testFirstEditDoesNotApply
Expected protocol error: Failed applying edit #0: SyntaxError Style text is not valid.
Running test: testSecondEditDoesNotApply
Expected protocol error: Failed applying edit #1: SyntaxError Style text is not valid.
Running test: testBasicSetStyle
==== Style sheet text ====
#test {
content: 'EDITED';
}
#test {
/* resetting some properties */
line-height: 1;
font-family: "Arial";
color: blue;
display: flex; /* flex FTW! */
}
@media (min-width: 1px) {
#test {
font-size: 200%;
}
#test {
}
}
Running test: testMultipleStyleTexts1
==== Style sheet text ====
#test {
content: 'EDITED2';
}
#test {
/* resetting some properties */
line-height: 1;
font-family: "Arial";
color: blue;
display: flex; /* flex FTW! */
}
@media (min-width: 1px) {
#test {
content: 'EDITED1';
}
#test {
}
}
Running test: testMultipleStyleTexts2
==== Style sheet text ====
#test {
content: 'EDITED3';
}
#test {
/* resetting some properties */
line-height: 1;
font-family: "Arial";
color: blue;
display: flex; /* flex FTW! */
}
@media (min-width: 1px) {
#test {
content: 'EDITED4';
}
#test {
content: 'EDITED5';
}
}