Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / plugins / plugin-synthetic-event-crash.html
blob8dbd502bfc6bde282789c2f6627401d040afed86
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>This test ensures that a synthetic event dispatched on a plugin doesn't cause a crash.</p>
5 <embed id="plugin" type="application/x-webkit-test-webplugin"></embed>
6 <script>
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.waitUntilDone();
11 var plugin = document.getElementById("plugin");
13 var listenerCalledCount = 0;
14 var eventTypes = ["touchmove", "gesturescrollstart", "mousewheel"];
16 eventTypes.forEach(function(eventType) {
17 plugin.addEventListener(eventType, function(event) {
18 listenerCalledCount++;
19 if (listenerCalledCount == eventTypes.length) {
20 if (window.testRunner) {
21 testRunner.notifyDone();
24 });
25 });
27 var event = document.createEvent("PopStateEvent");
28 event.initEvent("touchmove", true, true);
29 plugin.dispatchEvent(event);
31 event = document.createEvent("PopStateEvent");
32 event.initEvent("gesturescrollstart", true, true);
33 plugin.dispatchEvent(event);
35 event = document.createEvent("PopStateEvent");
36 event.initEvent("mousewheel", true, true);
37 plugin.dispatchEvent(event);
38 </script>
39 </body>
40 </html>