Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/window_update/show_state/test.js |
| diff --git a/chrome/test/data/extensions/api_test/window_update/show_state/test.js b/chrome/test/data/extensions/api_test/window_update/show_state/test.js |
| index e0496df52c83d085315052dd3861bc1dea63a20b..ab01690279ecb6b77909be18b3e6d63ca2131868 100644 |
| --- a/chrome/test/data/extensions/api_test/window_update/show_state/test.js |
| +++ b/chrome/test/data/extensions/api_test/window_update/show_state/test.js |
| @@ -17,23 +17,37 @@ function checkRestoreWithBounds(theWindow) { |
| chrome.windows.remove(theWindow.id, pass()); |
| } |
| +function checkFullscreen(theWindow) { |
| + chrome.test.assertEq('fullscreen', theWindow.state); |
| + chrome.test.assertTrue(width < theWindow.width || height < theWindow.height); |
| + |
| + width += deltaWidth; |
| + height += deltaHeight; |
| + chrome.windows.update(theWindow.id, |
| + {'state': 'normal', 'width': width, 'height': height}, |
| + pass(checkRestoreWithBounds)); |
| +} |
| + |
| function checkMaximized(theWindow) { |
| if (theWindow.type == 'panel') { |
| // Maximize is the same as restore for panels. |
| chrome.test.assertEq('normal', theWindow.state); |
| chrome.test.assertEq(width, theWindow.width); |
| chrome.test.assertEq(height, theWindow.height); |
| + |
| + width += deltaWidth; |
| + height += deltaHeight; |
| + chrome.windows.update(theWindow.id, |
| + {'state': 'normal', 'width': width, 'height': height}, |
| + pass(checkRestoreWithBounds)); |
|
jennb
2012/02/06 23:34:25
Instead of having this special test path for panel
hashimoto
2012/02/07 02:16:00
Done.
I made no assertion for panels because Pane
|
| } else { |
| chrome.test.assertEq('maximized', theWindow.state); |
| chrome.test.assertTrue(width < theWindow.width || |
| height < theWindow.height); |
| - } |
| - width += deltaWidth; |
| - height += deltaHeight; |
| - chrome.windows.update(theWindow.id, |
| - {'state': 'normal', 'width': width, 'height': height}, |
| - pass(checkRestoreWithBounds)); |
| + chrome.windows.update(theWindow.id, {'state': 'fullscreen'}, |
| + pass(checkFullscreen)); |
| + } |
| } |
| function checkRestored(theWindow) { |