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

Side by Side Diff: chrome/test/data/extensions/platform_apps/restore_state/test.js

Issue 23672029: App windows with ids should remember fullscreen state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « chrome/browser/ui/views/apps/native_app_window_views.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var assertState = function(win) { 5 var assertState = function(win) {
6 if (win.id == 'normal') { 6 if (win.id == 'normal') {
7 chrome.test.assertFalse(win.isMinimized()); 7 chrome.test.assertFalse(win.isMinimized());
8 chrome.test.assertFalse(win.isMaximized()); 8 chrome.test.assertFalse(win.isMaximized());
9 chrome.test.assertFalse(win.isFullscreen());
9 } 10 }
10 if (win.id == 'maximized') { 11 if (win.id == 'maximized') {
11 chrome.test.assertFalse(win.isMinimized()); 12 chrome.test.assertFalse(win.isMinimized());
12 chrome.test.assertTrue(win.isMaximized()); 13 chrome.test.assertTrue(win.isMaximized());
14 chrome.test.assertFalse(win.isFullscreen());
15 }
16 if (win.id == 'fullscreen') {
17 chrome.test.assertFalse(win.isMinimized());
18 chrome.test.assertFalse(win.isMaximized());
19 chrome.test.assertTrue(win.isFullscreen());
13 } 20 }
14 } 21 }
15 22
16 var testRestoreState = function(state_type) { 23 var testRestoreState = function(state_type) {
17 chrome.app.window.create( 24 chrome.app.window.create(
18 'empty.html', 25 'empty.html',
19 { id: state_type, state: state_type }, 26 { id: state_type, state: state_type },
20 chrome.test.callbackPass(windowCreated) 27 chrome.test.callbackPass(windowCreated)
21 ); 28 );
22 function windowCreated(win) { 29 function windowCreated(win) {
(...skipping 11 matching lines...) Expand all
34 } 41 }
35 42
36 chrome.app.runtime.onLaunched.addListener(function() { 43 chrome.app.runtime.onLaunched.addListener(function() {
37 chrome.test.runTests([ 44 chrome.test.runTests([
38 function testRestoreNormal() { 45 function testRestoreNormal() {
39 testRestoreState('normal'); 46 testRestoreState('normal');
40 }, 47 },
41 function testRestoreMaximized() { 48 function testRestoreMaximized() {
42 testRestoreState('maximized'); 49 testRestoreState('maximized');
43 }, 50 },
51 function testRestoreFullscreen() {
52 testRestoreState('fullscreen');
53 },
44 // Minimize and fullscreen behavior are platform dependent. 54 // Minimize and fullscreen behavior are platform dependent.
45 ]); 55 ]);
46 }); 56 });
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/apps/native_app_window_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698