blob: 3571681733fd53e03066737768b02bd6d5f8c849 [file] [log] [blame]
This tests the insertRule(rule, index) and deleteRule(index) methods of the CSSMediaRule interface. It has passed if all of the output below begins with the text "PASS".
PASS: No exception raised! New rule inserted successfully.
PASS: Exception raised successfully. Type: IndexSizeError: Failed to execute 'insertRule' on 'CSSGroupingRule': the index 3 must be less than or equal to the length of the rule list.
PASS: Exception raised successfully. Type: IndexSizeError: Failed to execute 'insertRule' on 'CSSGroupingRule': the index 4294967295 must be less than or equal to the length of the rule list.
PASS: Exception raised successfully. Type: SyntaxError: Failed to execute 'insertRule' on 'CSSGroupingRule': the rule 'badbeef }{' is invalid and cannot be parsed.
PASS: Exception raised successfully. Type: HierarchyRequestError: Failed to execute 'insertRule' on 'CSSGroupingRule': '@namespace' rules cannot be inserted inside a group rule.
PASS: Exception raised successfully. Type: HierarchyRequestError: Failed to execute 'insertRule' on 'CSSGroupingRule': '@import' rules cannot be inserted inside a group rule.
PASS: Exception raised successfully. Type: SyntaxError: Failed to execute 'insertRule' on 'CSSGroupingRule': the rule '@charset "ISO-8859-1";' is invalid and cannot be parsed.
PASS: Exception raised successfully. Type: SyntaxError: Failed to execute 'insertRule' on 'CSSGroupingRule': the rule '@media screen { p { color: red; } };' is invalid and cannot be parsed.
PASS: No exception raised! Rule at position 'length - 1' deleted successfully.
PASS: Exception raised successfully. Type: IndexSizeError: Failed to execute 'deleteRule' on 'CSSGroupingRule': the index 1 is greated than the length of the rule list.
PASS: Exception raised successfully. Type: IndexSizeError: Failed to execute 'deleteRule' on 'CSSGroupingRule': the index 4294967295 is greated than the length of the rule list.