mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
Automatic update from web-platform-testsUpstream some CSSOM tests Tests that were duplicates of those already existing in web-platform-tests were deleted. Other tests were either moved to the CSSOM directory in WPT, or appended to already existing tests. The README was also deleted, as it is no longer accurate. Change-Id: I0acb41c6102a572a1fc2401630732a8ff1c5263d Reviewed-on: https://chromium-review.googlesource.com/945135 Reviewed-by: Robert Ma <[email protected]> Reviewed-by: Darren Shen <[email protected]> Commit-Queue: Chris Nardi <[email protected]> Cr-Commit-Position: refs/heads/master@{#541716} wpt-commits: 8ef3fed7cdd966fbbd831215cedc0ee4b8ea8d6e wpt-pr: 9739 wpt-commits: 8ef3fed7cdd966fbbd831215cedc0ee4b8ea8d6e wpt-pr: 9739
15 lines
621 B
HTML
15 lines
621 B
HTML
<!DOCTYPE html>
|
|
<link rel="help" href="https://drafts.csswg.org/cssom-1/#insert-a-css-rule">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<style>
|
|
p { color: green; }
|
|
</style>
|
|
<p id="test">This text should be green.</p>
|
|
<script>
|
|
test(function() {
|
|
assert_throws("SyntaxError", () => document.styleSheets[0].insertRule("p { color: red; } garbage", 1));
|
|
assert_equals(getComputedStyle(document.getElementById("test")).color, "rgb(0, 128, 0)");
|
|
}, "A syntax error in insertRule should throw and not affect the style of the page");
|
|
</script>
|