[Webkit-unassigned] [Bug 36683] For compatibility, execCommand should support deprecated 'useCSS' alias for 'styleWithCSS'

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 13 15:19:52 PDT 2011


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





--- Comment #36 from Kiyoto Tamura <owenestea at gmail.com>  2011-09-13 15:19:52 PST ---
(In reply to comment #35)
> Other cases to test would be the empty string and the string " false " (which apparently means true).

We can certainly test that.

> 
> > LayoutTests/editing/execCommand/use-css.html:47
> > +if (document.queryCommandState('useCSS') === false)
> > +    testPassed("queryCommandState('useCSS') returns false");
> > +else
> > +    testFailed("queryCommandState('useCSS') should return boolean false");
> 
> I think the shouldBe macro does a better job of this; I’m not sure that === false will fail for every value other than false.

Do you know which shouldBe macro it is? I was looking at LayoutTest/fast/js/resources/js-test-pre.js and the shouldBe function seemed to require that both arguments be strings. Here, we are trying to test that it is the boolean true/false as opposed to strings. The (===) is to avoid JS's notorious type coercions.

-- 
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