12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <title>Test 019</title>
- <script>
- var Hyphenopoly = {
- require: {
- "la": "FORCEHYPHENOPOLY"
- },
- setup: {
- selectors: {
- ".hyphenate": {
- hyphen: "•"
- }
- }
- },
- handleEvent: {
- hyphenopolyEnd: function (e) {
- assert();
- }
- }
- };
- function assert() {
- var tests = 1;
- var i = 1;
- var test = "";
- var ref = "";
- var result = false;
- while (i <= tests) {
- test = document.getElementById("test" + i).innerHTML;
- ref = document.getElementById("ref" + i).innerHTML;
- if (test === ref) {
- document.getElementById("result").innerHTML += "<p style=\"background-color: #d6ffd6\">" + i + " passed</p>";
- result = result || true;
- } else {
- document.getElementById("result").innerHTML += "<p style=\"background-color: #ffd6d6\">" + i + " failed</p>";
- result = result || false;
- }
- i += 1;
- }
- if (parent != window) {
- parent.postMessage(JSON.stringify({
- desc: document.getElementById("desc").innerHTML,
- index: 19,
- result: (result ? "passed" : "failed")
- }), window.location.href);
- }
- }
- </script>
- <script src="../Hyphenopoly_Loader.js"></script>
- <style type="text/css">
- body {
- width:50%;
- margin-left:25%;
- margin-right:25%;
- }
- .test {
- background-color: #D8E2F9;
- }
- .ref {
- background-color: #FEEFC0;
- }
- .hyphenate {
- hyphens: auto;
- -ms-hyphens: auto;
- -moz-hyphens: auto;
- -webkit-hyphens: auto;
- }
- </style>
- </head>
- <body>
- <div id="navigate"><a href="index.html">↞ Index</a> | <a href="test18.html">← Prev</a> | <a href="test20.html">Next →</a></div>
- <h1>Test 019</h1>
- <p id="desc">Check latin (letter "v" is not in classic alphabet)</p>
- <div id="result"></div>
- <hr>
- <p id="test1" class="test hyphenate" lang="la">Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt.</p>
- <p id="ref1" class="ref" lang="la">Qua de causa Helvetii quo•que re•li•quos Gal•los virtute prae•ce•dunt, quod fere co•ti•dia•nis proe•li•is cum Ger•ma•nis con•ten•dunt, cum aut suis fi•ni•bus eos pro•hi•bent aut ipsi in eorum fi•ni•bus bel•lum ge•runt.</p>
- <hr>
- <div><span class="test">Test</span> <span class="ref">Ref</span></div>
- </body>
- </html>
|