You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

508 lines
15 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. /**
  16. * Creates a window with 40 tabs, profiles initial rendering speed and resize rendering speed
  17. */
  18. function addWindowPerformanceTest() {
  19. Ext.test.profiler.add({
  20. name : 'AnchorLayout',
  21. skipVersions: ['2.2.0', '3.1.0'],
  22. iterations: 1000,
  23. newWindow : true,
  24. beforeAll : function() {
  25. this.previousBuffer = Ext.Container.bufferResize;
  26. Ext.Container.bufferResize = false;
  27. },
  28. afterAll : function() {
  29. Ext.Container.bufferResize = this.previousBuffer;
  30. },
  31. execute : function() {
  32. this.win = new Ext.Viewport({
  33. layout: 'fit',
  34. items: [{
  35. xtype: 'container',
  36. layout: 'form',
  37. items: [{
  38. xtype: 'textfield',
  39. width: 100
  40. }, {
  41. xtype: 'textfield',
  42. anchor: '100%'
  43. },
  44. {
  45. xtype: 'textfield',
  46. anchor: '100%'
  47. },
  48. {
  49. xtype: 'textfield',
  50. anchor: '100%'
  51. },
  52. {
  53. xtype: 'textfield',
  54. anchor: '100%'
  55. },
  56. {
  57. xtype: 'textfield',
  58. anchor: '100%'
  59. },
  60. {
  61. xtype: 'textfield',
  62. anchor: '100%'
  63. },
  64. {
  65. xtype: 'textfield',
  66. anchor: '100%'
  67. },
  68. {
  69. xtype: 'textfield',
  70. anchor: '100%'
  71. },
  72. {
  73. xtype: 'textfield',
  74. anchor: '100%'
  75. },
  76. {
  77. xtype: 'textfield',
  78. anchor: '100%'
  79. },
  80. {
  81. xtype: 'textfield',
  82. anchor: '100%'
  83. },
  84. {
  85. xtype: 'textfield',
  86. anchor: '100%'
  87. },
  88. {
  89. xtype: 'textfield',
  90. anchor: '100%'
  91. },
  92. {
  93. xtype: 'textfield',
  94. anchor: '100%'
  95. },
  96. {
  97. xtype: 'textfield',
  98. anchor: '100%'
  99. },
  100. {
  101. xtype: 'textfield',
  102. anchor: '100%'
  103. },
  104. {
  105. xtype: 'textfield',
  106. anchor: '100%'
  107. },
  108. {
  109. xtype: 'textfield',
  110. anchor: '100%'
  111. },
  112. {
  113. xtype: 'textfield',
  114. anchor: '100%'
  115. },
  116. {
  117. xtype: 'textfield',
  118. anchor: '100%'
  119. },
  120. {
  121. xtype: 'textfield',
  122. width: 100
  123. }]
  124. }]
  125. });
  126. },
  127. afterEach: function() {
  128. this.win.destroy();
  129. }
  130. });
  131. /*
  132. Ext.test.profiler.add({
  133. name : 'ColumnLayout',
  134. skipVersions: ['2.2.0'],
  135. iterations: 50,
  136. newWindow : true,
  137. beforeAll : function() {
  138. this.previousBuffer = Ext.Container.bufferResize;
  139. Ext.Container.bufferResize = false;
  140. },
  141. afterAll : function() {
  142. Ext.Container.bufferResize = this.previousBuffer;
  143. },
  144. execute : function() {
  145. this.win = new Ext.Viewport({
  146. layout: 'fit',
  147. items: [{
  148. xtype: 'container',
  149. layout: 'column',
  150. defaults: {
  151. height: 30
  152. },
  153. items: [{
  154. xtype: 'container',
  155. width: 100
  156. }, {
  157. xtype: 'container',
  158. columnWidth: .05
  159. },
  160. {
  161. xtype: 'container',
  162. columnWidth: .05
  163. },
  164. {
  165. xtype: 'container',
  166. columnWidth: .05
  167. },
  168. {
  169. xtype: 'container',
  170. columnWidth: .05
  171. },
  172. {
  173. xtype: 'container',
  174. columnWidth: .05
  175. },
  176. {
  177. xtype: 'container',
  178. columnWidth: .05
  179. },
  180. {
  181. xtype: 'container',
  182. columnWidth: .05
  183. },
  184. {
  185. xtype: 'container',
  186. columnWidth: .05
  187. },
  188. {
  189. xtype: 'container',
  190. columnWidth: .05
  191. },
  192. {
  193. xtype: 'container',
  194. columnWidth: .05
  195. },
  196. {
  197. xtype: 'container',
  198. columnWidth: .05
  199. },
  200. {
  201. xtype: 'container',
  202. columnWidth: .05
  203. },
  204. {
  205. xtype: 'container',
  206. columnWidth: .05
  207. },
  208. {
  209. xtype: 'container',
  210. columnWidth: .05
  211. },
  212. {
  213. xtype: 'container',
  214. columnWidth: .05
  215. },
  216. {
  217. xtype: 'container',
  218. columnWidth: .05
  219. },
  220. {
  221. xtype: 'container',
  222. columnWidth: .05
  223. },
  224. {
  225. xtype: 'container',
  226. columnWidth: .05
  227. },
  228. {
  229. xtype: 'container',
  230. columnWidth: .05
  231. },
  232. {
  233. xtype: 'container',
  234. columnWidth: .05
  235. },
  236. {
  237. xtype: 'container',
  238. width: 100
  239. }]
  240. }]
  241. });
  242. },
  243. afterEach: function() {
  244. this.win.destroy();
  245. }
  246. });
  247. Ext.test.profiler.add({
  248. name : 'HBoxLayout',
  249. skipVersions: ['2.2.0'],
  250. iterations: 50,
  251. newWindow : true,
  252. beforeAll : function() {
  253. this.previousBuffer = Ext.Container.bufferResize;
  254. Ext.Container.bufferResize = false;
  255. },
  256. afterAll : function() {
  257. Ext.Container.bufferResize = this.previousBuffer;
  258. },
  259. execute : function() {
  260. this.win = new Ext.Viewport({
  261. layout: 'fit',
  262. items: [{
  263. xtype: 'container',
  264. layout: 'hbox',
  265. layoutConfig: {
  266. align: 'stretch'
  267. },
  268. items: [{
  269. xtype: 'container',
  270. width: 100
  271. }, {
  272. xtype: 'container',
  273. flex: 1
  274. },
  275. {
  276. xtype: 'container',
  277. flex: 2
  278. },
  279. {
  280. xtype: 'container',
  281. flex: 3
  282. },
  283. {
  284. xtype: 'container',
  285. flex: 1
  286. },
  287. {
  288. xtype: 'container',
  289. flex: 2
  290. },
  291. {
  292. xtype: 'container',
  293. flex: 3
  294. },
  295. {
  296. xtype: 'container',
  297. flex: 1
  298. },
  299. {
  300. xtype: 'container',
  301. flex: 2
  302. },
  303. {
  304. xtype: 'container',
  305. flex: 3
  306. },
  307. {
  308. xtype: 'container',
  309. flex: 1
  310. },
  311. {
  312. xtype: 'container',
  313. flex: 2
  314. },
  315. {
  316. xtype: 'container',
  317. flex: 3
  318. },
  319. {
  320. xtype: 'container',
  321. flex: 1
  322. },
  323. {
  324. xtype: 'container',
  325. flex: 2
  326. },
  327. {
  328. xtype: 'container',
  329. flex: 3
  330. },
  331. {
  332. xtype: 'container',
  333. flex: 1
  334. },
  335. {
  336. xtype: 'container',
  337. flex: 2
  338. },
  339. {
  340. xtype: 'container',
  341. flex: 3
  342. },
  343. {
  344. xtype: 'container',
  345. flex: 1
  346. },
  347. {
  348. xtype: 'container',
  349. flex: 2
  350. },
  351. {
  352. xtype: 'container',
  353. flex: 3
  354. },
  355. {
  356. xtype: 'container',
  357. flex: 1
  358. },
  359. {
  360. xtype: 'container',
  361. flex: 2
  362. },
  363. {
  364. xtype: 'container',
  365. flex: 3
  366. },
  367. {
  368. xtype: 'container',
  369. flex: 1
  370. },
  371. {
  372. xtype: 'container',
  373. flex: 2
  374. },
  375. {
  376. xtype: 'container',
  377. flex: 3
  378. },
  379. {
  380. xtype: 'container',
  381. flex: 1
  382. },
  383. {
  384. xtype: 'container',
  385. flex: 2
  386. },
  387. {
  388. xtype: 'container',
  389. flex: 3
  390. },
  391. {
  392. xtype: 'container',
  393. flex: 1
  394. },
  395. {
  396. xtype: 'container',
  397. flex: 2
  398. },
  399. {
  400. xtype: 'container',
  401. flex: 3
  402. },
  403. {
  404. xtype: 'container',
  405. flex: 1
  406. },
  407. {
  408. xtype: 'container',
  409. flex: 2
  410. },
  411. {
  412. xtype: 'container',
  413. flex: 3
  414. },
  415. {
  416. xtype: 'container',
  417. flex: 1
  418. },
  419. {
  420. xtype: 'container',
  421. flex: 2
  422. },
  423. {
  424. xtype: 'container',
  425. flex: 3
  426. },
  427. {
  428. xtype: 'container',
  429. flex: 1
  430. },
  431. {
  432. xtype: 'container',
  433. flex: 2
  434. },
  435. {
  436. xtype: 'container',
  437. flex: 3
  438. },
  439. {
  440. xtype: 'container',
  441. flex: 1
  442. },
  443. {
  444. xtype: 'container',
  445. flex: 2
  446. },
  447. {
  448. xtype: 'container',
  449. flex: 3
  450. },
  451. {
  452. xtype: 'container',
  453. flex: 1
  454. },
  455. {
  456. xtype: 'container',
  457. flex: 2
  458. },
  459. {
  460. xtype: 'container',
  461. flex: 3
  462. },
  463. {
  464. xtype: 'container',
  465. width: 100
  466. }]
  467. }]
  468. });
  469. } ,
  470. afterEach: function() {
  471. this.win.destroy();
  472. }
  473. });
  474. */
  475. };
  476. if (typeof Ext != 'undefined' && typeof Ext.test != 'undefined') {
  477. addWindowPerformanceTest();
  478. } else {
  479. Ext.onReady(addWindowPerformanceTest);
  480. }