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

Unified Diff: chrome/test/data/extensions/platform_apps/restore_state/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, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/platform_apps/restore_state/test.js
diff --git a/chrome/test/data/extensions/platform_apps/restore_state/test.js b/chrome/test/data/extensions/platform_apps/restore_state/test.js
index d7497bed7f5eb348d4a6b193b20908c4e0b66158..9af41092ee8639eff58d035046516602ce8f8131 100644
--- a/chrome/test/data/extensions/platform_apps/restore_state/test.js
+++ b/chrome/test/data/extensions/platform_apps/restore_state/test.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+callbackPass = chrome.test.callbackPass;
+
var assertState = function(win) {
if (win.id == 'normal') {
chrome.test.assertFalse(win.isMinimized());
@@ -17,20 +19,24 @@ var testRestoreState = function(state_type) {
chrome.app.window.create(
'empty.html',
{ id: state_type, state: state_type },
- chrome.test.callbackPass(windowCreated)
+ callbackPass(function(win) {
+ win.onWindowFirstShown.addListener(callbackPass(function() {
+ assertState(win);
+ win.onClosed.addListener(callbackPass(function() {
+ chrome.app.window.create(
+ 'empty.html',
+ { id: state_type },
+ callbackPass(function(win2) {
+ win2.onWindowFirstShown.addListener(callbackPass(function() {
+ assertState(win2);
+ }));
+ })
+ );
+ }));
+ win.close();
+ }));
+ })
);
- function windowCreated(win) {
- assertState(win);
- win.onClosed.addListener(chrome.test.callbackPass(windowClosed));
- win.close();
- function windowClosed() {
- chrome.app.window.create(
- 'empty.html',
- { id: state_type },
- function(win2) { assertState(win2); }
- );
- }
- };
}
chrome.app.runtime.onLaunched.addListener(function() {

Powered by Google App Engine
This is Rietveld 408576698