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

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

Issue 405323002: [Win Aero] Correctly set the minimum window size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add outer bounds test. Actually fix this. Created 6 years, 4 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/window_api_interactive/test.js
diff --git a/chrome/test/data/extensions/platform_apps/window_api_interactive/test.js b/chrome/test/data/extensions/platform_apps/window_api_interactive/test.js
index 165c9ab4944a8b545731feb5c7de938b31452f6e..b10bbfc99537a11ec6f20e75728709d9fac5479b 100644
--- a/chrome/test/data/extensions/platform_apps/window_api_interactive/test.js
+++ b/chrome/test/data/extensions/platform_apps/window_api_interactive/test.js
@@ -49,6 +49,37 @@ function testWindowNeverGetsFocus(win) {
});
}
+// Test that the window's content size is the same as our inner bounds.
+// This has to be an interactive test because contentWindow.innerWidth|Height is
+// sometimes 0 in the browser test due to an unidentified race condition.
+function testInnerBounds() {
+ chrome.test.runTests([
+ function create() {
+ chrome.app.window.create('test.html', {
+ //frame: {color: '#ff0000'},
benwells 2014/08/12 03:51:41 Ditto about the three tests.
jackhou1 2014/08/12 06:12:07 Done.
+ innerBounds: {
+ width: 300,
+ height: 301,
+ minWidth: 200,
+ minHeight: 201,
+ maxWidth: 400,
+ maxHeight: 401
+ }
+ }, callbackPass(function (win) {
+ chrome.test.assertEq(300, win.contentWindow.innerWidth);
+ chrome.test.assertEq(301, win.contentWindow.innerHeight);
+
+ chrome.test.assertEq(300, win.innerBounds.width);
+ chrome.test.assertEq(301, win.innerBounds.height);
+ chrome.test.assertEq(200, win.innerBounds.minWidth);
+ chrome.test.assertEq(201, win.innerBounds.minHeight);
+ chrome.test.assertEq(400, win.innerBounds.maxWidth);
+ chrome.test.assertEq(401, win.innerBounds.maxHeight);
+ }));
+ }
+ ]);
+}
+
function testCreate() {
chrome.test.runTests([
function createUnfocusedWindow() {

Powered by Google App Engine
This is Rietveld 408576698