Index: third_party/WebKit/LayoutTests/plugins/keyboard-events.html |
diff --git a/third_party/WebKit/LayoutTests/plugins/keyboard-events.html b/third_party/WebKit/LayoutTests/plugins/keyboard-events.html |
index 51b773d6c9b138541ac8b58a8755737a733b9728..92d2214ee219e45425b30a7a7633056257b00638 100644 |
--- a/third_party/WebKit/LayoutTests/plugins/keyboard-events.html |
+++ b/third_party/WebKit/LayoutTests/plugins/keyboard-events.html |
@@ -1,17 +1,16 @@ |
<html> |
<body> |
-<embed name="plg" type="application/x-webkit-test-netscape" windowedPlugin="false" width=100 height=100></embed> |
+<embed type="application/x-blink-test-plugin" width=100 height=100></embed> |
<p>This test checks if a plugin can receive keyboard events sent from eventSender. This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34936">Bug 34936</a>.</p> |
<script> |
- |
- plg.windowedPlugin = false; |
- plg.eventLoggingEnabled = true; |
- |
+(function () { |
if (!window.testRunner) { |
document.write("This test does not work in manual mode."); |
- } else { |
- testRunner.dumpAsText(); |
- |
+ return; |
+ } |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+ document.querySelector('embed').addEventListener('message', function () { |
// Send a mouse-click event to set the input focus to the test plugin. |
eventSender.mouseMoveTo(0,0); |
eventSender.mouseMoveTo(20,20); |
@@ -22,10 +21,10 @@ |
eventSender.keyDown('a'); |
eventSender.keyDown('b'); |
eventSender.keyDown('c'); |
- } |
- |
- plg.eventLoggingEnabled = false; // stop logging so our output doesn't bleed into the next test |
+ testRunner.notifyDone(); |
+ }); |
+})(); |
</script> |
</body> |
</html> |