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

Side by Side Diff: LayoutTests/css3/unicode-bidi-isolate-basic-expected.html

Issue 1029343003: Turn css3/unicode-bidi-isolate-basic into a reftest. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase master Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/platform/android/css3/unicode-bidi-isolate-basic-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
rune 2015/03/26 09:48:41 Make the reference as small as possible and remove
mstensho (USE GERRIT) 2015/03/26 10:07:17 Might as well change the test itself if I do that,
mstensho (USE GERRIT) 2015/03/26 11:08:24 Done.
3 <head> 3 <head>
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 4 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
5 <style> 5 <style>
6 .resultsDiv { 6 .resultsDiv {
7 position: absolute; 7 position: absolute;
8 top: 0px; 8 top: 0px;
9 left: 0px; 9 left: 0px;
10 -moz-column-width: 13em; 10 -moz-column-width: 13em;
11 -moz-column-gap: 5em; 11 -moz-column-gap: 5em;
12 -webkit-columns:1 1px; /* Make as many (overflowing) columns as necessary, b ut keep them as narrow as possible */ 12 -webkit-columns:1 1px; /* Make as many (overflowing) columns as necessary, b ut keep them as narrow as possible */
(...skipping 18 matching lines...) Expand all
31 31
32 var neutrals = ['"', ")", "("]; 32 var neutrals = ['"', ")", "("];
33 var strongRTLs = ['ש', 'נ', 'ב', 'ג', 'ק', 'כ', 'ע']; 33 var strongRTLs = ['ש', 'נ', 'ב', 'ג', 'ק', 'כ', 'ע'];
34 var strongLTRs = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; 34 var strongLTRs = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
35 var neutral = function() { return neutrals[seed++ % neutrals.length]; } 35 var neutral = function() { return neutrals[seed++ % neutrals.length]; }
36 var strongRTL = function() { return strongRTLs[seed++ % strongRTLs.length]; } 36 var strongRTL = function() { return strongRTLs[seed++ % strongRTLs.length]; }
37 var strongLTR = function() { return strongLTRs[seed++ % strongLTRs.length]; } 37 var strongLTR = function() { return strongLTRs[seed++ % strongLTRs.length]; }
38 var charClassExamples = [neutral, strongRTL, strongLTR]; 38 var charClassExamples = [neutral, strongRTL, strongLTR];
39 var possibleDirs = ['ltr', 'rtl']; 39 var possibleDirs = ['ltr', 'rtl'];
40 40
41 var testStyle = "unicode-bidi: -webkit-isolate";
42 var controlStyle = "display: inline-block"; 41 var controlStyle = "display: inline-block";
43 42
44 for (outerDirIndex in possibleDirs) { 43 for (outerDirIndex in possibleDirs) {
45 var outerDir = possibleDirs[outerDirIndex]; 44 var outerDir = possibleDirs[outerDirIndex];
46 for (beforeSpanIndex in charClassExamples) { 45 for (beforeSpanIndex in charClassExamples) {
47 var beforeSpan = charClassExamples[beforeSpanIndex]; 46 var beforeSpan = charClassExamples[beforeSpanIndex];
48 for (spanDirIndex in possibleDirs) { 47 for (spanDirIndex in possibleDirs) {
49 var spanDir = possibleDirs[spanDirIndex]; 48 var spanDir = possibleDirs[spanDirIndex];
50 for (inSpanIndex in charClassExamples) { 49 for (inSpanIndex in charClassExamples) {
51 var inSpan = charClassExamples[inSpanIndex]; 50 var inSpan = charClassExamples[inSpanIndex];
52 for (afterSpanIndex in charClassExamples) { 51 for (afterSpanIndex in charClassExamples) {
53 var afterSpan = charClassExamples[afterSpanIndex]; 52 var afterSpan = charClassExamples[afterSpanIndex];
54 function caseWithStyle(spanStyle) { 53 function caseWithStyle(spanStyle) {
55 seed = 0; 54 seed = 0;
56 var outerDiv = document.createElement("div"); 55 var outerDiv = document.createElement("div");
57 outerDiv.dir = outerDir; 56 outerDiv.dir = outerDir;
58 outerDiv.appendChild(document.createTextNode(beforeSpan( ))); 57 outerDiv.appendChild(document.createTextNode(beforeSpan( )));
59 var span = document.createElement("span"); 58 var span = document.createElement("span");
60 span.dir = spanDir; 59 span.dir = spanDir;
61 span.setAttribute("style", spanStyle) 60 span.setAttribute("style", spanStyle)
62 span.appendChild(document.createTextNode(inSpan())); 61 span.appendChild(document.createTextNode(inSpan()));
63 outerDiv.appendChild(span); 62 outerDiv.appendChild(span);
64 outerDiv.appendChild(document.createTextNode(afterSpan() )); 63 outerDiv.appendChild(document.createTextNode(afterSpan() ));
65 return outerDiv; 64 return outerDiv;
66 } 65 }
67 expected.appendChild(caseWithStyle(controlStyle)); 66 expected.appendChild(caseWithStyle(controlStyle));
68 actual.appendChild(caseWithStyle(testStyle)); 67 actual.appendChild(caseWithStyle(controlStyle));
69 } 68 }
70 } 69 }
71 } 70 }
72 } 71 }
73 } 72 }
74 73
75 </script> 74 </script>
76 </table> 75 </table>
77 </body> 76 </body>
78 </html> 77 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/platform/android/css3/unicode-bidi-isolate-basic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698