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

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

Issue 14663010: Save and restore State for ShellWindows, including panels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 var assertState = function(win) {
6 if (win.id == 'normal') {
7 chrome.test.assertFalse(win.isMinimized());
8 chrome.test.assertFalse(win.isMaximized());
9 }
10 if (win.id == 'maximized') {
11 chrome.test.assertFalse(win.isMinimized());
12 chrome.test.assertTrue(win.isMaximized());
13 }
14 }
15
16 var testRestoreState = function(state_type) {
17 chrome.app.window.create(
18 'empty.html',
19 { id: state_type, state: state_type },
20 chrome.test.callbackPass(windowCreated)
21 );
22 function windowCreated(win) {
23 assertState(win);
24 win.onClosed.addListener(chrome.test.callbackPass(windowClosed));
25 win.close();
26 function windowClosed() {
27 chrome.app.window.create(
28 'empty.html',
29 { id: state_type },
30 function(win2) { assertState(win2); }
31 );
32 }
33 };
34 }
35
36 chrome.app.runtime.onLaunched.addListener(function() {
37 chrome.test.runTests([
38 function testRestoreNormal() {
39 testRestoreState('normal');
40 },
41 function testRestoreMaximized() {
42 testRestoreState('maximized');
43 },
44 // Minimize and fullscreen behavior are platform dependent.
45 ]);
46 });
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/platform_apps/restore_state/manifest.json ('k') | ui/aura/client/aura_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698