[web][tests] always use nextChild when you start with root.children[0], remove redundant braces

This commit is contained in:
Shagen Ogandzhanian
2022-02-18 13:33:50 +01:00
parent d9a9b85e8e
commit 6f89804467
11 changed files with 156 additions and 155 deletions

View File

@@ -522,8 +522,9 @@ class CSSUnitApiTests {
})
}
val el = nextChild()
assertEquals("5px", (root.children[0] as HTMLElement).style.left)
assertEquals("8px", (root.children[0] as HTMLElement).style.top)
assertEquals("5px", el.style.left)
assertEquals("8px", el.style.top)
}
}

View File

@@ -57,7 +57,7 @@ class AnimationTests {
Style(AnimationsStyleSheet)
}
val el = root.children[0] as HTMLStyleElement
val el = nextChild() as HTMLStyleElement
val cssRules = (el.sheet as? CSSStyleSheet)?.cssRules
val rules = (0 until (cssRules?.length ?: 0)).map {
cssRules?.item(it)?.cssText?.replace("\n", "") ?: ""

View File

@@ -20,8 +20,8 @@ class CSSBorderTests {
Div({ style { border(3.px, color = Color("green")) } })
}
assertEquals("1px solid red", (nextChild()).style.border)
(nextChild()).let { el ->
assertEquals("1px solid red", nextChild().style.border)
nextChild().let { el ->
assertEquals("green", el.style.getPropertyValue("border-color"))
assertEquals("3px", el.style.getPropertyValue("border-width"))
}
@@ -33,7 +33,7 @@ class CSSBorderTests {
Div({ style { border(3.px, LineStyle.Dotted, Color("green")) } })
}
assertEquals("3px dotted green", (nextChild()).style.border)
assertEquals("3px dotted green", nextChild().style.border)
}
@Test
@@ -45,10 +45,10 @@ class CSSBorderTests {
Div({ style { borderRadius(3.px, 5.px, 4.px, 1.px) } })
}
assertEquals("3px", (nextChild()).style.borderRadius)
assertEquals("3px 5px", (nextChild()).style.borderRadius)
assertEquals("3px 5px 4px", (nextChild()).style.borderRadius)
assertEquals("3px 5px 4px 1px", (nextChild()).style.borderRadius)
assertEquals("3px", nextChild().style.borderRadius)
assertEquals("3px 5px", nextChild().style.borderRadius)
assertEquals("3px 5px 4px", nextChild().style.borderRadius)
assertEquals("3px 5px 4px 1px", nextChild().style.borderRadius)
}
@@ -61,9 +61,9 @@ class CSSBorderTests {
Div({ style { borderWidth(3.px, 5.px, 4.px, 2.px) } })
}
assertEquals("2px", (nextChild()).style.borderWidth)
assertEquals("3px 7px", (nextChild()).style.borderWidth)
assertEquals("3px 5px 4px", (nextChild()).style.borderWidth)
assertEquals("3px 5px 4px 2px", (nextChild()).style.borderWidth)
assertEquals("2px", nextChild().style.borderWidth)
assertEquals("3px 7px", nextChild().style.borderWidth)
assertEquals("3px 5px 4px", nextChild().style.borderWidth)
assertEquals("3px 5px 4px 2px", nextChild().style.borderWidth)
}
}

View File

