| 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();
|
| + } else {
|
| + chrome.test.sendMessage("background_ok");
|
| + }
|
| + });
|
| +});
|
|
|