[Webkit-unassigned] [Bug 56981] CSSStyleSheet#insertRule doesn't work well with imported stylesheets

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 24 17:32:19 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56981





--- Comment #4 from Simon Fraser (smfr) <simon.fraser at apple.com>  2011-05-24 17:32:18 PST ---
(From update of attachment 94035)
View in context: https://bugs.webkit.org/attachment.cgi?id=94035&action=review

The source changes look OK but I think the test could be improved.

> LayoutTests/fast/css/import-and-insert-rule-no-update.html:1
> +<!DOCTYPE HTML>

html is usually lowercase

> LayoutTests/fast/css/import-and-insert-rule-no-update.html:3
> +<meta http-equiv="content-type" content="text/html; charset=UTF-8">

Remove this line.

> LayoutTests/fast/css/import-and-insert-rule-no-update.html:8
> +<div id="testArea"> </div>

Remove space

> LayoutTests/fast/css/import-and-insert-rule-no-update.html:33
> +    document.styleSheets[0].insertRule('@import "green.css";', 1);
> +    // We need to wait some time to let the stylesheet load before testing.
> +    window.setTimeout(test, 100);

This will be prone to flakiness. Is there some other way to test when the stylesheet has loaded? Maybe poll for the computed style of some other element?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list