| 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: 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 { |
| } |
| } |
| |
| |
| Dumping matched rules: |
| *#test* { regular |
| content: 'EDITED'; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testSetStyleTwice |
| ==== Style sheet text ==== |
| #test { |
| color: green; |
| padding: 0 4px; |
| cursor: pointer |
| } |
| |
| #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 { |
| } |
| } |
| |
| |
| Dumping matched rules: |
| *#test* { regular |
| color: green; |
| padding: 0 4px; |
| cursor: pointer; |
| padding-top: 0px; |
| padding-right: 4px; |
| padding-bottom: 0px; |
| padding-left: 4px; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| ==== Style sheet text ==== |
| #test { |
| color: green; |
| padding: 0 6px; |
| cursor: pointer |
| } |
| |
| #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 { |
| } |
| } |
| |
| |
| Dumping matched rules: |
| *#test* { regular |
| color: green; |
| padding: 0 6px; |
| cursor: pointer; |
| padding-top: 0px; |
| padding-right: 6px; |
| padding-bottom: 0px; |
| padding-left: 6px; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| ==== Style sheet text ==== |
| #test { |
| color: green; |
| padding: 0 8px; |
| cursor: pointer |
| } |
| |
| #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 { |
| } |
| } |
| |
| |
| Dumping matched rules: |
| *#test* { regular |
| color: green; |
| padding: 0 8px; |
| cursor: pointer; |
| padding-top: 0px; |
| padding-right: 8px; |
| padding-bottom: 0px; |
| padding-left: 8px; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testSetStylePoorContent |
| Expected protocol error: Failed applying edit #0: SyntaxError Style text is not valid. |
| Dumping matched rules: |
| *#test* { regular |
| box-sizing: border-box; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testSetStyleOpenBrace |
| Expected protocol error: Failed applying edit #0: SyntaxError Style text is not valid. |
| Dumping matched rules: |
| *#test* { regular |
| box-sizing: border-box; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testSetStyleComment |
| Expected protocol error: Failed applying edit #0: SyntaxError Style text is not valid. |
| Dumping matched rules: |
| *#test* { regular |
| box-sizing: border-box; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testSetStyleInMedia |
| ==== 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 { |
| content: 'EDITED'; |
| color: red; |
| /** foo */ |
| } |
| |
| #test { |
| } |
| } |
| |
| |
| Dumping matched rules: |
| *#test* { regular |
| box-sizing: border-box; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| content: 'EDITED'; |
| color: red; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testDeleteStyleBody |
| ==== 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 {} |
| |
| #test { |
| } |
| } |
| |
| |
| Dumping matched rules: |
| *#test* { regular |
| box-sizing: border-box; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testSetStylePoorRange |
| Expected protocol error: Specified range is out of bounds |
| Dumping matched rules: |
| *#test* { regular |
| box-sizing: border-box; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testSetStyleOpenComment |
| Expected protocol error: Failed applying edit #0: SyntaxError Style text is not valid. |
| Dumping matched rules: |
| *#test* { regular |
| box-sizing: border-box; |
| } |
| *#test* { regular |
| line-height: 1; |
| font-family: "Arial"; |
| color: blue; |
| display: flex; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| font-size: 200%; |
| } |
| @media (min-width: 1px) |
| *#test* { regular |
| } |
| Dumping inherited rules: |
| |
| Running test: testSetStyleOfRemovedRule |
| ERROR: Failed applying edit #0: NotFoundError Source range didn't match existing style source range |
| |