blob: 9e106535f6ba03cfac33863dbce7a70d3b5098bb [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 "../../../Utils/expect.dart";
import "../../testharness.dart";
import "../../resources/check-layout.dart";
const String htmlEL1 = r'''
#container {
width: 1px;
#table {
width: 200px;
table-layout: fixed;
.wide-cell {
width: 100px;
padding: 0;
const String htmlEL2 = r'''
This test verifies table cell width is correctly updated after a table-layout change.
<div id="container">
<table id="table">
<tr><td class="wide-cell" data-expected-width="100"></td><td class="wide-cell" data-expected-width="100"></td></tr>
<div id="test-output"></div>
void main() {
document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
var table = document.getElementById("table");
var row = table.insertRow(table.rows.length);
row.insertCell(row.cells.length).setAttribute("data-expected-width", "100");
row.insertCell(row.cells.length).setAttribute("data-expected-width", "100");
var container = document.getElementById("container");"width", "500px");"table-layout", "auto");"width", "auto");
checkLayout("#table tr td", document.getElementById("test-output"));