@@ -27,7 +27,7 @@ class CSSBoxTests {
)
}
assertEquals("100px", (nextChild()).style.width)
assertEquals("100px", nextChild().style.width)
}
@Test
@@ -42,7 +42,7 @@ class CSSBoxTests {
)
}
assertEquals("90px", (nextChild()).style.height)
assertEquals("90px", nextChild().style.height)
}
@Test
@@ -64,8 +64,8 @@ class CSSBoxTests {
)
}
assertEquals("border-box", (nextChild()).style.boxSizing)
assertEquals("content-box", (nextChild()).style.boxSizing)
assertEquals("border-box", nextChild().style.boxSizing)
assertEquals("content-box", nextChild().style.boxSizing)
}
@Test
@@ -108,10 +108,10 @@ class CSSBoxTests {
)
}
assertEquals("thin", (nextChild()).style.outlineWidth)
assertEquals("medium", (nextChild()).style.outlineWidth)
assertEquals("thick", (nextChild()).style.outlineWidth)
assertEquals("8px", (nextChild()).style.outlineWidth)
assertEquals("thin", nextChild().style.outlineWidth)
assertEquals("medium", nextChild().style.outlineWidth)
assertEquals("thick", nextChild().style.outlineWidth)
assertEquals("8px", nextChild().style.outlineWidth)
assertEquals("0.1em", (root.children[4] as HTMLElement).style.outlineWidth)
}
@@ -130,8 +130,8 @@ class CSSBoxTests {
})
}
assertEquals("red", (nextChild()).style.outlineColor)
assertEquals("rgb(50, 161, 206)", (nextChild()).style.outlineColor)
assertEquals("red", nextChild().style.outlineColor)
assertEquals("rgb(50, 161, 206)", nextChild().style.outlineColor)
}
@Test
@@ -147,14 +147,14 @@ class CSSBoxTests {
Div({ style { outlineStyle("inset") } })
}
assertEquals("dotted", (nextChild()).style.outlineStyle)
assertEquals("dashed", (nextChild()).style.outlineStyle)
assertEquals("solid", (nextChild()).style.outlineStyle)
assertEquals("double", (nextChild()).style.outlineStyle)
assertEquals("groove", (root.children[4] as HTMLElement).style.outlineStyle)
assertEquals("ridge", (root.children[5] as HTMLElement).style.outlineStyle)
assertEquals("outset", (root.children[6] as HTMLElement).style.outlineStyle)
assertEquals("inset", (root.children[7] as HTMLElement).style.outlineStyle)
assertEquals("dotted", nextChild().style.outlineStyle)
assertEquals("dashed", nextChild().style.outlineStyle)
assertEquals("solid", nextChild().style.outlineStyle)
assertEquals("double", nextChild().style.outlineStyle)
assertEquals("groove", nextChild().style.outlineStyle)
assertEquals("ridge", nextChild().style.outlineStyle)
assertEquals("outset", nextChild().style.outlineStyle)
assertEquals("inset", nextChild().style.outlineStyle)
}
@Test
@@ -163,7 +163,7 @@ class CSSBoxTests {
Div({ style { outline("dotted") } })
}
assertEquals("dotted", (nextChild()).style.outlineStyle)
assertEquals("dotted", nextChild().style.outlineStyle)
}
@Test
@@ -174,17 +174,17 @@ class CSSBoxTests {
Div({ style { outline("ridge", 3.px) } })
}
(nextChild()).let {
nextChild().let {
assertEquals("rgb(255, 102, 102)", it.style.outlineColor)
assertEquals("dashed", it.style.outlineStyle)
}
(nextChild()).let {
nextChild().let {
assertEquals("inset", it.style.outlineStyle)
assertEquals("thick", it.style.outlineWidth)
}
(nextChild()).let {
nextChild().let {
assertEquals("ridge", it.style.outlineStyle)
assertEquals("3px", it.style.outlineWidth)
}
@@ -199,10 +199,10 @@ class CSSBoxTests {
Div({ style { outline("yellow", "inset", 8.px) } })
}
assertEquals("rgb(0, 20, 100) dashed thick", (nextChild()).style.outline)
assertEquals("rgb(0, 100, 20) double 4px", (nextChild()).style.outline)
assertEquals("red outset thin", (nextChild()).style.outline)
assertEquals("yellow inset 8px", (nextChild()).style.outline)
assertEquals("rgb(0, 20, 100) dashed thick", nextChild().style.outline)
assertEquals("rgb(0, 100, 20) double 4px", nextChild().style.outline)
assertEquals("red outset thin", nextChild().style.outline)
assertEquals("yellow inset 8px", nextChild().style.outline)
}
@Test
@@ -214,10 +214,10 @@ class CSSBoxTests {
Div({ style { minWidth("min-content") } })
}
assertEquals("3.5em", (nextChild()).style.minWidth)
assertEquals("75%", (nextChild()).style.minWidth)
assertEquals("max-content", (nextChild()).style.minWidth)
assertEquals("min-content", (nextChild()).style.minWidth)
assertEquals("3.5em", nextChild().style.minWidth)
assertEquals("75%", nextChild().style.minWidth)
assertEquals("max-content", nextChild().style.minWidth)
assertEquals("min-content", nextChild().style.minWidth)
}
@Test
@@ -229,10 +229,10 @@ class CSSBoxTests {
Div({ style { maxWidth("min-content") } })
}
assertEquals("0.5em", (nextChild()).style.maxWidth)
assertEquals("10%", (nextChild()).style.maxWidth)
assertEquals("max-content", (nextChild()).style.maxWidth)
assertEquals("min-content", (nextChild()).style.maxWidth)
assertEquals("0.5em", nextChild().style.maxWidth)
assertEquals("10%", nextChild().style.maxWidth)
assertEquals("max-content", nextChild().style.maxWidth)
assertEquals("min-content", nextChild().style.maxWidth)
}
@Test
@@ -244,10 +244,10 @@ class CSSBoxTests {
Div({ style { minHeight("min-content") } })
}
assertEquals("5px", (nextChild()).style.minHeight)
assertEquals("25%", (nextChild()).style.minHeight)
assertEquals("max-content", (nextChild()).style.minHeight)
assertEquals("min-content", (nextChild()).style.minHeight)
assertEquals("5px", nextChild().style.minHeight)
assertEquals("25%", nextChild().style.minHeight)
assertEquals("max-content", nextChild().style.minHeight)
assertEquals("min-content", nextChild().style.minHeight)
}
@Test
@@ -259,9 +259,9 @@ class CSSBoxTests {
Div({ style { maxHeight("min-content") } })
}
assertEquals("15px", (nextChild()).style.maxHeight)
assertEquals("35%", (nextChild()).style.maxHeight)
assertEquals("max-content", (nextChild()).style.maxHeight)
assertEquals("min-content", (nextChild()).style.maxHeight)
assertEquals("15px", nextChild().style.maxHeight)
assertEquals("35%", nextChild().style.maxHeight)
assertEquals("max-content", nextChild().style.maxHeight)
assertEquals("min-content", nextChild().style.maxHeight)
}
}

