blob: e323e8d8d25a410191216e9417237249f9bdacad [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 implied 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(+1)
color: green;
''', treeSanitizer: new NullTreeSanitizer());
<p>The test passes if only the first DIV is 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");