Title: [145429] trunk/LayoutTests
- Revision
- 145429
- Author
- [email protected]
- Date
- 2013-03-11 16:40:36 -0700 (Mon, 11 Mar 2013)
Log Message
De-flake fast/dom/title-directionality.html
https://bugs.webkit.org/show_bug.cgi?id=112075
Reviewed by Adam Barth.
This moves the test logic from an inline script to an onload handler. Otherwise, the whitespace collapsing logic
creates a race between the style recalc timer and the HTML parser which sometimes produces an extra newline at
the end of the text output.
* fast/dom/title-directionality-expected.txt:
* fast/dom/title-directionality.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (145428 => 145429)
--- trunk/LayoutTests/ChangeLog 2013-03-11 23:40:19 UTC (rev 145428)
+++ trunk/LayoutTests/ChangeLog 2013-03-11 23:40:36 UTC (rev 145429)
@@ -1,3 +1,17 @@
+2013-03-11 James Robinson <[email protected]>
+
+ De-flake fast/dom/title-directionality.html
+ https://bugs.webkit.org/show_bug.cgi?id=112075
+
+ Reviewed by Adam Barth.
+
+ This moves the test logic from an inline script to an onload handler. Otherwise, the whitespace collapsing logic
+ creates a race between the style recalc timer and the HTML parser which sometimes produces an extra newline at
+ the end of the text output.
+
+ * fast/dom/title-directionality-expected.txt:
+ * fast/dom/title-directionality.html:
+
2013-03-05 Ojan Vafai <[email protected]>
Intrinsic width keyword values don't work for tables
Modified: trunk/LayoutTests/fast/dom/title-directionality-expected.txt (145428 => 145429)
--- trunk/LayoutTests/fast/dom/title-directionality-expected.txt 2013-03-11 23:40:19 UTC (rev 145428)
+++ trunk/LayoutTests/fast/dom/title-directionality-expected.txt 2013-03-11 23:40:36 UTC (rev 145429)
@@ -3,4 +3,3 @@
<html><title dir=rtl>foo</title></html> should have title direction "rtl". PASS
<html dir=rtl><title>foo</title></html> should have title direction "rtl". PASS
<html dir=rtl><title dir=ltr>foo</title></html> should have title direction "ltr". PASS
-
Modified: trunk/LayoutTests/fast/dom/title-directionality.html (145428 => 145429)
--- trunk/LayoutTests/fast/dom/title-directionality.html 2013-03-11 23:40:19 UTC (rev 145428)
+++ trunk/LayoutTests/fast/dom/title-directionality.html 2013-03-11 23:40:36 UTC (rev 145429)
@@ -3,43 +3,45 @@
<head>
<title>page title</title>
</head>
-<body>
+<body _onload_="runTest()">
<iframe id=iframe></iframe>
<script>
-var iframe = document.getElementById('iframe');
+function runTest() {
+ var iframe = document.getElementById('iframe');
-function assertDirection(label, expectedDirection, html)
-{
- var doc = iframe.contentDocument;
- doc.open();
- doc.write(html);
- doc.close();
+ function assertDirection(label, expectedDirection, html)
+ {
+ var doc = iframe.contentDocument;
+ doc.open();
+ doc.write(html);
+ doc.close();
- var dir = window.testRunner ?
- testRunner.titleTextDirection
- : 'testRunner unavailable';
- var status = html + ' should have title direction "' + expectedDirection + '". ';
- if (dir == expectedDirection) {
- status += 'PASS';
- } else {
- status += 'FAIL (got: "' + dir + '")';
+ var dir = window.testRunner ?
+ testRunner.titleTextDirection
+ : 'testRunner unavailable';
+ var status = html + ' should have title direction "' + expectedDirection + '". ';
+ if (dir == expectedDirection) {
+ status += 'PASS';
+ } else {
+ status += 'FAIL (got: "' + dir + '")';
+ }
+ var div = document.createElement('div');
+ div.innerText = status;
+ document.body.appendChild(div);
}
- var div = document.createElement('div');
- div.innerText = status;
- document.body.appendChild(div);
-}
-if (window.testRunner)
- testRunner.dumpAsText();
+ if (window.testRunner)
+ testRunner.dumpAsText();
-assertDirection('normal doc', 'ltr',
- '<html><title>foo</title></html>');
-assertDirection('title dir=rtl', 'rtl',
- '<html><title dir=rtl>foo</title></html>');
-assertDirection('html dir=rtl', 'rtl',
- '<html dir=rtl><title>foo</title></html>');
-assertDirection('html dir=rtl, title dir=ltr', 'ltr',
- '<html dir=rtl><title dir=ltr>foo</title></html>');
+ assertDirection('normal doc', 'ltr',
+ '<html><title>foo</title></html>');
+ assertDirection('title dir=rtl', 'rtl',
+ '<html><title dir=rtl>foo</title></html>');
+ assertDirection('html dir=rtl', 'rtl',
+ '<html dir=rtl><title>foo</title></html>');
+ assertDirection('html dir=rtl, title dir=ltr', 'ltr',
+ '<html dir=rtl><title dir=ltr>foo</title></html>');
+}
</script>
</body>
</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes