Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 <script src="../resources/testharness.js"></script> | |
| 3 <script src="../resources/testharnessreport.js"></script> | |
| 4 <body> | |
| 5 <object type="image/test" data="hello" id="object1" onerror="errorHandler()"> | |
| 6 <object type="image/gif" data="resources/apple.gif" id="objectimage" | |
| 7 style="display:none" ></object> | |
|
Bernhard Bauer
2017/04/09 20:32:24
This is formatted pretty badly. Please familiarize
George Joseph
2017/04/13 11:30:48
Done.
| |
| 8 <script> | |
| 9 var gotErrorEvent=false; | |
| 10 var testobject = async_test("crbug.com/445557:error events aren't dispatched" + | |
| 11 " for <object> elements"); | |
| 12 function errorHandler() { | |
| 13 document.getElementById("objectimage").onerror = imageErrorHandler; | |
|
Bernhard Bauer
2017/04/09 20:32:24
I don't think you need to chain these two tests to
George Joseph
2017/04/13 11:30:48
Done.
Second test added.
| |
| 14 document.getElementById("objectimage").style.display="inline"; | |
| 15 testobject.step_timeout(function() { | |
|
Bernhard Bauer
2017/04/09 20:32:24
Using timeouts isn't ideal (sometimes tests can le
George Joseph
2017/04/13 11:30:48
Done.
Please note that though the load event is be
| |
| 16 if(gotErrorEvent != false) | |
| 17 assert_false( gotErrorEvent , " Load Event Fired"); | |
|
Bernhard Bauer
2017/04/09 20:32:24
This could just be assert(!gotErrorEvent), no?
George Joseph
2017/04/13 11:30:48
Done. Code Removed.
| |
| 18 else | |
| 19 testobject.done(); | |
| 20 },3000); | |
| 21 }; | |
| 22 function imageErrorHandler() { | |
| 23 gotErrorEvent=true; | |
| 24 } | |
| 25 </script> | |
| 26 </body> | |
| 27 </html> | |
| OLD | NEW |