public void CSSStyleDeclarationBoundInboundDirection() { var element = new HtmlSpanElement(document); var text = "background-color: red; color: black;"; element.Style.CssText = text; Assert.AreEqual(text, element.GetAttribute("style")); Assert.AreEqual(2, element.Style.Length); }
public void CSSStyleDeclarationBoundInboundDirection() { var context = BrowsingContext.New(new Configuration().WithCss()); var document = new HtmlDocument(context); var element = new HtmlSpanElement(document); var text = "background-color: rgb(255, 0, 0); color: rgb(0, 0, 0);"; element.Style.CssText = text; Assert.AreEqual(text, element.GetAttribute("style")); Assert.AreEqual(2, element.Style.Length); }