summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authormlamouri@chromium.org <mlamouri@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-09 18:49:07 +0000
committermlamouri@chromium.org <mlamouri@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-09 18:49:07 +0000
commit01b19cecfcca4268bc4237d6f31e5a945609720d (patch)
tree860ba3f1cee7fae3d960ad31297f1421af97d602 /chrome/test
parentef1af5c3183fe154fa51ff89f71f0977b72ac3b4 (diff)
downloadchromium_src-01b19cecfcca4268bc4237d6f31e5a945609720d.zip
chromium_src-01b19cecfcca4268bc4237d6f31e5a945609720d.tar.gz
chromium_src-01b19cecfcca4268bc4237d6f31e5a945609720d.tar.bz2
Enable all ESC-Fullscreen tests (Chrome Apps) for all platforms.
There were three issues: 1. a silly bug in the fullscreen change check; 2. there was no guarantee that the window would be actually focused; 3. changing the fullscreen state might come with an animation during which key events will not be received. Note that 2 and 3 are a problem on MacOS only. BUG=None Review URL: https://codereview.chromium.org/116023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/platform_apps/leave_fullscreen/main.js7
-rw-r--r--chrome/test/data/extensions/platform_apps/prevent_leave_fullscreen/main.js5
2 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/platform_apps/leave_fullscreen/main.js b/chrome/test/data/extensions/platform_apps/leave_fullscreen/main.js
index 109bccf..95940b1 100644
--- a/chrome/test/data/extensions/platform_apps/leave_fullscreen/main.js
+++ b/chrome/test/data/extensions/platform_apps/leave_fullscreen/main.js
@@ -14,6 +14,13 @@ chrome.app.runtime.onLaunched.addListener(function() {
});
chrome.test.sendMessage('Launched', function(reply) {
+ win.contentWindow.document.addEventListener('keydown', function(e) {
+ if (e.keyCode != 90) // 'z'
+ return;
+
+ chrome.test.sendMessage('KeyReceived');
+ });
+
switch (reply) {
case 'window':
win.fullscreen();
diff --git a/chrome/test/data/extensions/platform_apps/prevent_leave_fullscreen/main.js b/chrome/test/data/extensions/platform_apps/prevent_leave_fullscreen/main.js
index e206710..2a5bebd 100644
--- a/chrome/test/data/extensions/platform_apps/prevent_leave_fullscreen/main.js
+++ b/chrome/test/data/extensions/platform_apps/prevent_leave_fullscreen/main.js
@@ -15,6 +15,11 @@ chrome.app.runtime.onLaunched.addListener(function() {
chrome.test.sendMessage('Launched', function(reply) {
var doc = win.contentWindow.document;
+ doc.addEventListener('keydown', function(e) {
+ if (e.keyCode != 90) // 'z'
+ return;
+ chrome.test.sendMessage('KeyReceived');
+ });
switch (reply) {
case 'window':