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

Unified Diff: chrome/test/data/extensions/api_test/window_update/show_state/test.js

Issue 9181005: Allow resizing a panel using chrome.windows.update() extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add forgotten test file. Created 8 years, 11 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/api_test/window_update/resize/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/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 c3d636664c9f715618897c3b0b30af2f08570bdc..6d46dfb97d2968a81466dd80cd7f91de26552e10 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
@@ -6,20 +6,14 @@ var pass = chrome.test.callbackPass;
var width = 0;
var height = 0;
-var changedWidth = 500;
-var changedHeight = 500;
+
+var deltaWidth = 20;
+var deltaHeight = 30;
function checkRestoreWithBounds(theWindow) {
chrome.test.assertEq('normal', theWindow.state);
- if (theWindow.type == 'panel') {
- // Panels decide their own bounds.
- chrome.test.assertEq(width, theWindow.width);
- chrome.test.assertEq(height, theWindow.height);
- } else {
- chrome.test.assertEq(changedWidth, theWindow.width);
- chrome.test.assertEq(changedHeight, theWindow.height);
- }
-
+ chrome.test.assertEq(width, theWindow.width);
+ chrome.test.assertEq(height, theWindow.height);
chrome.windows.remove(theWindow.id, pass());
}
@@ -35,8 +29,10 @@ function checkMaximized(theWindow) {
height < theWindow.height);
}
+ width += deltaWidth;
+ height += deltaHeight;
chrome.windows.update(theWindow.id,
- {'state': 'normal', width: changedWidth, height: changedHeight},
+ {'state': 'normal', 'width': width, 'height': height},
pass(checkRestoreWithBounds));
}
« no previous file with comments | « chrome/test/data/extensions/api_test/window_update/resize/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698