3 <script src=
"../resources/js-test.js"></script>
7 <embed id=
"touch_plugin" type=
"application/x-webkit-test-webplugin" accepts-touch=
"raw" re-request-touch=
"true"></embed>
8 <p id=
"description"></p>
10 description("This test ensures that we don't imbalance the touch event handler count if a plugin requests touch events more than once. The test passes if there are no touch event listeners after the plugin is removed, and there is no crash. Must be run in DRT.");
12 if (window
.testRunner
) {
13 testRunner
.dumpAsText();
15 // Force the plugin to initialize
16 touch_plugin
.offsetTop
;
18 shouldBe("window.internals.touchEventHandlerCount(document)", "1")
19 touch_plugin
.parentNode
.removeChild(touch_plugin
);
20 shouldBe("window.internals.touchEventHandlerCount(document)", "0")