| Index: ppapi/tests/test_case.html
|
| diff --git a/ppapi/tests/test_case.html b/ppapi/tests/test_case.html
|
| index 21adfe4a4de9aefd2e2f75c41a797b5ead018760..4fb6850529b350906a8b9b3b53322e97c21f6738 100644
|
| --- a/ppapi/tests/test_case.html
|
| +++ b/ppapi/tests/test_case.html
|
| @@ -160,8 +160,31 @@ onload = function() {
|
| var container = document.getElementById("container");
|
| container.appendChild(obj);
|
| container.addEventListener("message", handleTestingMessage, true);
|
| +
|
| + // Register a bad dispatchEvent to make sure it isn't used. See 'EVIL' note
|
| + // below.
|
| + obj.dispatchEvent = function() {
|
| + LogHTML("<p>Bad dispatchEvent called!");
|
| + }
|
| }
|
| }
|
| +
|
| +// EVIL Note:
|
| +// This part of the script does some nefarious things to make sure that it
|
| +// doesn't affect the behavior of PostMessage (on which all the tests rely). In
|
| +// particular, we replace document.createEvent, MessageEvent.initMessageEvent,
|
| +// and the MessageEvent constructor. Previous versions of the PostMessage
|
| +// implementation made use of these and would fail (http://crbug.com/82604).
|
| +document.createEvent = function() {
|
| + LogHTML("<p>Bad document.createEvent called!");
|
| +}
|
| +function MessageEvent() {
|
| + LogHTML("<p>Bad MessageEvent constructor called!");
|
| +}
|
| +MessageEvent.prototype.initMessageEvent = function() {
|
| + LogHTML("<p>Bad MessageEvent.initMessageEvent called!");
|
| +}
|
| +
|
| </script>
|
| </head><body>
|
| <div>
|
|
|