OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> |
| 3 <title>HTML Test: display fallback content</title> |
| 4 <link rel="author" title="Intel" href="http://www.intel.com"> |
| 5 <script src="../../../../../../resources/testharness.js"></script> |
| 6 <script src="../../../../../../resources/testharnessreport.js"></script> |
| 7 <script> |
| 8 |
| 9 var t1 = async_test("the typemustmatch attribute is specified"); |
| 10 var t2 = async_test("the typemustmatch attribute is not specified"); |
| 11 |
| 12 </script> |
| 13 <body onload="t1.done(); t2.done()"> |
| 14 <object id="obj"></object> |
| 15 <div id="log"></div> |
| 16 <script> |
| 17 |
| 18 t1.step(function() { |
| 19 var obj1 = document.createElement("object"); |
| 20 obj1.setAttribute("data", "/images/blue.png"); |
| 21 obj1.setAttribute("type", "text/plain"); |
| 22 obj1.setAttribute("typemustmatch", ""); |
| 23 obj1.onload = t1.step_func(function () { |
| 24 assert_true("typeMustMatch" in obj1, "typeMustMatch is not supported."); |
| 25 assert_unreached("The image of the first object should not be loaded."); |
| 26 }); |
| 27 document.getElementById("obj").appendChild(obj1); |
| 28 }); |
| 29 |
| 30 t2.step(function () { |
| 31 var obj2 = document.createElement("object"); |
| 32 obj2.setAttribute("data", "test2.html"); |
| 33 obj2.setAttribute("type", "text/plain"); |
| 34 obj2.onload = t2.step_func( function () { |
| 35 assert_not_equals(obj2.contentDocument, null, "The test2.html should be load
ed."); |
| 36 }); |
| 37 document.getElementById("obj").appendChild(obj2); |
| 38 }); |
| 39 |
| 40 </script> |
| 41 </body> |
OLD | NEW |