mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 16:28:58 +00:00
migrate to htmlRunner
This commit is contained in:
15
src/tests/cssom/css_stylesheet.html
Normal file
15
src/tests/cssom/css_stylesheet.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<script src="../testing.js"></script>
|
||||
<script id=css_stylesheet>
|
||||
let css = new CSSStyleSheet()
|
||||
testing.expectEqual(true, css instanceof CSSStyleSheet);
|
||||
testing.expectEqual(0, css.cssRules.length);
|
||||
testing.expectEqual(null, css.ownerRule);
|
||||
|
||||
let index1 = css.insertRule('body { color: red; }', 0);
|
||||
testing.expectEqual(0, index1);
|
||||
testing.expectEqual(1, css.cssRules.length);
|
||||
|
||||
let replaced = false;
|
||||
css.replace('body{}').then(() => replaced = true);
|
||||
testing.eventually(() => testing.expectEqual(true, replaced));
|
||||
</script>
|
||||
Reference in New Issue
Block a user