blob: 757dab439225063e4edcf041aa3197dbd0d30d57 [file] [log] [blame]
* Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
* @description CSS Test: :nth-child selector with unary prefix on step
import "dart:html";
import "../../testcommon.dart";
import "../../../Utils/async_utils.dart";
import "pwd.dart";
main() {
var style = new Element.html('''
<style type="text/css">
div div:nth-child(+2n+1)
color: green;
''', treeSanitizer: new NullTreeSanitizer());
<p>The test passes if the odd numbered DIVs are green.</p>
<div id="test">
<div id="testresult" style="color: blue">Running</div>
''', treeSanitizer: new NullTreeSanitizer());
var greenValues = ["green", "#008000", "rgb(0, 128, 0)"];
var elem = document.getElementById("test");
var val = getComputedStyle(elem.children[0], null).getPropertyValue("color");