Chromium Code Reviews| Index: chrome/test/data/extensions/platform_apps/windows_api_bounds/background.js |
| diff --git a/chrome/test/data/extensions/platform_apps/windows_api_bounds/background.js b/chrome/test/data/extensions/platform_apps/windows_api_bounds/background.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2bac58b9749ce60edda8dd3189e99735592c37c1 |
| --- /dev/null |
| +++ b/chrome/test/data/extensions/platform_apps/windows_api_bounds/background.js |
| @@ -0,0 +1,20 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +chrome.app.runtime.onLaunched.addListener(function() { |
| + chrome.app.window.create("main.html", function(win){ |
| + // Make sure we get back a bounds and that it isn't all 0's. |
| + var bounds = win.getBounds(); |
| + if (!bounds || |
| + (bounds.top == 0 && bounds.left == 0 && |
| + bounds.width == 0 && bounds.height == 0)) { |
| + console.error("invalid bounds after app.window.create:" + |
| + JSON.stringify(bounds)); |
| + win.close(); |
| + window.close(); |
|
jeremya
2012/11/13 06:16:30
Why win.close() AND window.close()?
asargent_no_longer_on_chrome
2012/11/14 05:22:12
This makes the test fail faster. If we just closed
|
| + } else { |
| + chrome.test.sendMessage("background_ok"); |
| + } |
| + }); |
| +}); |