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

Side by Side Diff: chrome/test/data/extensions/api_test/fullscreen/mq_display_mode/window.js

Issue 1070423003: Set display mode for extensions::AppWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@display_mode
Patch Set: Added a reference to bug. Created 5 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 function checkWindowRestored() {
5 var standalone = matchMedia( '(display-mode: standalone)' );
6 chrome.test.assertTrue(standalone.matches,
7 "Display mode of the restored window is 'standalone'");
8
9 chrome.test.succeed();
10 }
11
12 function checkWindowFullscreened() {
13 var fullscreen = matchMedia( '(display-mode: fullscreen)' );
14 chrome.test.assertTrue(fullscreen.matches,
15 "Display mode of the fullscreened window is 'fullscreen'");
16
17 window.onresize = checkWindowRestored;
18 chrome.app.window.current().restore();
19 }
20
21 window.onload = function() {
22 function checkDisplayModeMediaFeature() {
23 var standalone = matchMedia( '(display-mode: standalone)' );
24 chrome.test.assertTrue(standalone.matches,
25 "Initially display mode is 'standalone'");
26 window.onresize = checkWindowFullscreened;
27 chrome.app.window.current().fullscreen();
28 };
29 chrome.test.runTests([checkDisplayModeMediaFeature]);
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698