blob: 9b724ba361198ff05e446db69a97fbcfa28f4bb3 [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.
* @assertion
* @description Links to the right should not wrap.
import "dart:html";
import "../../testharness.dart";
const String htmlEL1 = r'''
ul > li { float: right; background: skyblue; }
ul > li > a { display: block; margin: 10.5px; text-decoration: none; }
const String htmlEL2 = r'''
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">dolor sit amet</a></li>
<li><a href="#">consectetur adipiscing elit</a></li>
Links to the right should not wrap.
void main() {
document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
var elements = document.getElementsByTagName('li');
num getItemHeight(i) {
return elements[i].getBoundingClientRect().top;
shouldBe(getItemHeight(1), getItemHeight(0), 'getItemHeight(1)');
shouldBe(getItemHeight(2), getItemHeight(0), 'getItemHeight(2)');