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

Side by Side Diff: chrome/test/data/extensions/api_test/window_update/show_state/test.html

Issue 8621002: Reduce minimum size of Panels to allow 1-text-line tight autosize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix extension test Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <script> 1 <script>
2 var pass = chrome.test.callbackPass; 2 var pass = chrome.test.callbackPass;
3 3
4 var width = 0; 4 var width = 0;
5 var height = 0; 5 var height = 0;
6 var changedWidth = 500; 6 var changedWidth = 500;
7 var changedHeight = 500; 7 var changedHeight = 500;
8 8
9 function checkRestoreWithBounds(theWindow) { 9 function checkRestoreWithBounds(theWindow) {
10 chrome.test.assertEq('normal', theWindow.state); 10 chrome.test.assertEq('normal', theWindow.state);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 function minimizeWindow(theWindow) { 53 function minimizeWindow(theWindow) {
54 chrome.test.assertEq('normal', theWindow.state); 54 chrome.test.assertEq('normal', theWindow.state);
55 width = theWindow.width; 55 width = theWindow.width;
56 height = theWindow.height; 56 height = theWindow.height;
57 chrome.windows.update(theWindow.id, {'state': 'minimized'}, pass(checkMinimize d)); 57 chrome.windows.update(theWindow.id, {'state': 'minimized'}, pass(checkMinimize d));
58 } 58 }
59 59
60 function testWindowState(windowType) { 60 function testWindowState(windowType) {
61 chrome.windows.create({'url': 'hello.html', 'type': windowType}, 61 // 'height' parameter prevents 'panel' windows form attempt to compute size as ynchronously.
jennb 2011/11/24 01:04:56 s/form/from
62 chrome.windows.create({'url': 'hello.html', 'type': windowType, 'height':100 } ,
jennb 2011/11/24 01:04:56 might as well provide width too. it's pretty unusu
62 pass(minimizeWindow)); 63 pass(minimizeWindow));
63 } 64 }
64 65
65 chrome.test.runTests([ 66 chrome.test.runTests([
66 function changeWindowState() { 67 function changeWindowState() {
67 testWindowState('normal'); 68 testWindowState('normal');
68 }, 69 },
69 function changePopupWindowState() { 70 function changePopupWindowState() {
70 testWindowState('popup'); 71 testWindowState('popup');
71 }, 72 },
72 function changePanelWindowState() { 73 function changePanelWindowState() {
73 testWindowState('panel'); 74 testWindowState('panel');
74 } 75 }
75 ]); 76 ]);
76 </script> 77 </script>
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.cc ('k') | chrome/test/data/panels/update-preferred-size.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698