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

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: Sync and rebase 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
« no previous file with comments | « chrome/test/data/extensions/platform_apps/outer_bounds/test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9f6784901fbb6f184f7d64403aec64b356e99704 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,58 @@ 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() {
+ var innerBounds = {
+ width: 300,
+ height: 301,
+ minWidth: 200,
+ minHeight: 201,
+ maxWidth: 400,
+ maxHeight: 401
+ };
+
+ function assertInnerBounds(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);
+ }
+
+ chrome.test.runTests([
+ function createFrameChrome() {
+ chrome.app.window.create('test.html', {
+ innerBounds: innerBounds
+ }, callbackPass(function (win) {
+ assertInnerBounds(win);
+ }));
+ },
+ function createFrameNone() {
+ chrome.app.window.create('test.html', {
+ frame: 'none',
+ innerBounds: innerBounds
+ }, callbackPass(function (win) {
+ assertInnerBounds(win);
+ }));
+ },
+ function createFrameColor() {
+ chrome.app.window.create('test.html', {
+ frame: {color: '#ff0000'},
+ innerBounds: innerBounds
+ }, callbackPass(function (win) {
+ assertInnerBounds(win);
+ }));
+ }
+ ]);
+}
+
function testCreate() {
chrome.test.runTests([
function createUnfocusedWindow() {
« no previous file with comments | « chrome/test/data/extensions/platform_apps/outer_bounds/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698