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

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

Issue 306823002: Flip --enable-apps-show-on-first-paint flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests Created 6 years, 6 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This test gets sent commands to execute, which it is sent by the 5 // This test gets sent commands to execute, which it is sent by the
6 // controlling C++ code. This code then checks that the apps' active state 6 // controlling C++ code. This code then checks that the apps' active state
7 // is being tracked correctly. 7 // is being tracked correctly.
8 var windows = []; 8 var windows = [];
9 9
10 function windowClosed() { 10 function windowClosed() {
(...skipping 15 matching lines...) Expand all
26 createOptions = {}; 26 createOptions = {};
27 27
28 if (response == 'createMinimized') 28 if (response == 'createMinimized')
29 createOptions.state = 'minimized'; 29 createOptions.state = 'minimized';
30 30
31 if (response == 'createHidden') 31 if (response == 'createHidden')
32 createOptions.hidden = true; 32 createOptions.hidden = true;
33 33
34 chrome.app.window.create('empty.html', createOptions, 34 chrome.app.window.create('empty.html', createOptions,
35 function(createdWindow) { 35 function(createdWindow) {
36 createdWindow.onClosed.addListener(windowClosed); 36 handleWindowReady = function() {
37 windows.push(createdWindow); 37 createdWindow.onClosed.addListener(windowClosed);
38 processNextCommand(); 38 windows.push(createdWindow);
39 processNextCommand();
40 }
41
42 if (createOptions.hidden)
43 handleWindowReady();
44 else
45 createdWindow.onWindowFirstShown.addListener(handleWindowReady);
39 }); 46 });
40 }); 47 });
41 } 48 }
42 49
43 processNextCommand(); 50 processNextCommand();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698