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

Unified Diff: chrome/test/data/extensions/platform_apps/windows_api/test.js

Issue 11362003: Make app windows restore position even if bounds are explicitly specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/windows_api/test.js
diff --git a/chrome/test/data/extensions/platform_apps/windows_api/test.js b/chrome/test/data/extensions/platform_apps/windows_api/test.js
index f73eea7da6f86a6e639780ad2ff0c55228e32633..151ba6911bda09474fae85b7373b161d10567fe3 100644
--- a/chrome/test/data/extensions/platform_apps/windows_api/test.js
+++ b/chrome/test/data/extensions/platform_apps/windows_api/test.js
@@ -67,6 +67,29 @@ chrome.app.runtime.onLaunched.addListener(function() {
}));
},
+ function testRestoreBounds() {
+ chrome.app.window.create('test.html',
+ {id: 'test_window', left: 20, height: 20, width: 250, height: 200},
+ callbackPass(function(win) {
+ chrome.test.assertEq(250, win.contentWindow.innerWidth);
+ chrome.test.assertEq(200, win.contentWindow.innerHeight);
+ // TODO(jeremya): use setBounds() here when available instead of DOM
+ // methods.
+ win.contentWindow.moveTo(50, 50);
+ win.contentWindow.resizeTo(500, 250);
+ win.close();
+ chrome.app.window.create('test.html',
+ {id: 'test_window', left: 20, height: 20, width: 250, height: 200},
+ callbackPass(function(win) {
+ // TODO(jeremya): also check that the position has been restored once
+ // getBounds() is available.
+ chrome.test.assertEq(500, win.contentWindow.innerWidth);
+ chrome.test.assertEq(250, win.contentWindow.innerHeight);
+ win.close();
+ }));
+ }));
+ },
+
function testUpdateWindowWidth() {
chrome.app.window.create('test.html',
{width:512, height:384, frame:'none'},
« chrome/common/extensions/api/app_window.idl ('K') | « chrome/common/extensions/api/app_window.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698