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

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

Issue 11369039: Add setBounds method and browsertest for get/set bounds to app window API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased, responded to review feedback Created 8 years, 1 month 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 chrome.app.runtime.onLaunched.addListener(function() {
6 chrome.app.window.create("main.html", function(win){
7 // Make sure we get back a bounds and that it isn't all 0's.
8 var bounds = win.getBounds();
9 if (!bounds ||
10 (bounds.top == 0 && bounds.left == 0 &&
11 bounds.width == 0 && bounds.height == 0)) {
12 console.error("invalid bounds after app.window.create:" +
13 JSON.stringify(bounds));
14 win.close();
15 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
16 } else {
17 chrome.test.sendMessage("background_ok");
18 }
19 });
20 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698