blob: a19a9474acb6262f969cc513f421f29287a48a5d [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
import "dart:html";
import "../../testharness.dart";
import "../../../Utils/expect.dart";
const String htmlEL1 = r'''
a {
padding: .3em 1.6em;
const String htmlEL2 = r'''
Both links should render the same and not wrap.
<a style="display: inline-block;" href="#">This shouldn't wrap</a>
<a href="#">This shouldn't wrap</a>
void main() {
document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
var links = document.getElementsByTagName('a');
var expectedWidth = links[1].offsetWidth;
Expect.approxEquals(links[0].offsetWidth, links[1].offsetWidth, 5);