blob: 0078cb9cc89ff2d70840d2152d35fdfc16dceb7e [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
*/
import "dart:html";
import "../../../testcommon.dart";
import "../../../../Utils/async_utils.dart";
import "pwd.dart";
main() {
var style = new Element.html('''
<style type="text/css">
.initialQuotes { quotes: initial; }
.noQuotes { quotes: none; }
</style>
''', treeSanitizer: new NullTreeSanitizer());
document.head.append(style);
document.body.setInnerHtml('''
<p id="onlyInBrowser">The texts between the markers should be identical.</p>
<p>========Marker1========</p>
<table>
<tr>
<td id="testContainer" class="noQuotes"><q>a<q class="initialQuotes">b</q>c</q></td>
<td>1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1</td>
</tr>
</table>
<p>========Marker2========</p>
<table>
<tr>
<td id="reference">a'b'c</td>
<td>1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1</td>
</tr>
</table>
<p>========Marker3========</p>
<pre id="console"/>
''', treeSanitizer: new NullTreeSanitizer());
run() {
document.getElementById("onlyInBrowser").setAttribute("style", "display: none;");
var testWidth = getComputedStyle(document.getElementById("testContainer"), null).getPropertyValue("width");
var referenceWidth = getComputedStyle(document.getElementById("reference"), null).getPropertyValue("width");
shouldBe(testWidth, referenceWidth);
asyncEnd();
}
asyncStart();
setTimeout(run, 0);
}