browser_popup_linux_resize.js (1312B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 function createLinuxResizeTests(aFirstValue, aSecondValue, aMsg) { 5 for (let prop of ResizeMoveTest.PropInfo.sizeProps) { 6 // For e.g 'outerWidth' this will be 'innerWidth'. 7 let otherProp = ResizeMoveTest.PropInfo.crossBoundsMapping[prop]; 8 let first = {}; 9 first[prop] = aFirstValue; 10 let second = {}; 11 second[otherProp] = aSecondValue; 12 new ResizeMoveTest( 13 [first, second], 14 /* aInstant */ true, 15 `${aMsg} ${prop},${otherProp}` 16 ); 17 new ResizeMoveTest( 18 [first, second], 19 /* aInstant */ false, 20 `${aMsg} ${prop},${otherProp}` 21 ); 22 } 23 } 24 25 createLinuxResizeTests(9, 10, "Resize"); 26 createLinuxResizeTests(10, 0, "Resize revert"); 27 createLinuxResizeTests(10, 10, "Resize repeat"); 28 29 new ResizeMoveTest( 30 [ 31 { outerWidth: 10 }, 32 { innerHeight: 10 }, 33 { innerWidth: 20 }, 34 { outerHeight: 20 }, 35 { outerWidth: 30 }, 36 ], 37 /* aInstant */ true, 38 "Resize sequence", 39 /* aWaitForCompletion */ true 40 ); 41 42 new ResizeMoveTest( 43 [ 44 { outerWidth: 10 }, 45 { innerHeight: 10 }, 46 { innerWidth: 20 }, 47 { outerHeight: 20 }, 48 { outerWidth: 30 }, 49 ], 50 /* aInstant */ false, 51 "Resize sequence", 52 /* aWaitForCompletion */ true 53 );