Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: LayoutTests/fullscreen/full-screen-test.js

Issue 469203002: Simplify full-screen-test.js's runWithKeyDown() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: quotes Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fullscreen/full-screen-test.js
diff --git a/LayoutTests/fullscreen/full-screen-test.js b/LayoutTests/fullscreen/full-screen-test.js
index dbba9684aef40e492cea5d58487d71aea99ad867..3a1099ab64c9a3b28f9019dc31e573a3743c5279 100644
--- a/LayoutTests/fullscreen/full-screen-test.js
+++ b/LayoutTests/fullscreen/full-screen-test.js
@@ -13,22 +13,14 @@ if (window.testRunner) {
function runWithKeyDown(fn)
{
- // FIXME: WKTR does not yet support the keyDown() message. Do a mouseDown here
- // instead until keyDown support is added.
- var eventName = !window.testRunner || eventSender.keyDown ? 'keypress' : 'mousedown'
-
function thunk() {
- document.removeEventListener(eventName, thunk, false);
+ document.removeEventListener("keypress", thunk, false);
fn();
}
- document.addEventListener(eventName, thunk, false);
+ document.addEventListener("keypress", thunk, false);
- if (window.testRunner) {
- if (eventSender.keyDown)
- eventSender.keyDown(" ", []);
- else
- eventSender.mouseDown();
- }
+ if (window.eventSender)
+ eventSender.keyDown(" ", []);
}
function logConsole()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698