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

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: 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..699520dc546b44940308ad045e60b596d4b67931 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(" ", []);
falken 2014/08/15 13:21:35 let's make this ' ' or the others " " for consiste
philipj_slow 2014/08/15 13:40:17 This file seems to use double quotes slightly more
}
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