| OLD | NEW |
| 1 // Copyright (c) 2008 Geoffrey Sneddon | 1 // Copyright (c) 2008 Geoffrey Sneddon |
| 2 // | 2 // |
| 3 // Permission is hereby granted, free of charge, to any person obtaining a copy | 3 // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 // of this software and associated documentation files (the "Software"), to deal | 4 // of this software and associated documentation files (the "Software"), to deal |
| 5 // in the Software without restriction, including without limitation the rights | 5 // in the Software without restriction, including without limitation the rights |
| 6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 7 // copies of the Software, and to permit persons to whom the Software is | 7 // copies of the Software, and to permit persons to whom the Software is |
| 8 // furnished to do so, subject to the following conditions: | 8 // furnished to do so, subject to the following conditions: |
| 9 // | 9 // |
| 10 // The above copyright notice and this permission notice shall be included in | 10 // The above copyright notice and this permission notice shall be included in |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 iframe.contentWindow.document.open() | 47 iframe.contentWindow.document.open() |
| 48 iframe.contentWindow.document.write("Test"); | 48 iframe.contentWindow.document.write("Test"); |
| 49 iframe.contentWindow.document.close(); | 49 iframe.contentWindow.document.close(); |
| 50 var write = iframe.contentWindow.document.lastChild.lastChild.lastChild !== null
; | 50 var write = iframe.contentWindow.document.lastChild.lastChild.lastChild !== null
; |
| 51 var ignoreTitle = iframe.contentWindow.document.getElementsByTagName("title")[0]
!== undefined; | 51 var ignoreTitle = iframe.contentWindow.document.getElementsByTagName("title")[0]
!== undefined; |
| 52 | 52 |
| 53 if (window.forceDataURLs) | 53 if (window.forceDataURLs) |
| 54 write = false; | 54 write = false; |
| 55 | 55 |
| 56 if (!write && window.internals && internals.settings.setUseThreadedHTMLParserFor
DataURLs) | |
| 57 internals.settings.setUseThreadedHTMLParserForDataURLs(true); | |
| 58 | |
| 59 window.onload = function() | 56 window.onload = function() |
| 60 { | 57 { |
| 61 stat.data = "Running"; | 58 stat.data = "Running"; |
| 62 run(); | 59 run(); |
| 63 } | 60 } |
| 64 | 61 |
| 65 function run() | 62 function run() |
| 66 { | 63 { |
| 67 var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("
Microsoft.XMLHTTP"); | 64 var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("
Microsoft.XMLHTTP"); |
| 68 if (file = test_files.shift()) | 65 if (file = test_files.shift()) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 { | 198 { |
| 202 result = Markup.get(result); | 199 result = Markup.get(result); |
| 203 if (result !== expected) | 200 if (result !== expected) |
| 204 { | 201 { |
| 205 fail_list.push(test_number); | 202 fail_list.push(test_number); |
| 206 log += "\n\nTest " + (test_number) + " of " + (test_number + tests.lengt
h) + " in " + file + " failed. Input:\n" + input + "\nGot:\n" + result + "\nExpe
cted:\n" + expected; | 203 log += "\n\nTest " + (test_number) + " of " + (test_number + tests.lengt
h) + " in " + file + " failed. Input:\n" + input + "\nGot:\n" + result + "\nExpe
cted:\n" + expected; |
| 207 } | 204 } |
| 208 test_number++; | 205 test_number++; |
| 209 test(); | 206 test(); |
| 210 } | 207 } |
| OLD | NEW |