Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 function openIframe() | 4 function openIframe() |
| 5 { | 5 { |
| 6 if (document.createElement && (iframe = document.createElement('iframe '))) { | 6 if (document.createElement && (iframe = document.createElement('iframe '))) { |
| 7 document.body.appendChild(iframe); | 7 document.body.appendChild(iframe); |
| 8 return iframe; | 8 return iframe; |
| 9 } | 9 } |
| 10 } | 10 } |
| 11 | 11 |
| 12 function runTestReplaceWholeText() | 12 function runTestReplaceWholeText() |
| 13 { | 13 { |
| 14 t1 = openIframe(); | 14 t1 = openIframe(); |
| 15 var a = t1.contentWindow.frames; | 15 var a = t1.contentWindow.frames; |
| 16 var b = t1.contentDocument.defaultView.localStorage; | 16 var b = t1.contentDocument.defaultView.localStorage; |
| 17 t1.outerText = ""; | 17 t1.outerText = ""; |
| 18 t1.src = undefined; | 18 t1.src = undefined; |
| 19 first_attr = t1.attributes.item(undefined, undefined, undefined, undef ined); | 19 first_attr = t1.attributes.item(undefined, undefined, undefined, undef ined); |
| 20 first_attr_value_replaced = first_attr.firstChild.replaceWholeText(und efined, undefined, undefined, undefined); | 20 first_attr.firstChild.data = undefined; |
|
chrishtr
2014/11/18 18:43:52
Was this testing something useful? Looks weird.
philipj_slow
2014/11/18 19:02:52
It is weird. This is obviously a fuzzer test case
| |
| 21 first_attr_value_replaced.DOCUMENT_FRAGMENT_NODE = a; | 21 first_attr.firstChild.DOCUMENT_FRAGMENT_NODE = a; |
| 22 try { | 22 try { |
| 23 first_attr.firstChild.DOCUMENT_FRAGMENT_NODE.localStorage.fuzz3_vi sited="test"; | 23 first_attr.firstChild.DOCUMENT_FRAGMENT_NODE.localStorage.fuzz3_vi sited="test"; |
| 24 } catch (e) { | 24 } catch (e) { |
| 25 console.log("Expected exception caught."); | 25 console.log("Expected exception caught."); |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 function runTestOuterText() { | 29 function runTestOuterText() { |
| 30 t1 = openIframe(); | 30 t1 = openIframe(); |
| 31 var a = t1.contentWindow.frames; | 31 var a = t1.contentWindow.frames; |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 51 | 51 |
| 52 </script> | 52 </script> |
| 53 </head> | 53 </head> |
| 54 <body onload="runTests()"> | 54 <body onload="runTests()"> |
| 55 <p>Bug: https://bugs.webkit.org/show_bug.cgi?id=57140 | 55 <p>Bug: https://bugs.webkit.org/show_bug.cgi?id=57140 |
| 56 <p>Description: Crash from null pointer dereference below WebCore::StorageAr eaImpl::setItem() | 56 <p>Description: Crash from null pointer dereference below WebCore::StorageAr eaImpl::setItem() |
| 57 <p>Expect: passed | 57 <p>Expect: passed |
| 58 <p>Result: <span id="result">failed</span> | 58 <p>Result: <span id="result">failed</span> |
| 59 </body> | 59 </body> |
| 60 </html> | 60 </html> |
| OLD | NEW |