Annotation of kupu/tests/run_tests.html, revision 1.1

1.1     ! dwinter     1: <html>
        !             2: <head>
        !             3: <title>Unit tests for Kupu</title>
        !             4: <!-- The following comment makes IE run this html page as though it
        !             5: were loaded from the internet. Without it it runs it as though the
        !             6: file was on the local machine, and (as of XP SP2) files loaded from
        !             7: the local machine aren't allowed to run scripts.-->
        !             8: <!-- saved from url=(0013)about:internet -->
        !             9: 
        !            10: <!-- crucial dependencies -->
        !            11: <script type="text/javascript" src="../../ecmaunit/ecmaunit.js"> </script>
        !            12: <script type="text/javascript" src="../common/sarissa.js"> </script>
        !            13: 
        !            14: <!-- all tools depend on kupuloggers for debug logging -->
        !            15: <script type="text/javascript" src="../common/kupuloggers.js"> </script>
        !            16: 
        !            17: <!-- code to be tested and corresponding test cases -->
        !            18: <script type="text/javascript" src="../common/kupueditor.js"> </script>
        !            19: <script type="text/javascript" src="test_kupueditor.js"> </script>
        !            20: 
        !            21: <script type="text/javascript" src="../common/kupuhelpers.js"> </script>
        !            22: <script type="text/javascript" src="test_kupuhelpers.js"> </script>
        !            23: 
        !            24: <script type="text/javascript" src="../common/kupunoi18n.js"> </script>
        !            25: 
        !            26: <script type="text/javascript" src="../common/kupucontentfilters.js"> </script>
        !            27: <script type="text/javascript" src="test_xhtml.js"> </script>
        !            28: 
        !            29: <script type="text/javascript" src="../common/kupubasetools.js"> </script>
        !            30: <script type="text/javascript" src="test_kupubasetools.js"> </script>
        !            31: 
        !            32: <script type="text/javascript" src="../plone/kupu_plone_layer/kupuploneeditor.js"> </script>
        !            33: <script type="text/javascript" src="../plone/kupu_plone_layer/kupuploneui.js"> </script>
        !            34: <script type="text/javascript" src="test_plone.js"> </script>
        !            35: 
        !            36: <script type="text/javascript" src="../common/kupubeforeunload.js"> </script>
        !            37: <script type="text/javascript" src="test_beforeunload.js"> </script>
        !            38: 
        !            39: <script type="text/javascript" src="test_kupuinit.js"> </script>
        !            40: 
        !            41: <script type="text/javascript">
        !            42: //<![CDATA[
        !            43: 
        !            44:     function runTests() {
        !            45:         // global set up
        !            46:         // This provides a global sandbox, the only known way to get
        !            47:         // execCommand tests working in Mozilla. Don't touch the body node!
        !            48:         // Even if you re-add it you'll break other tests!
        !            49: 
        !            50:         var iframe = getFromSelector('iframe');
        !            51:         iframe.style.display = 'block';
        !            52:         // IE seems to re-initialize the iframe on designMode change,
        !            53:         // destroying the blank document. But only Mozilla needs that mode.
        !            54:         if (_SARISSA_IS_MOZ) {
        !            55:             iframe.contentWindow.document.designMode = 'on';
        !            56:         };
        !            57: 
        !            58:         var body = getFromSelector('body');
        !            59:         var testsuite = new TestSuite(new HTMLReporter(body, true));
        !            60:         testsuite.registerTest(KupuHelpersTestCase);
        !            61:         testsuite.registerTest(KupuEditorTestCase);
        !            62:         testsuite.registerTest(KupuSelectionTestCase);
        !            63:         testsuite.registerTest(KupuXhtmlTestCase);
        !            64:         testsuite.registerTest(KupuPloneTestCase);
        !            65:         testsuite.registerTest(KupuBeforeUnloadTestCase);
        !            66:         testsuite.registerTest(InitKupuCheckersTestCase);
        !            67:         testsuite.registerTest(KupuUITestCase);
        !            68:         testsuite.registerTest(ImageToolTestCase);
        !            69:         testsuite.runSuite();
        !            70: 
        !            71:         // global tear down
        !            72: 
        !            73:         iframe.contentWindow.document.designMode = 'off';
        !            74:         iframe.style.display = 'none';
        !            75:     };
        !            76: 
        !            77: //]]>
        !            78: </script>
        !            79: </head>
        !            80: 
        !            81: <body onload="runTests()" id="body">
        !            82: <!-- some test data for the loadDictFromXML function -->
        !            83: <div style="visibility: hidden">
        !            84: <xml id="xmlisland">
        !            85:     <dict>
        !            86:         <foo>bar</foo>
        !            87:         <sna>fu</sna>
        !            88:         <some_int>1</some_int>
        !            89:         <nested>
        !            90:             <foo>bar</foo>
        !            91:         </nested>
        !            92:         <list>0</list>
        !            93:         <list>1</list>
        !            94:     </dict>
        !            95: </xml>
        !            96: </div>
        !            97: <select id="kupu-tb-styles" style="display:none">
        !            98: <option value="p">Normal</option>
        !            99: <option value="h2|Heading">Heading</option>
        !           100: <option value="h3|Subheading">Subheading</option>
        !           101: <option value="pre">Formatted</option>
        !           102: <option value="div|Caption">Caption</option>
        !           103: </select>
        !           104: <iframe style="display: none" id="iframe" ></iframe>
        !           105: <div style="display:none" id="testdiv" ></div>
        !           106: </body>
        !           107: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>