corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [27/51] [abbrv] [partial] incubator-corinthia git commit: added js test files
Date Fri, 14 Aug 2015 16:10:34 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style23-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style23-nop-expected.html
b/experiments/editorFramework/test/Layer0/formatting/style23-nop-expected.html
new file mode 100644
index 0000000..0a56f25
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style23-nop-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <h1>Paragraph two</h1>
+    <p>Paragraph three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style23-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style23-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style23-nop-input.html
new file mode 100644
index 0000000..561307b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style23-nop-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track
of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+Paragraph t[]wo
+<p>Paragraph three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style23-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style23-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style23-p-expected.html
new file mode 100644
index 0000000..0a56f25
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style23-p-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <h1>Paragraph two</h1>
+    <p>Paragraph three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style23-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style23-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style23-p-input.html
new file mode 100644
index 0000000..7242cbb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style23-p-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track
of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph t[]wo</p>
+<p>Paragraph three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style24-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style24-expected.html b/experiments/editorFramework/test/Layer0/formatting/style24-expected.html
new file mode 100644
index 0000000..7de4a92
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style24-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <h1>
+      One two
+      <i>three</i>
+      four five
+    </h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style24-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style24-input.html b/experiments/editorFramework/test/Layer0/formatting/style24-input.html
new file mode 100644
index 0000000..885f283
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style24-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges("H1",{});
+}
+</script>
+</head>
+<body>
+
+  <p>One [two <i>three</i> four] five</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/generic.css
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/generic.css b/experiments/editorFramework/test/Layer0/generic.css
new file mode 100644
index 0000000..5b93e8e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/generic.css
@@ -0,0 +1,62 @@
+body {
+    counter-reset: h1 h2 h3 h4 h5 h6 figure table;
+}
+
+table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+}
+td > :first-child, th > :first-child {
+    margin-top: 0;
+}
+td > :last-child, th > :last-child {
+    margin-bottom: 0;
+}
+td, th {
+    border: 1px solid black;
+}
+
+figure {
+    margin-left: auto;
+    margin-right: auto;
+    text-align: center;
+}
+
+.toc1 {
+    margin-bottom: 6pt;
+    margin-left: 0pt;
+    margin-top: 12pt;
+}
+.toc2 {
+    margin-bottom: 6pt;
+    margin-left: 24pt;
+    margin-top: 6pt;
+}
+.toc3 {
+    margin-bottom: 6pt;
+    margin-left: 48pt;
+    margin-top: 6pt;
+}
+
+caption {
+  caption-side: bottom;
+  counter-increment: table;
+}
+
+caption::before {
+  content: "Table " counter(table) ": ";
+}
+
+figcaption {
+  counter-increment: figure;
+}
+
+figcaption::before {
+  content: "Figure " counter(figure) ": ";
+}
+
+.uxwrite-autocorrect { background-color: #c0ffc0; }
+.uxwrite-selection { background-color: rgb(201,221,238); }
+.uxwrite-spelling { background-color: rgb(255,128,128); }
+.uxwrite-match { background-color: rgb(255,255,0); }

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/genindex.sh
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/genindex.sh b/experiments/editorFramework/test/Layer0/genindex.sh
new file mode 100644
index 0000000..3c99da3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/genindex.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+(
+prevdir=""
+echo "// This file was generated by genindex.sh"
+echo "var tests = [";
+for dir in *; do
+    if [ -d $dir ]; then
+        if [ ! -z "$prevdir" ]; then
+            echo ","
+        fi
+        echo "  { dir: \"$dir\","
+        echo -n "    files: ["
+        prevfile=""
+        for file in $(cd $dir && echo *-input.html); do
+            if [ ! -z "$prevfile" ]; then
+                echo ","
+                echo -n "            "
+            fi
+            shortname=`echo $file | sed -e 's/-input.html//'`
+            echo -n "\"$shortname\""
+            prevfile="$file"
+        done
+        echo -n "] }"
+        prevdir="$dir"
+    fi
+done
+echo
+echo "];"
+) > index.js

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/htmltotext.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/htmltotext.html b/experiments/editorFramework/test/Layer0/htmltotext.html
new file mode 100644
index 0000000..01fbb41
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/htmltotext.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> <head>
+<title></title>
+
+<script src="../tests/nulleditor.js"></script>
+<script src="../Clipboard_js"></script>
+<script src="../Cursor_js"></script>
+<script src="../DOM_js"></script>
+<script src="../Formatting_js"></script>
+<script src="../Hierarchy_js"></script>
+<script src="../init.js"></script>
+<script src="../Lists_js"></script>
+<script src="../NodeSet.js"></script>
+<script src="../Outline_js"></script>
+<script src="../Position.js"></script>
+<script src="../PostponedActions_js"></script>
+<script src="../Range.js"></script>
+<script src="../StringBuilder.js"></script>
+<script src="../traversal.js"></script>
+<script src="../types.js"></script>
+<script src="../UndoManager_js"></script>
+<script src="../util.js"></script>
+<script src="../Viewport_js"></script>
+<script src="../Selection_js"></script>
+<script src="../tests/testlib.js"></script>
+<script>
+function debug(str)
+{
+    console.log(str);
+}
+
+function loaded()
+{
+    DOM_assignNodeIds(document);
+    var text = Clipboard_htmlToText(document.body);
+    DOM_deleteAllChildren(document.body);
+    var pre = DOM_createElement(document,"PRE");
+    DOM_setStyleProperties(pre,{"white-space": "pre-wrap"});
+    DOM_appendChild(pre,DOM_createTextNode(document,text));
+    DOM_appendChild(document.body,pre);
+}
+</script>
+
+</head>
+
+<body onload="loaded()">
+
+<blockquote>
+<p>Here is some text in a blockquote. Here is some text in a blockquote.Here is some
text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here
is some text in a blockquote.</p>
+
+<p>Here is some text in a blockquote. Here is some text in a blockquote.Here is some
text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here
is some text in a blockquote.</p>
+
+<p>Here is some text in a blockquote. Here is some text in a blockquote.Here is some
text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here
is some text in a blockquote.</p>
+
+<blockquote>
+This is a nested blockquote. This is a nested blockquote. This is a nested blockquote. This
is a nested blockquote. This is a nested blockquote. This is a nested blockquote. This is
a nested blockquote. This is a nested blockquote. 
+</blockquote>
+
+<ul>
+    <li>One</li>
+    <li>Two</li>
+    <li>Three</li>
+</ul>
+
+</blockquote>
+
+<p>First paragraph</p>
+<p>Third paragraph</p>
+<h1>Heading 1</h1>
+<h2>Heading 2</h2>
+<h3>Heading 3</h3>
+<h4>Heading 4</h4>
+<h5>Heading 5</h5>
+<h6>Heading 6</h6>
+<div><div><div>Content inside nested div</div></div></div>
+<p>One <b>Two</b> <i>Three</i></p>
+<ul><li>Item one</li><li>Item two</li><li>Item three</li><li>Item
four<ul><li>AAAAA</li><li>BBBBB</li><li>CCCCC</li></ul></li><li><p>Item
five para 1</p><p>Item five para 2</p><p>Item five para 3</p></li>
+</ul>
+<p>Fourth paragraph</p>
+<p>Fifth paragraph</p>
+
+
+Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that
is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph.
Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that
is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph.
Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that
is not in a paragraph. Some text that is not in a paragraph.
+
+<i>italic</i> <b>bold</b> <em>emphasis</em> <strong>strong</strong>
+
+<p><u>one</u><u>two</u><u>three</u></p>
+
+<p><u>one </u> <u> two </u> <u> three</u></p>
+
+Here is a link to the <a href="http://daringfireball.net/projects/markdown/syntax">Markdown
syntax</a> (a good reference)
+
+<p>First paragraph</p>
+
+<p>Third paragraph</p>
+<p>One <b>Two</b> <i>Three</i></p>
+
+<ol>
+  <li>Item one</li>
+  <li>Item two</li>
+  <li>Item three</li>
+  <li>Item four
+    <ol>
+      <li>AAAAA</li>
+      <li>BBBBB<p>BBBBB</p>BBBBB<p>BBBBB</p>BBBBB<ul><li>one<p>x</p></li><li>two</li></ul></li>
+      <li>CCCCC</li>
+    </ol>
+  </li>
+  <li>Item five</li>
+  <li>Item</li>
+  <li>Item</li>
+  <li>Item</li>
+  <li>Item</li>
+  <li>Item<h1>Heading 1</h1><h2>Heading 2</h2>Rest of item</li>
+  <li>Item</li>
+  <li>Item</li>
+  <li>Item</li>
+</ol>
+
+<p>Fourth paragraph</p>
+
+<p>Fifth paragraph</p>
+
+</body>
+</html>


Mime
View raw message