blob: f1b4235b17bf67bf98d1ab7981772ce43302b661 [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(n) selector
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(n) { color: green; }
''', treeSanitizer: new NullTreeSanitizer());
<p>The test passes if all 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");