View File

@@ -36,8 +36,8 @@ class CSSFlexTests {
)
}
assertEquals("-4", (nextChild()).style.order)
assertEquals("3", (nextChild()).style.order)
assertEquals("-4", nextChild().style.order)
assertEquals("3", nextChild().style.order)
}
@Test
@@ -73,10 +73,10 @@ class CSSFlexTests {
)
}
assertEquals("3", (nextChild()).style.flexGrow)
assertEquals("2.5", (nextChild()).style.flexGrow)
assertEquals("100", (nextChild()).style.flexGrow)
assertEquals("0.6", (nextChild()).style.flexGrow)
assertEquals("3", nextChild().style.flexGrow)
assertEquals("2.5", nextChild().style.flexGrow)
assertEquals("100", nextChild().style.flexGrow)
assertEquals("0.6", nextChild().style.flexGrow)
}
@Test
@@ -112,10 +112,10 @@ class CSSFlexTests {
)
}
assertEquals("3", (nextChild()).style.flexShrink)
assertEquals("2.5", (nextChild()).style.flexShrink)
assertEquals("100", (nextChild()).style.flexShrink)
assertEquals("0.6", (nextChild()).style.flexShrink)
assertEquals("3", nextChild().style.flexShrink)
assertEquals("2.5", nextChild().style.flexShrink)
assertEquals("100", nextChild().style.flexShrink)
assertEquals("0.6", nextChild().style.flexShrink)
}
@Test
@@ -140,7 +140,7 @@ class CSSFlexTests {
flexWraps.forEach { flexWrap ->
assertEquals(
"${flexDirection.value} ${flexWrap.value}",
(nextChild()).style.flexFlow
nextChild().style.flexFlow
)
}
}
@@ -164,7 +164,7 @@ class CSSFlexTests {
enumValues.forEach { justifyContent ->
assertEquals(
justifyContent.value,
(nextChild()).style.justifyContent
nextChild().style.justifyContent
)
}
}
@@ -233,7 +233,7 @@ class CSSFlexTests {
enumValues.forEach { alignContent ->
assertEquals(
alignContent.value,
(nextChild()).style.alignContent
nextChild().style.alignContent
)
}
}
@@ -256,7 +256,7 @@ class CSSFlexTests {
enumValues.forEach { displayStyle ->
assertEquals(
displayStyle.value,
(nextChild()).style.flexDirection
nextChild().style.flexDirection
)
}
}
@@ -300,8 +300,8 @@ class CSSFlexTests {
})
}
assertEquals("10em", (nextChild()).style.flexBasis)
assertEquals("auto", (nextChild()).style.flexBasis)
assertEquals("10em", nextChild().style.flexBasis)
assertEquals("auto", nextChild().style.flexBasis)
}
@Test
@@ -329,10 +329,10 @@ class CSSFlexTests {
})
}
assertEquals("auto", (nextChild()).style.flexBasis)
assertEquals("initial", (nextChild()).style.flexBasis)
assertEquals("2", (nextChild()).style.flexGrow)
assertEquals("10em", (nextChild()).style.flexBasis)
assertEquals("auto", nextChild().style.flexBasis)
assertEquals("initial", nextChild().style.flexBasis)
assertEquals("2", nextChild().style.flexGrow)
assertEquals("10em", nextChild().style.flexBasis)
}
@Test

