| OLD | NEW |
| 1 <!doctype html> | |
| 2 <title>Range mutation tests</title> | |
| 3 <link rel="author" title="Aryeh Gregor" href=ayg@aryeh.name> | |
| 4 <meta name=timeout content=long> | |
| 5 | |
| 6 <div id=log></div> | |
| 7 <script src=/resources/testharness.js></script> | |
| 8 <script src=/resources/testharnessreport.js></script> | |
| 9 <script src=../common.js></script> | |
| 10 <script> | |
| 11 "use strict"; | 1 "use strict"; |
| 12 | 2 |
| 13 // These tests probably use too much abstraction and too little copy-paste. | 3 // These tests probably use too much abstraction and too little copy-paste. |
| 14 // Reader beware. | 4 // Reader beware. |
| 15 // | 5 // |
| 16 // TODO: | 6 // TODO: |
| 17 // | 7 // |
| 18 // * Lots and lots and lots more different types of ranges | 8 // * Lots and lots and lots more different types of ranges |
| 19 // * insertBefore() with DocumentFragments | 9 // * insertBefore() with DocumentFragments |
| 20 // * Fill out other insert/remove tests | 10 // * Fill out other insert/remove tests |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 ["paras[0]", "paras[0]", 1, "paras[0]", 1], | 912 ["paras[0]", "paras[0]", 1, "paras[0]", 1], |
| 923 ["paras[0]", "testDiv", 0, "testDiv", 0], | 913 ["paras[0]", "testDiv", 0, "testDiv", 0], |
| 924 ["paras[0]", "testDiv", 0, "testDiv", 1], | 914 ["paras[0]", "testDiv", 0, "testDiv", 1], |
| 925 ["paras[0]", "testDiv", 1, "testDiv", 1], | 915 ["paras[0]", "testDiv", 1, "testDiv", 1], |
| 926 ["paras[0]", "testDiv", 0, "testDiv", 2], | 916 ["paras[0]", "testDiv", 0, "testDiv", 2], |
| 927 ["paras[0]", "testDiv", 1, "testDiv", 2], | 917 ["paras[0]", "testDiv", 1, "testDiv", 2], |
| 928 ["paras[0]", "testDiv", 2, "testDiv", 2], | 918 ["paras[0]", "testDiv", 2, "testDiv", 2], |
| 929 | 919 |
| 930 ["foreignDoc.documentElement", "foreignDoc", 0, "foreignDoc", "foreignDoc.chil
dNodes.length"], | 920 ["foreignDoc.documentElement", "foreignDoc", 0, "foreignDoc", "foreignDoc.chil
dNodes.length"], |
| 931 ]; | 921 ]; |
| 932 | |
| 933 | |
| 934 // Finally run everything. All grouped together at the end so that I can | |
| 935 // easily comment out some of them, so I don't have to wait for all test types | |
| 936 // to debug only some of them. | |
| 937 doTests(splitTextTests, function(params) { return params[0] + ".splitText(" + pa
rams[1] + ")" }, testSplitText); | |
| 938 doTests(insertDataTests, function(params) { return params[0] + ".insertData(" +
params[1] + ", " + params[2] + ")" }, testInsertData); | |
| 939 doTests(appendDataTests, function(params) { return params[0] + ".appendData(" +
params[1] + ")" }, testAppendData); | |
| 940 doTests(deleteDataTests, function(params) { return params[0] + ".deleteData(" +
params[1] + ", " + params[2] + ")" }, testDeleteData); | |
| 941 doTests(replaceDataTests, function(params) { return params[0] + ".replaceData("
+ params[1] + ", " + params[2] + ", " + params[3] + ")" }, testReplaceData); | |
| 942 doTests(dataChangeTests, function(params) { return params[0] + "." + eval(params
[1]) + " " + eval(params[2]) + ' ' + params[3] }, testDataChange); | |
| 943 doTests(insertBeforeTests, function(params) { return params[0] + ".insertBefore(
" + params[1] + ", " + params[2] + ")" }, testInsertBefore); | |
| 944 doTests(replaceChildTests, function(params) { return params[0] + ".replaceChild(
" + params[1] + ", " + params[2] + ")" }, testReplaceChild); | |
| 945 doTests(appendChildTests, function(params) { return params[0] + ".appendChild("
+ params[1] + ")" }, testAppendChild); | |
| 946 doTests(removeChildTests, function(params) { return params[0] + ".parentNode.rem
oveChild(" + params[0] + ")" }, testRemoveChild); | |
| 947 | |
| 948 | |
| 949 testDiv.style.display = "none"; | |
| 950 </script> | |
| OLD | NEW |