[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ap at apple.com ap at apple.com
Thu Apr 8 01:00:32 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit b108e6efca5e009d914e1d0934cf3c933c58b420
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 11 20:35:52 2010 +0000

            Reviewed by Sam Weinig.
    
            https://bugs.webkit.org/show_bug.cgi?id=33482
            Add a test for Russian text search
    
            * fast/text/find-russian-expected.txt: Added.
            * fast/text/find-russian.html: Added.
            * fast/text/script-tests/find-russian.js: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6bf051e..86c34ee 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-11  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        https://bugs.webkit.org/show_bug.cgi?id=33482
+        Add a test for Russian text search
+
+        * fast/text/find-russian-expected.txt: Added.
+        * fast/text/find-russian.html: Added.
+        * fast/text/script-tests/find-russian.js: Added.
+
 2010-01-11  Darin Adler  <darin at apple.com>
 
         Try to get find-kana test passing on Tiger and Leopard.
diff --git a/LayoutTests/fast/text/find-russian-expected.txt b/LayoutTests/fast/text/find-russian-expected.txt
new file mode 100644
index 0000000..426a75c
--- /dev/null
+++ b/LayoutTests/fast/text/find-russian-expected.txt
@@ -0,0 +1,59 @@
+Tests find for strings with Russian letters й and ё in them.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Exact matches first as a baseline
+
+PASS canFind(decomposedCyrillicShortI, decomposedCyrillicShortI) is true
+PASS canFind(decomposedCyrillicSmallShortI, decomposedCyrillicSmallShortI) is true
+PASS canFind(letterCyrillicShortI, letterCyrillicShortI) is true
+PASS canFind(letterCyrillicSmallShortI, letterCyrillicSmallShortI) is true
+PASS canFind("й", "йод") is true
+PASS canFind("ё", "мумиё") is true
+
+Composed and decomposed forms: Must be treated as equal
+
+PASS canFind(decomposedCyrillicYO, decomposedCyrillicYO) is true
+PASS canFind(decomposedCyrillicSmallYO, decomposedCyrillicSmallYO) is true
+PASS canFind(letterCyrillicShortI, decomposedCyrillicShortI) is true
+PASS canFind(letterCyrillicSmallShortI, decomposedCyrillicSmallShortI) is true
+PASS canFind(letterCyrillicYO, decomposedCyrillicYO) is true
+PASS canFind(letterCyrillicSmallYO, decomposedCyrillicSmallYO) is true
+PASS canFind(decomposedCyrillicShortI, letterCyrillicShortI) is true
+PASS canFind(decomposedCyrillicSmallShortI, letterCyrillicSmallShortI) is true
+PASS canFind(decomposedCyrillicYO, letterCyrillicYO) is true
+PASS canFind(decomposedCyrillicSmallYO, letterCyrillicSmallYO) is true
+
+Small and capital letters: Must be treated as equal
+
+PASS canFind(letterCyrillicSmallI, letterCyrillicI) is true
+PASS canFind(letterCyrillicSmallYO, letterCyrillicYO) is true
+PASS canFind(letterCyrillicI, letterCyrillicSmallI) is true
+PASS canFind(letterCyrillicYO, letterCyrillicSmallYO) is true
+PASS canFind(decomposedCyrillicSmallShortI, letterCyrillicI) is true
+PASS canFind(decomposedCyrillicSmallYO, letterCyrillicYO) is true
+PASS canFind(decomposedCyrillicShortI, letterCyrillicSmallI) is true
+PASS canFind(decomposedCyrillicYO, letterCyrillicSmallYO) is true
+PASS canFind(letterCyrillicSmallI + letterCyrillicSmallYO, letterCyrillicSmallI + letterCyrillicYO) is true
+PASS canFind("й", "Йод") is true
+PASS canFind("ё", "МУМИЁ") is true
+PASS canFind("Й", "йод") is true
+PASS canFind("Ё", "мумиё") is true
+
+Е and Ё: Must be treated as equal
+
+PASS canFind("мумие", "мумиё") is true
+PASS canFind("МУМИЕ", "МУМИЁ") is true
+PASS canFind("мумиё", "мумие") is true
+PASS canFind("МУМИЁ", "МУМИЕ") is true
+
+Й and и: Must *not* be treated as equal
+
+PASS canFind("зайка", "заика") is false
+FAIL canFind("заика", "зайка") should be false. Was true.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/text/find-russian.html b/LayoutTests/fast/text/find-russian.html
new file mode 100644
index 0000000..0ef0777
--- /dev/null
+++ b/LayoutTests/fast/text/find-russian.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/find-russian.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/text/script-tests/find-russian.js b/LayoutTests/fast/text/script-tests/find-russian.js
new file mode 100644
index 0000000..2e7af44
--- /dev/null
+++ b/LayoutTests/fast/text/script-tests/find-russian.js
@@ -0,0 +1,93 @@
+description("Tests find for strings with Russian letters й and ё in them.");
+
+function canFind(target, specimen)
+{
+    getSelection().empty();
+    var textNode = document.createTextNode(specimen);
+    document.body.appendChild(textNode);
+    document.execCommand("FindString", false, target);
+    var result = getSelection().rangeCount != 0;
+    getSelection().empty();
+    document.body.removeChild(textNode);
+    return result;
+}
+
+var letterCyrillicI = String.fromCharCode(0x0418);
+var letterCyrillicSmallI = String.fromCharCode(0x0438);
+var letterCyrillicShortI = String.fromCharCode(0x0419);
+var letterCyrillicSmallShortI = String.fromCharCode(0x0439);
+var letterCyrillicE = String.fromCharCode(0x0415);
+var letterCyrillicSmallE = String.fromCharCode(0x0435);
+var letterCyrillicYO = String.fromCharCode(0x0401);
+var letterCyrillicSmallYO = String.fromCharCode(0x0451);
+var combiningDiaeresis = String.fromCharCode(0x0308);
+var combiningBreve = String.fromCharCode(0x0306);
+
+var decomposedCyrillicShortI = letterCyrillicI + combiningBreve;
+var decomposedCyrillicSmallShortI = letterCyrillicSmallI + combiningBreve;
+var decomposedCyrillicYO = letterCyrillicE + combiningDiaeresis;
+var decomposedCyrillicSmallYO = letterCyrillicSmallE + combiningDiaeresis;
+
+debug('Exact matches first as a baseline');
+debug('');
+
+shouldBe('canFind(decomposedCyrillicShortI, decomposedCyrillicShortI)', 'true');
+shouldBe('canFind(decomposedCyrillicSmallShortI, decomposedCyrillicSmallShortI)', 'true');
+shouldBe('canFind(letterCyrillicShortI, letterCyrillicShortI)', 'true');
+shouldBe('canFind(letterCyrillicSmallShortI, letterCyrillicSmallShortI)', 'true');
+shouldBe('canFind("й", "йод")', 'true');
+shouldBe('canFind("ё", "мумиё")', 'true');
+
+
+debug('');
+debug('Composed and decomposed forms: Must be treated as equal');
+debug('');
+
+shouldBe('canFind(decomposedCyrillicYO, decomposedCyrillicYO)', 'true');
+shouldBe('canFind(decomposedCyrillicSmallYO, decomposedCyrillicSmallYO)', 'true');
+shouldBe('canFind(letterCyrillicShortI, decomposedCyrillicShortI)', 'true');
+shouldBe('canFind(letterCyrillicSmallShortI, decomposedCyrillicSmallShortI)', 'true');
+shouldBe('canFind(letterCyrillicYO, decomposedCyrillicYO)', 'true');
+shouldBe('canFind(letterCyrillicSmallYO, decomposedCyrillicSmallYO)', 'true');
+shouldBe('canFind(decomposedCyrillicShortI, letterCyrillicShortI)', 'true');
+shouldBe('canFind(decomposedCyrillicSmallShortI, letterCyrillicSmallShortI)', 'true');
+shouldBe('canFind(decomposedCyrillicYO, letterCyrillicYO)', 'true');
+shouldBe('canFind(decomposedCyrillicSmallYO, letterCyrillicSmallYO)', 'true');
+
+debug('');
+debug('Small and capital letters: Must be treated as equal');
+debug('');
+
+shouldBe('canFind(letterCyrillicSmallI, letterCyrillicI)', 'true');
+shouldBe('canFind(letterCyrillicSmallYO, letterCyrillicYO)', 'true');
+shouldBe('canFind(letterCyrillicI, letterCyrillicSmallI)', 'true');
+shouldBe('canFind(letterCyrillicYO, letterCyrillicSmallYO)', 'true');
+shouldBe('canFind(decomposedCyrillicSmallShortI, letterCyrillicI)', 'true');
+shouldBe('canFind(decomposedCyrillicSmallYO, letterCyrillicYO)', 'true');
+shouldBe('canFind(decomposedCyrillicShortI, letterCyrillicSmallI)', 'true');
+shouldBe('canFind(decomposedCyrillicYO, letterCyrillicSmallYO)', 'true');
+shouldBe('canFind(letterCyrillicSmallI + letterCyrillicSmallYO, letterCyrillicSmallI + letterCyrillicYO)', 'true');
+shouldBe('canFind("й", "Йод")', 'true');
+shouldBe('canFind("ё", "МУМИЁ")', 'true');
+shouldBe('canFind("Й", "йод")', 'true');
+shouldBe('canFind("Ё", "мумиё")', 'true');
+
+debug('');
+debug('Е and Ё: Must be treated as equal');
+debug('');
+
+shouldBe('canFind("мумие", "мумиё")', 'true');
+shouldBe('canFind("МУМИЕ", "МУМИЁ")', 'true');
+shouldBe('canFind("мумиё", "мумие")', 'true');
+shouldBe('canFind("МУМИЁ", "МУМИЕ")', 'true');
+
+debug('');
+debug('Й and и: Must *not* be treated as equal');
+debug('');
+
+shouldBe('canFind("зайка", "заика")', 'false');
+shouldBe('canFind("заика", "зайка")', 'false');
+
+debug('');
+
+var successfullyParsed = true;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list