View File

@@ -35,9 +35,9 @@ class CSSListStyleTests {
}
assertEquals("none", (nextChild()).style.listStyleImage)
assertEquals("url(\"starsolid.gif\")", (nextChild()).style.listStyleImage)
assertEquals("linear-gradient(to left bottom, red, blue)", (nextChild()).style.listStyleImage)
assertEquals("none", nextChild().style.listStyleImage)
assertEquals("url(\"starsolid.gif\")", nextChild().style.listStyleImage)
assertEquals("linear-gradient(to left bottom, red, blue)", nextChild().style.listStyleImage)
}
@Test
@@ -55,8 +55,8 @@ class CSSListStyleTests {
})
}
assertEquals("inside", (nextChild()).style.listStylePosition)
assertEquals("outside", (nextChild()).style.listStylePosition)
assertEquals("inside", nextChild().style.listStylePosition)
assertEquals("outside", nextChild().style.listStylePosition)
}
@@ -85,10 +85,10 @@ class CSSListStyleTests {
})
}
assertEquals("armenian", (nextChild()).style.listStyleType)
assertEquals("disc", (nextChild()).style.listStyleType)
assertEquals("circle", (nextChild()).style.listStyleType)
assertEquals("square", (nextChild()).style.listStyleType)
assertEquals("armenian", nextChild().style.listStyleType)
assertEquals("disc", nextChild().style.listStyleType)
assertEquals("circle", nextChild().style.listStyleType)
assertEquals("square", nextChild().style.listStyleType)
}
@Test

View File

@@ -22,7 +22,7 @@ class CSSMarginTests {
})
}
assertEquals("5px", (nextChild()).style.marginLeft)
assertEquals("5px", nextChild().style.marginLeft)
}
@Test
@@ -35,7 +35,7 @@ class CSSMarginTests {
})
}
assertEquals("15px", (nextChild()).style.marginTop)
assertEquals("15px", nextChild().style.marginTop)
}
@Test
@@ -48,7 +48,7 @@ class CSSMarginTests {
})
}
assertEquals("12vw", (nextChild()).style.marginRight)
assertEquals("12vw", nextChild().style.marginRight)
}
@Test
@@ -61,7 +61,7 @@ class CSSMarginTests {
})
}
assertEquals("12%", (nextChild()).style.marginBottom)
assertEquals("12%", nextChild().style.marginBottom)
}
@Test

View File

@@ -42,11 +42,11 @@ class CSSOverflowTests {
})
}
assertEquals("visible", (nextChild()).style.overflowX)
assertEquals("hidden", (nextChild()).style.overflowX)
assertEquals("clip", (nextChild()).style.overflowX)
assertEquals("scroll", (nextChild()).style.overflowX)
assertEquals("auto", (nextChild()).style.overflowX)
assertEquals("visible", nextChild().style.overflowX)
assertEquals("hidden", nextChild().style.overflowX)
assertEquals("clip", nextChild().style.overflowX)
assertEquals("scroll", nextChild().style.overflowX)
assertEquals("auto", nextChild().style.overflowX)
}
@Test
@@ -79,11 +79,11 @@ class CSSOverflowTests {
})
}
assertEquals("visible", (nextChild()).style.overflowY)
assertEquals("hidden", (nextChild()).style.overflowY)
assertEquals("clip", (nextChild()).style.overflowY)
assertEquals("scroll", (nextChild()).style.overflowY)
assertEquals("auto", (nextChild()).style.overflowY)
assertEquals("visible", nextChild().style.overflowY)
assertEquals("hidden", nextChild().style.overflowY)
assertEquals("clip", nextChild().style.overflowY)
assertEquals("scroll", nextChild().style.overflowY)
assertEquals("auto", nextChild().style.overflowY)
}
@Test
@@ -96,7 +96,7 @@ class CSSOverflowTests {
})
}
val style = (nextChild()).style
val style = nextChild().style
assertEquals("clip", style.overflowX)
assertEquals("clip", style.overflowY)
}

View File

