Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: LayoutTests/fast/dom/title-directionality.html

Issue 23190034: Remove code related to title directionality, we never used it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/dom/title-directionality-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>page title</title>
5 </head>
6 <body onload="runTest()">
7 <iframe id="iframe"></iframe>
8 <script>
9 function runTest() {
10 var iframe = document.getElementById('iframe');
11
12 function assertDirection(label, expectedDirection, html)
13 {
14 var doc = iframe.contentDocument;
15 doc.open();
16 doc.write(html);
17 doc.close();
18
19 // We can't know the direction of the text in the title until the first
20 // recalc style so trigger one here so that the titleTextDirection is
21 // correct.
22 doc.documentElement.offsetTop;
23
24 var dir = window.testRunner ?
25 testRunner.titleTextDirection
26 : 'testRunner unavailable';
27 var status = html + ' should have title direction "' + expectedDirection + '". ';
28 if (dir == expectedDirection) {
29 status += 'PASS';
30 } else {
31 status += 'FAIL (got: "' + dir + '")';
32 }
33 var div = document.createElement('div');
34 div.textContent = status;
35 document.body.appendChild(div);
36 }
37
38 if (window.testRunner)
39 testRunner.dumpAsText();
40
41 assertDirection('normal doc', 'ltr',
42 '<html><title>foo</title></html>');
43 assertDirection('title dir=rtl', 'rtl',
44 '<html><title dir=rtl>foo</title></html>');
45 assertDirection('html dir=rtl', 'rtl',
46 '<html dir=rtl><title>foo</title></html>');
47 assertDirection('html dir=rtl, title dir=ltr', 'ltr',
48 '<html dir=rtl><title dir=ltr>foo</title></html>');
49 }
50 </script>
51 </body>
52 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/dom/title-directionality-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698