summaryrefslogtreecommitdiffstats
path: root/layout/reftests/bidi/unicode-bidi-isolate-basic.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/bidi/unicode-bidi-isolate-basic.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/bidi/unicode-bidi-isolate-basic.js')
-rw-r--r--layout/reftests/bidi/unicode-bidi-isolate-basic.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/layout/reftests/bidi/unicode-bidi-isolate-basic.js b/layout/reftests/bidi/unicode-bidi-isolate-basic.js
new file mode 100644
index 000000000..e949e6a44
--- /dev/null
+++ b/layout/reftests/bidi/unicode-bidi-isolate-basic.js
@@ -0,0 +1,44 @@
+function buildTable()
+{
+ var seed = 0;
+
+ var neutrals = ['"', ")", "("];
+ var strongRTLs = ['א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ז'];
+ var strongLTRs = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
+ var neutral = function() { return neutrals[seed++ % neutrals.length]; }
+ var strongRTL = function() { return strongRTLs[seed++ % strongRTLs.length]; }
+ var strongLTR = function() { return strongLTRs[seed++ % strongLTRs.length]; }
+ var charClassExamples = [neutral, strongRTL, strongLTR];
+ var possibleDirs = ['ltr', 'rtl'];
+
+ var elem=document.getElementById("elem");
+ for (outerDirIndex in possibleDirs) {
+ var outerDir = possibleDirs[outerDirIndex];
+ for (beforeSpanIndex in charClassExamples) {
+ var beforeSpan = charClassExamples[beforeSpanIndex];
+ for (spanDirIndex in possibleDirs) {
+ var spanDir = possibleDirs[spanDirIndex];
+ for (inSpanIndex in charClassExamples) {
+ var inSpan = charClassExamples[inSpanIndex];
+ for (afterSpanIndex in charClassExamples) {
+ var afterSpan = charClassExamples[afterSpanIndex];
+ function caseWithStyle() {
+ seed = 0;
+ var outerDiv = document.createElement("div");
+ outerDiv.dir = outerDir;
+ outerDiv.appendChild(document.createTextNode(beforeSpan()));
+ var span = document.createElement("span");
+ span.dir = spanDir;
+ span.setAttribute("class", "enclosed")
+ span.appendChild(document.createTextNode(inSpan()));
+ outerDiv.appendChild(span);
+ outerDiv.appendChild(document.createTextNode(afterSpan()));
+ return outerDiv;
+ }
+ elem.appendChild(caseWithStyle());
+ }
+ }
+ }
+ }
+ }
+}