@@ -30,7 +30,7 @@ class CSSPaddingTests {
})
}
assertEquals("5px", (nextChild()).style.paddingLeft)
assertEquals("5px", nextChild().style.paddingLeft)
}
@Test
@@ -43,7 +43,7 @@ class CSSPaddingTests {
})
}
assertEquals("15px", (nextChild()).style.paddingTop)
assertEquals("15px", nextChild().style.paddingTop)
}
@Test
@@ -56,7 +56,7 @@ class CSSPaddingTests {
})
}
assertEquals("12vw", (nextChild()).style.paddingRight)
assertEquals("12vw", nextChild().style.paddingRight)
}
@Test
@@ -69,7 +69,7 @@ class CSSPaddingTests {
})
}
assertEquals("12%", (nextChild()).style.paddingBottom)
assertEquals("12%", nextChild().style.paddingBottom)
}
@Test

View File

@@ -23,7 +23,7 @@ class CSSTextTests {
})
}
assertEquals("20em", (nextChild()).style.fontSize)
assertEquals("20em", nextChild().style.fontSize)
}
@Test
@@ -41,8 +41,8 @@ class CSSTextTests {
})
}
assertEquals("italic", (nextChild()).style.fontStyle)
assertEquals("oblique", (nextChild()).style.fontStyle)
assertEquals("italic", nextChild().style.fontStyle)
assertEquals("oblique", nextChild().style.fontStyle)
}
@Test
@@ -75,11 +75,11 @@ class CSSTextTests {
})
}
assertEquals("bold", (nextChild()).style.fontWeight)
assertEquals("bolder", (nextChild()).style.fontWeight)
assertEquals("lighter", (nextChild()).style.fontWeight)
assertEquals("100", (nextChild()).style.fontWeight)
assertEquals("800", (nextChild()).style.fontWeight)
assertEquals("bold", nextChild().style.fontWeight)
assertEquals("bolder", nextChild().style.fontWeight)
assertEquals("lighter", nextChild().style.fontWeight)
assertEquals("100", nextChild().style.fontWeight)
assertEquals("800", nextChild().style.fontWeight)
}
@Test
@@ -97,8 +97,8 @@ class CSSTextTests {
})
}
assertEquals("normal", (nextChild()).style.lineHeight)
assertEquals("2em", (nextChild()).style.lineHeight)
assertEquals("normal", nextChild().style.lineHeight)
assertEquals("2em", nextChild().style.lineHeight)
}
@Test
@@ -116,8 +116,8 @@ class CSSTextTests {
})
}
assertEquals("normal", (nextChild()).style.letterSpacing)
assertEquals("2em", (nextChild()).style.letterSpacing)
assertEquals("normal", nextChild().style.letterSpacing)
assertEquals("2em", nextChild().style.letterSpacing)
}
@Test
@@ -135,8 +135,8 @@ class CSSTextTests {
})
}
assertEquals("\"Gill Sans Extrabold\", sans-serif", (nextChild()).style.fontFamily)
assertEquals("sans-serif", (nextChild()).style.fontFamily)
assertEquals("\"Gill Sans Extrabold\", sans-serif", nextChild().style.fontFamily)
assertEquals("sans-serif", nextChild().style.fontFamily)
}
@Test
@@ -149,7 +149,7 @@ class CSSTextTests {
})
}
assertEquals("italic bold 0.8em / 1.2 Arial, sans-serif", (nextChild()).style.font)
assertEquals("italic bold 0.8em / 1.2 Arial, sans-serif", nextChild().style.font)
}
@Test
@@ -187,12 +187,12 @@ class CSSTextTests {
})
}
assertEquals("left", (nextChild()).style.textAlign)
assertEquals("right", (nextChild()).style.textAlign)
assertEquals("center", (nextChild()).style.textAlign)
assertEquals("justify", (nextChild()).style.textAlign)
assertEquals("start", (nextChild()).style.textAlign)
assertEquals("end", (nextChild()).style.textAlign)
assertEquals("left", nextChild().style.textAlign)
assertEquals("right", nextChild().style.textAlign)
assertEquals("center", nextChild().style.textAlign)
assertEquals("justify", nextChild().style.textAlign)
assertEquals("start", nextChild().style.textAlign)
assertEquals("end", nextChild().style.textAlign)
}
@@ -211,8 +211,8 @@ class CSSTextTests {
})
}
assertEquals("red", (nextChild()).style.textDecorationColor)
assertEquals("rgba(0, 200, 20, 0.85)", (nextChild()).style.textDecorationColor)
assertEquals("red", nextChild().style.textDecorationColor)
assertEquals("rgba(0, 200, 20, 0.85)", nextChild().style.textDecorationColor)
}
@Test
@@ -245,11 +245,11 @@ class CSSTextTests {
})
}
assertEquals("solid", (nextChild()).style.textDecorationStyle)
assertEquals("double", (nextChild()).style.textDecorationStyle)
assertEquals("dotted", (nextChild()).style.textDecorationStyle)
assertEquals("dashed", (nextChild()).style.textDecorationStyle)
assertEquals("wavy", (nextChild()).style.textDecorationStyle)
assertEquals("solid", nextChild().style.textDecorationStyle)
assertEquals("double", nextChild().style.textDecorationStyle)
assertEquals("dotted", nextChild().style.textDecorationStyle)
assertEquals("dashed", nextChild().style.textDecorationStyle)
assertEquals("wavy", nextChild().style.textDecorationStyle)
}
@Test
@@ -277,10 +277,10 @@ class CSSTextTests {
})
}
assertEquals("text-decoration-thickness: auto;", (nextChild()).style.cssText)
assertEquals("text-decoration-thickness: from-font;", (nextChild()).style.cssText)
assertEquals("text-decoration-thickness: 10px;", (nextChild()).style.cssText)
assertEquals("text-decoration-thickness: 2%;", (nextChild()).style.cssText)
assertEquals("text-decoration-thickness: auto;", nextChild().style.cssText)
assertEquals("text-decoration-thickness: from-font;", nextChild().style.cssText)
assertEquals("text-decoration-thickness: 10px;", nextChild().style.cssText)
assertEquals("text-decoration-thickness: 2%;", nextChild().style.cssText)
}
@Test
@@ -313,11 +313,11 @@ class CSSTextTests {
})
}
assertEquals("none", (nextChild()).style.textDecorationLine)
assertEquals("underline", (nextChild()).style.textDecorationLine)
assertEquals("overline", (nextChild()).style.textDecorationLine)
assertEquals("line-through", (nextChild()).style.textDecorationLine)
assertEquals("blink", (nextChild()).style.textDecorationLine)
assertEquals("none", nextChild().style.textDecorationLine)
assertEquals("underline", nextChild().style.textDecorationLine)
assertEquals("overline", nextChild().style.textDecorationLine)
assertEquals("line-through", nextChild().style.textDecorationLine)
assertEquals("blink", nextChild().style.textDecorationLine)
}
@Test
@@ -345,10 +345,10 @@ class CSSTextTests {
})
}
assertEquals("underline red", (nextChild()).style.textDecoration)
assertEquals("overline wavy lime", (nextChild()).style.textDecoration)
assertEquals("line-through", (nextChild()).style.textDecoration)
assertEquals("underline overline dashed", (nextChild()).style.textDecoration)
assertEquals("underline red", nextChild().style.textDecoration)
assertEquals("overline wavy lime", nextChild().style.textDecoration)
assertEquals("line-through", nextChild().style.textDecoration)
assertEquals("underline overline dashed", nextChild().style.textDecoration)
}
@Test
@@ -386,12 +386,12 @@ class CSSTextTests {
})
}
assertEquals("normal", (nextChild()).style.whiteSpace)
assertEquals("nowrap", (nextChild()).style.whiteSpace)
assertEquals("pre", (nextChild()).style.whiteSpace)
assertEquals("pre-wrap", (nextChild()).style.whiteSpace)
assertEquals("pre-line", (nextChild()).style.whiteSpace)
assertEquals("break-spaces", (nextChild()).style.whiteSpace)
assertEquals("normal", nextChild().style.whiteSpace)
assertEquals("nowrap", nextChild().style.whiteSpace)
assertEquals("pre", nextChild().style.whiteSpace)
assertEquals("pre-wrap", nextChild().style.whiteSpace)
assertEquals("pre-line", nextChild().style.whiteSpace)
assertEquals("break-spaces", nextChild().style.whiteSpace)
}
}

View File

@@ -37,9 +37,9 @@ class CSSUiTests {
})
}
assertEquals("pointer", (nextChild()).style.cursor)
assertEquals("auto", (nextChild()).style.cursor)
assertEquals("url(\"hand.cur\"), pointer", (nextChild()).style.cursor)
assertEquals("url(\"cursor2.png\") 2 2, pointer", (nextChild()).style.cursor)
assertEquals("pointer", nextChild().style.cursor)
assertEquals("auto", nextChild().style.cursor)
assertEquals("url(\"hand.cur\"), pointer", nextChild().style.cursor)
assertEquals("url(\"cursor2.png\") 2 2, pointer", nextChild().style.cursor)
}
}