blob: 38524d0cef3956aaab9ed15c59c819cd2f19498f [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 Test that inline stylesheet does not confuse style sharing.
import "dart:html";
import "../../testcommon.dart";
import "../../../Utils/async_utils.dart";
import "pwd.dart";
main() {
var style = new Element.html('''
.testclass { background-color: red; }
''', treeSanitizer: new NullTreeSanitizer());
<div class=testclass>first div</div>
.testclass { background-color: green; }
<div class=testclass>second div</div>
''', treeSanitizer: new NullTreeSanitizer());
shouldBe(getComputedStyle(document.getElementsByClassName("testclass")[1]).backgroundColor,"rgb(0, 128, 0)");