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

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: hopefully final 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 // Specifying size prevents 'panel' windows from computing size asynchronously . It ensures
62 // panel sizes stay fixed through the test.
63 chrome.windows.create({'url': 'hello.html', 'type': windowType, 'width':100, ' height':100 },
62 pass(minimizeWindow)); 64 pass(minimizeWindow));
63 } 65 }
64 66
65 chrome.test.runTests([ 67 chrome.test.runTests([
66 function changeWindowState() { 68 function changeWindowState() {
67 testWindowState('normal'); 69 testWindowState('normal');
68 }, 70 },
69 function changePopupWindowState() { 71 function changePopupWindowState() {
70 testWindowState('popup'); 72 testWindowState('popup');
71 }, 73 },
72 function changePanelWindowState() { 74 function changePanelWindowState() {
73 testWindowState('panel'); 75 testWindowState('panel');
74 } 76 }
75 ]); 77 ]);
76 </script> 78 </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