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() { |