xref: /haiku/src/tests/kits/interface/balert/AlertTest.cpp (revision b85443713fc35a03eaf81933f4467920c1174598)
1 // AlertTest.cpp
2 #include "AlertTest.h"
3 #include <cppunit/Test.h>
4 #include <cppunit/TestCaller.h>
5 #include <cppunit/TestSuite.h>
6 #include <iostream.h>
7 #include <stdio.h>
8 #include <string.h>
9 #include <Application.h>
10 #include <Alert.h>
11 #include <Point.h>
12 #include <TextView.h>
13 #include <Button.h>
14 #include <Rect.h>
15 
16 #define ASSERT_DEQUAL(x,y) CPPUNIT_ASSERT_DOUBLES_EQUAL((x),(y),0.01)
17 
18 const char *k20X = "XXXXXXXXXXXXXXXXXXXX";
19 const char *k40X = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
20 const char *k60X = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
21 
22 // Required by CPPUNIT_ASSERT_EQUAL(rgb_color, rgb_color)
23 bool operator==(const rgb_color &left, const rgb_color &right)
24 {
25 	if (left.red == right.red && left.green == right.green &&
26 	    left.blue == right.blue && left.alpha == right.alpha)
27 	    return true;
28 	else
29 		return false;
30 }
31 // Required by CPPUNIT_ASSERT_EQUAL(rgb_color, rgb_color)
32 ostream &operator<<(ostream &stream, const rgb_color &clr)
33 {
34 	return stream << "rgb_color(" << clr.red << ", " <<
35 		clr.green << ", " << clr.blue << ", " << clr.alpha << ")";
36 }
37 
38 // For storing expected state of windows or views.
39 struct GuiInfo {
40 	const char*	label;
41 	float		width;
42 	float		height;
43 	BPoint		topleft;
44 };
45 
46 // For storing all the information required to create and
47 // verify the state of a BAlert object.
48 class AlertTestInfo {
49 public:
50 	AlertTestInfo(AlertTest *pTest);
51 	~AlertTestInfo();
52 
53 	void SetWinInfo(const GuiInfo &winInfo);
54 	void SetTextViewInfo(const GuiInfo &textInfo);
55 	void SetButtonInfo(int32 btn, const GuiInfo &btnInfo);
56 
57 	void SetButtonWidthMode(button_width widthMode);
58 	void SetButtonSpacingMode(button_spacing spacingMode);
59 	void SetAlertType(alert_type alertType);
60 
61 	void GuiInfoTest();
62 
63 private:
64 	AlertTest*		fTest;
65 	GuiInfo			fWinInfo;
66 	GuiInfo			fTextInfo;
67 	GuiInfo			fButtonInfo[3];
68 	int32 			fButtonCount;
69 	button_width	fWidthMode;
70 	button_spacing	fSpacingMode;
71 	alert_type		fAlertType;
72 };
73 
74 AlertTestInfo::AlertTestInfo(AlertTest *pTest)
75 {
76 	memset(this, 0, sizeof(AlertTestInfo));
77 
78 	fTest = pTest;
79 	fWidthMode = B_WIDTH_AS_USUAL;
80 	fSpacingMode = B_EVEN_SPACING;
81 	fAlertType = B_INFO_ALERT;
82 }
83 
84 AlertTestInfo::~AlertTestInfo()
85 {
86 	fTest = NULL;
87 	fButtonCount = 0;
88 }
89 
90 void
91 AlertTestInfo::SetWinInfo(const GuiInfo &winInfo)
92 {
93 	fWinInfo = winInfo;
94 }
95 
96 void
97 AlertTestInfo::SetTextViewInfo(const GuiInfo &textInfo)
98 {
99 	fTextInfo = textInfo;
100 }
101 
102 void
103 AlertTestInfo::SetButtonInfo(int32 btn, const GuiInfo &btnInfo)
104 {
105 	if (btn < 0 || btn > 2 || btn > fButtonCount) {
106 		CPPUNIT_ASSERT(false);
107 		return;
108 	}
109 	fButtonInfo[btn] = btnInfo;
110 	if (btn == fButtonCount && fButtonCount < 3)
111 		fButtonCount++;
112 }
113 
114 void
115 AlertTestInfo::SetButtonWidthMode(button_width widthMode)
116 {
117 	fWidthMode = widthMode;
118 }
119 
120 void
121 AlertTestInfo::SetButtonSpacingMode(button_spacing spacingMode)
122 {
123 	fSpacingMode = spacingMode;
124 }
125 
126 void
127 AlertTestInfo::SetAlertType(alert_type alertType)
128 {
129 	fAlertType = alertType;
130 }
131 
132 void
133 AlertTestInfo::GuiInfoTest()
134 {
135 	fTest->NextSubTest();
136 	// Dummy application object required to create Window objects.
137 	BApplication app("application/x-vnd.Haiku-interfacekit_alerttest");
138 	BAlert *pAlert = new BAlert(
139 		fWinInfo.label,
140 		fTextInfo.label,
141 		fButtonInfo[0].label,
142 		fButtonInfo[1].label,
143 		fButtonInfo[2].label,
144 		fWidthMode,
145 		fSpacingMode,
146 		fAlertType
147 	);
148 	CPPUNIT_ASSERT(pAlert);
149 
150 	// Alert Window Width/Height
151 	fTest->NextSubTest();
152 	ASSERT_DEQUAL(fWinInfo.width, pAlert->Bounds().Width());
153 	ASSERT_DEQUAL(fWinInfo.height, pAlert->Bounds().Height());
154 
155 	// [k] MasterView
156 	fTest->NextSubTest();
157 	BView *masterView = pAlert->ChildAt(0);
158 	CPPUNIT_ASSERT(masterView);
159 
160 	// [k] MasterView Color
161 	fTest->NextSubTest();
162 	CPPUNIT_ASSERT_EQUAL(ui_color(B_PANEL_BACKGROUND_COLOR),
163 		masterView->ViewColor());
164 
165 	// Test all the buttons
166 	BButton *btns[3] = { NULL };
167 	for (int32 i = 0; i < 3; i++) {
168 		fTest->NextSubTest();
169 		btns[i] = pAlert->ButtonAt(i);
170 
171 		if (i >= fButtonCount) {
172 			// If there is should be no button at this index
173 			CPPUNIT_ASSERT_EQUAL((BButton*)NULL, btns[i]);
174 		} else {
175 			// If there should be a button at this index
176 			CPPUNIT_ASSERT(btns[i]);
177 
178 			CPPUNIT_ASSERT(
179 				strcmp(fButtonInfo[i].label, btns[i]->Label()) == 0);
180 
181 			ASSERT_DEQUAL(fButtonInfo[i].width, btns[i]->Bounds().Width());
182 
183 			ASSERT_DEQUAL(fButtonInfo[i].height, btns[i]->Bounds().Height());
184 
185 			BPoint pt = btns[i]->ConvertToParent(BPoint(0, 0));
186 			ASSERT_DEQUAL(fButtonInfo[i].topleft.x, pt.x);
187 			ASSERT_DEQUAL(fButtonInfo[i].topleft.y, pt.y);
188 
189 			if (i == fButtonCount - 1) {
190 				// Default button
191 				CPPUNIT_ASSERT_EQUAL(true, btns[i]->IsDefault());
192 			}
193 		}
194 	}
195 
196 	// [k] TextView
197 	fTest->NextSubTest();
198 	BTextView *textView = pAlert->TextView();
199 	CPPUNIT_ASSERT(textView);
200 
201 	// [k] TextView ViewColor()
202 	fTest->NextSubTest();
203 	CPPUNIT_ASSERT_EQUAL(ui_color(B_PANEL_BACKGROUND_COLOR), textView->ViewColor());
204 
205 	// [k] TextView IsEditable()
206 	fTest->NextSubTest();
207 	CPPUNIT_ASSERT_EQUAL(false, textView->IsEditable());
208 
209 	// [k] TextView IsSelectable()
210 	fTest->NextSubTest();
211 	CPPUNIT_ASSERT_EQUAL(false, textView->IsSelectable());
212 
213 	// [k] TextView DoesWordWrap()
214 	fTest->NextSubTest();
215 	CPPUNIT_ASSERT_EQUAL(true, textView->DoesWordWrap());
216 
217 	// TextView Text
218 	fTest->NextSubTest();
219 	CPPUNIT_ASSERT(strcmp(fTextInfo.label, textView->Text()) == 0);
220 
221 	// TextView Width/Height
222 	fTest->NextSubTest();
223 	ASSERT_DEQUAL(fTextInfo.width, textView->Bounds().Width());
224 	ASSERT_DEQUAL(fTextInfo.height, textView->Bounds().Height());
225 
226 	// TextView Position
227 	fTest->NextSubTest();
228 	BPoint pt = textView->ConvertToParent(BPoint(0, 0));
229 	ASSERT_DEQUAL(fTextInfo.topleft.x, pt.x);
230 	ASSERT_DEQUAL(fTextInfo.topleft.y, pt.y);
231 
232 	delete pAlert;
233 	pAlert = NULL;
234 }
235 
236 // Suite
237 CppUnit::Test *
238 AlertTest::Suite()
239 {
240 	CppUnit::TestSuite *suite = new CppUnit::TestSuite();
241 	typedef CppUnit::TestCaller<AlertTest> TC;
242 
243 #define AT_ADDTEST(fn) (suite->addTest(new TC("Alert " #fn, &AlertTest::fn)))
244 
245 	////// UW_ES_IA - One Button //////
246 	AT_ADDTEST(empty_empty_UW_ES_IA);
247 	AT_ADDTEST(OK_X_UW_ES_IA);
248 	AT_ADDTEST(OK_60X_UW_ES_IA);
249 	AT_ADDTEST(twentyX_60X_UW_ES_IA);
250 	AT_ADDTEST(fortyX_60X_UW_ES_IA);
251 
252 	////// LW_ES_IA - One Button //////
253 	AT_ADDTEST(empty_empty_LW_ES_IA);
254 	AT_ADDTEST(OK_X_LW_ES_IA);
255 	AT_ADDTEST(twentyX_60X_LW_ES_IA);
256 	AT_ADDTEST(fortyX_60X_LW_ES_IA);
257 
258 	////// WW_ES_IA - One Button //////
259 	AT_ADDTEST(empty_empty_WW_ES_IA);
260 	AT_ADDTEST(OK_X_WW_ES_IA);
261 	AT_ADDTEST(twentyX_60X_WW_ES_IA);
262 
263 	////// UW_ES_EA - One Button //////
264 	AT_ADDTEST(OK_X_UW_ES_EA);
265 	AT_ADDTEST(fortyX_60X_UW_ES_EA);
266 
267 	////// UW_ES_IA - Two Button //////
268 	AT_ADDTEST(OK_Cancel_60X_UW_ES_IA);
269 	AT_ADDTEST(twentyX_Cancel_60X_UW_ES_IA);
270 	AT_ADDTEST(twentyX_20X_60X_UW_ES_IA);
271 
272 	////// LW_ES_IA - Two Button //////
273 	AT_ADDTEST(empty_empty_X_LW_ES_IA);
274 	AT_ADDTEST(OK_Cancel_60X_LW_ES_IA);
275 
276 	////// WW_ES_IA - Two Button //////
277 	AT_ADDTEST(empty_empty_X_WW_ES_IA);
278 	AT_ADDTEST(OK_Cancel_60X_WW_ES_IA);
279 	AT_ADDTEST(twentyX_Cancel_60X_WW_ES_IA);
280 	AT_ADDTEST(twentyX_20X_WW_ES_IA);
281 
282 	////// UW_ES_EA - Two Button //////
283 	AT_ADDTEST(OK_Cancel_60X_UW_ES_EA);
284 	AT_ADDTEST(twentyX_20X_60X_UW_ES_EA);
285 
286 	////// UW_ES_IA - Three Button //////
287 	AT_ADDTEST(twentyX_20X_20X_60X_UW_ES_IA);
288 
289 	////// LW_ES_IA - Three Button //////
290 	AT_ADDTEST(empty_empty_empty_X_LW_ES_IA);
291 	AT_ADDTEST(Yes_No_Cancel_X_LW_ES_IA);
292 	AT_ADDTEST(twentyX_20X_20X_60X_LW_ES_IA);
293 
294 	////// WW_ES_IA - Three Button //////
295 	AT_ADDTEST(empty_empty_empty_X_WW_ES_IA);
296 	AT_ADDTEST(Monkey_Dog_Cat_X_WW_ES_IA);
297 	AT_ADDTEST(X_20X_X_WW_ES_IA);
298 	AT_ADDTEST(Yes_No_Cancel_X_WW_ES_IA);
299 	AT_ADDTEST(twentyX_20X_20X_60X_WW_ES_IA);
300 
301 	////// UW_ES_EA - Three Button //////
302 	AT_ADDTEST(twentyX_20X_20X_60X_UW_ES_EA);
303 
304 	return suite;
305 }
306 
307 // setUp
308 void
309 AlertTest::setUp()
310 {
311 	BTestCase::setUp();
312 }
313 
314 // tearDown
315 void
316 AlertTest::tearDown()
317 {
318 	BTestCase::tearDown();
319 }
320 
321 ////// UW_ES_IA - One Button //////
322 
323 void
324 AlertTest::empty_empty_UW_ES_IA()
325 {
326 	AlertTestInfo ati(this);
327 	GuiInfo wi, ti, bi;
328 	wi.label = "alert1";
329 	wi.width = 310.0f;
330 	wi.height = 64.0f;
331 	ati.SetWinInfo(wi);
332 
333 	ti.label = "";
334 	ti.width = 245.0f;
335 	ti.height = 13.0f;
336 	ti.topleft.Set(55.0f, 6.0f);
337 	ati.SetTextViewInfo(ti);
338 
339 	bi.label = "";
340 	bi.width = 75.0f;
341 	bi.height = 30.0f;
342 	bi.topleft.Set(229.0f, 28.0f);
343 	ati.SetButtonInfo(0, bi);
344 
345 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
346 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
347 	ati.SetAlertType(B_INFO_ALERT);
348 
349 	ati.GuiInfoTest();
350 }
351 
352 void
353 AlertTest::OK_X_UW_ES_IA()
354 {
355 	AlertTestInfo ati(this);
356 	GuiInfo wi, ti, bi;
357 	wi.label = "alert1";
358 	wi.width = 310.0f;
359 	wi.height = 64.0f;
360 	ati.SetWinInfo(wi);
361 
362 	ti.label = "X";
363 	ti.width = 245.0f;
364 	ti.height = 13.0f;
365 	ti.topleft.Set(55.0f, 6.0f);
366 	ati.SetTextViewInfo(ti);
367 
368 	bi.label = "OK";
369 	bi.width = 75.0f;
370 	bi.height = 30.0f;
371 	bi.topleft.Set(229.0f, 28.0f);
372 	ati.SetButtonInfo(0, bi);
373 
374 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
375 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
376 	ati.SetAlertType(B_INFO_ALERT);
377 
378 	ati.GuiInfoTest();
379 }
380 
381 void
382 AlertTest::OK_60X_UW_ES_IA()
383 {
384 	AlertTestInfo ati(this);
385 	GuiInfo wi, ti, bi;
386 	wi.label = "alert1";
387 	wi.width = 310.0f;
388 	wi.height = 77.0f;
389 	ati.SetWinInfo(wi);
390 
391 	ti.label = k60X;
392 	ti.width = 245.0f;
393 	ti.height = 26.0f;
394 	ti.topleft.Set(55.0f, 6.0f);
395 	ati.SetTextViewInfo(ti);
396 
397 	bi.label = "OK";
398 	bi.width = 75.0f;
399 	bi.height = 30.0f;
400 	bi.topleft.Set(229.0f, 41.0f);
401 	ati.SetButtonInfo(0, bi);
402 
403 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
404 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
405 	ati.SetAlertType(B_INFO_ALERT);
406 
407 	ati.GuiInfoTest();
408 }
409 
410 void
411 AlertTest::twentyX_60X_UW_ES_IA()
412 {
413 	AlertTestInfo ati(this);
414 	GuiInfo wi, ti, bi;
415 	wi.label = "alert1";
416 	wi.width = 310.0f;
417 	wi.height = 77.0f;
418 	ati.SetWinInfo(wi);
419 
420 	ti.label = k60X;
421 	ti.width = 245.0f;
422 	ti.height = 26.0f;
423 	ti.topleft.Set(55.0f, 6.0f);
424 	ati.SetTextViewInfo(ti);
425 
426 	bi.label = k20X;
427 	bi.width = 160.0f;
428 	bi.height = 30.0f;
429 	bi.topleft.Set(144.0f, 41.0f);
430 	ati.SetButtonInfo(0, bi);
431 
432 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
433 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
434 	ati.SetAlertType(B_INFO_ALERT);
435 
436 	ati.GuiInfoTest();
437 }
438 
439 void
440 AlertTest::fortyX_60X_UW_ES_IA()
441 {
442 	AlertTestInfo ati(this);
443 	GuiInfo wi, ti, bi;
444 	wi.label = "alert1";
445 	wi.width = 365.0f;
446 	wi.height = 77.0f;
447 	ati.SetWinInfo(wi);
448 
449 	ti.label = k60X;
450 	ti.width = 300.0f;
451 	ti.height = 26.0f;
452 	ti.topleft.Set(55.0f, 6.0f);
453 	ati.SetTextViewInfo(ti);
454 
455 	bi.label = k40X;
456 	bi.width = 300.0f;
457 	bi.height = 30.0f;
458 	bi.topleft.Set(59.0f, 41.0f);
459 	ati.SetButtonInfo(0, bi);
460 
461 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
462 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
463 	ati.SetAlertType(B_INFO_ALERT);
464 
465 	ati.GuiInfoTest();
466 }
467 
468 ////// LW_ES_IA - One Button //////
469 
470 void
471 AlertTest::empty_empty_LW_ES_IA()
472 {
473 	AlertTestInfo ati(this);
474 	GuiInfo wi, ti, bi;
475 	wi.label = "alert1";
476 	wi.width = 310.0f;
477 	wi.height = 64.0f;
478 	ati.SetWinInfo(wi);
479 
480 	ti.label = "";
481 	ti.width = 245.0f;
482 	ti.height = 13.0f;
483 	ti.topleft.Set(55.0f, 6.0f);
484 	ati.SetTextViewInfo(ti);
485 
486 	bi.label = "";
487 	bi.width = 20.0f;
488 	bi.height = 30.0f;
489 	bi.topleft.Set(284.0f, 28.0f);
490 	ati.SetButtonInfo(0, bi);
491 
492 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
493 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
494 	ati.SetAlertType(B_INFO_ALERT);
495 
496 	ati.GuiInfoTest();
497 }
498 
499 void
500 AlertTest::OK_X_LW_ES_IA()
501 {
502 	AlertTestInfo ati(this);
503 	GuiInfo wi, ti, bi;
504 	wi.label = "alert1";
505 	wi.width = 310.0f;
506 	wi.height = 64.0f;
507 	ati.SetWinInfo(wi);
508 
509 	ti.label = "X";
510 	ti.width = 245.0f;
511 	ti.height = 13.0f;
512 	ti.topleft.Set(55.0f, 6.0f);
513 	ati.SetTextViewInfo(ti);
514 
515 	bi.label = "OK";
516 	bi.width = 35.0f;
517 	bi.height = 30.0f;
518 	bi.topleft.Set(269.0f, 28.0f);
519 	ati.SetButtonInfo(0, bi);
520 
521 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
522 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
523 	ati.SetAlertType(B_INFO_ALERT);
524 
525 	ati.GuiInfoTest();
526 }
527 
528 void
529 AlertTest::twentyX_60X_LW_ES_IA()
530 {
531 	AlertTestInfo ati(this);
532 	GuiInfo wi, ti, bi;
533 	wi.label = "alert1";
534 	wi.width = 310.0f;
535 	wi.height = 77.0f;
536 	ati.SetWinInfo(wi);
537 
538 	ti.label = k60X;
539 	ti.width = 245.0f;
540 	ti.height = 26.0f;
541 	ti.topleft.Set(55.0f, 6.0f);
542 	ati.SetTextViewInfo(ti);
543 
544 	bi.label = k20X;
545 	bi.width = 160.0f;
546 	bi.height = 30.0f;
547 	bi.topleft.Set(144.0f, 41.0f);
548 	ati.SetButtonInfo(0, bi);
549 
550 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
551 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
552 	ati.SetAlertType(B_INFO_ALERT);
553 
554 	ati.GuiInfoTest();
555 }
556 
557 void
558 AlertTest::fortyX_60X_LW_ES_IA()
559 {
560 	AlertTestInfo ati(this);
561 	GuiInfo wi, ti, bi;
562 	wi.label = "alert1";
563 	wi.width = 365.0f;
564 	wi.height = 77.0f;
565 	ati.SetWinInfo(wi);
566 
567 	ti.label = k60X;
568 	ti.width = 300.0f;
569 	ti.height = 26.0f;
570 	ti.topleft.Set(55.0f, 6.0f);
571 	ati.SetTextViewInfo(ti);
572 
573 	bi.label = k40X;
574 	bi.width = 300.0f;
575 	bi.height = 30.0f;
576 	bi.topleft.Set(59.0f, 41.0f);
577 	ati.SetButtonInfo(0, bi);
578 
579 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
580 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
581 	ati.SetAlertType(B_INFO_ALERT);
582 
583 	ati.GuiInfoTest();
584 }
585 
586 ////// WW_ES_IA - One Button //////
587 
588 void
589 AlertTest::empty_empty_WW_ES_IA()
590 {
591 	AlertTestInfo ati(this);
592 	GuiInfo wi, ti, bi;
593 	wi.width = 310.0f;
594 	wi.height = 64.0f;
595 	ati.SetWinInfo(wi);
596 
597 	ti.label = "";
598 	ti.width = 245.0f;
599 	ti.height = 13.0f;
600 	ti.topleft.Set(55.0f, 6.0f);
601 	ati.SetTextViewInfo(ti);
602 
603 	bi.label = "";
604 	bi.width = 20.0f;
605 	bi.height = 30.0f;
606 	bi.topleft.Set(284.0f, 28.0f);
607 	ati.SetButtonInfo(0, bi);
608 
609 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
610 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
611 	ati.SetAlertType(B_INFO_ALERT);
612 
613 	ati.GuiInfoTest();
614 }
615 
616 void
617 AlertTest::OK_X_WW_ES_IA()
618 {
619 	AlertTestInfo ati(this);
620 	GuiInfo wi, ti, bi;
621 	wi.width = 310.0f;
622 	wi.height = 64.0f;
623 	ati.SetWinInfo(wi);
624 
625 	ti.label = "X";
626 	ti.width = 245.0f;
627 	ti.height = 13.0f;
628 	ti.topleft.Set(55.0f, 6.0f);
629 	ati.SetTextViewInfo(ti);
630 
631 	bi.label = "OK";
632 	bi.width = 35.0f;
633 	bi.height = 30.0f;
634 	bi.topleft.Set(269.0f, 28.0f);
635 	ati.SetButtonInfo(0, bi);
636 
637 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
638 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
639 	ati.SetAlertType(B_INFO_ALERT);
640 
641 	ati.GuiInfoTest();
642 }
643 
644 void
645 AlertTest::twentyX_60X_WW_ES_IA()
646 {
647 	AlertTestInfo ati(this);
648 	GuiInfo wi, ti, bi;
649 	wi.width = 310.0f;
650 	wi.height = 77.0f;
651 	ati.SetWinInfo(wi);
652 
653 	ti.label = k60X;
654 	ti.width = 245.0f;
655 	ti.height = 26.0f;
656 	ti.topleft.Set(55.0f, 6.0f);
657 	ati.SetTextViewInfo(ti);
658 
659 	bi.label = k20X;
660 	bi.width = 160.0f;
661 	bi.height = 30.0f;
662 	bi.topleft.Set(144.0f, 41.0f);
663 	ati.SetButtonInfo(0, bi);
664 
665 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
666 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
667 	ati.SetAlertType(B_INFO_ALERT);
668 
669 	ati.GuiInfoTest();
670 }
671 
672 ////// UW_ES_EA - One Button //////
673 
674 void
675 AlertTest::OK_X_UW_ES_EA()
676 {
677 	AlertTestInfo ati(this);
678 	GuiInfo wi, ti, bi;
679 	wi.label = "alert1";
680 	wi.width = 310.0f;
681 	wi.height = 64.0f;
682 	ati.SetWinInfo(wi);
683 
684 	ti.label = "X";
685 	ti.width = 290.0f;
686 	ti.height = 13.0f;
687 	ti.topleft.Set(10.0f, 6.0f);
688 	ati.SetTextViewInfo(ti);
689 
690 	bi.label = "OK";
691 	bi.width = 75.0f;
692 	bi.height = 30.0f;
693 	bi.topleft.Set(229.0f, 28.0f);
694 	ati.SetButtonInfo(0, bi);
695 
696 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
697 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
698 	ati.SetAlertType(B_EMPTY_ALERT);
699 
700 	ati.GuiInfoTest();
701 }
702 
703 void
704 AlertTest::fortyX_60X_UW_ES_EA()
705 {
706 	AlertTestInfo ati(this);
707 	GuiInfo wi, ti, bi;
708 	wi.label = "alert1";
709 	wi.width = 320.0f;
710 	wi.height = 77.0f;
711 	ati.SetWinInfo(wi);
712 
713 	ti.label = k60X;
714 	ti.width = 300.0f;
715 	ti.height = 26.0f;
716 	ti.topleft.Set(10.0f, 6.0f);
717 	ati.SetTextViewInfo(ti);
718 
719 	bi.label = k40X;
720 	bi.width = 300.0f;
721 	bi.height = 30.0f;
722 	bi.topleft.Set(14.0f, 41.0f);
723 	ati.SetButtonInfo(0, bi);
724 
725 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
726 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
727 	ati.SetAlertType(B_EMPTY_ALERT);
728 
729 	ati.GuiInfoTest();
730 }
731 
732 ////// UW_ES_IA - Two Button //////
733 
734 void
735 AlertTest::OK_Cancel_60X_UW_ES_IA()
736 {
737 	AlertTestInfo ati(this);
738 	GuiInfo wi, ti, bi;
739 	wi.label = "alert1";
740 	wi.width = 310.0f;
741 	wi.height = 77.0f;
742 	ati.SetWinInfo(wi);
743 
744 	ti.label = k60X;
745 	ti.width = 245.0f;
746 	ti.height = 26.0f;
747 	ti.topleft.Set(55.0f, 6.0f);
748 	ati.SetTextViewInfo(ti);
749 
750 	bi.label = "OK";
751 	bi.width = 75.0f;
752 	bi.height = 24.0f;
753 	bi.topleft.Set(148.0f, 44.0f);
754 	ati.SetButtonInfo(0, bi);
755 	bi.label = "Cancel";
756 	bi.width = 75.0f;
757 	bi.height = 30.0f;
758 	bi.topleft.Set(229.0f, 41.0f);
759 	ati.SetButtonInfo(1, bi);
760 
761 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
762 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
763 	ati.SetAlertType(B_INFO_ALERT);
764 
765 	ati.GuiInfoTest();
766 }
767 
768 void
769 AlertTest::twentyX_Cancel_60X_UW_ES_IA()
770 {
771 	AlertTestInfo ati(this);
772 	GuiInfo wi, ti, bi;
773 	wi.label = "alert1";
774 	wi.width = 310.0f;
775 	wi.height = 77.0f;
776 	ati.SetWinInfo(wi);
777 
778 	ti.label = k60X;
779 	ti.width = 245.0f;
780 	ti.height = 26.0f;
781 	ti.topleft.Set(55.0f, 6.0f);
782 	ati.SetTextViewInfo(ti);
783 
784 	bi.label = k20X;
785 	bi.width = 160.0f;
786 	bi.height = 24.0f;
787 	bi.topleft.Set(63.0f, 44.0f);
788 	ati.SetButtonInfo(0, bi);
789 	bi.label = "Cancel";
790 	bi.width = 75.0f;
791 	bi.height = 30.0f;
792 	bi.topleft.Set(229.0f, 41.0f);
793 	ati.SetButtonInfo(1, bi);
794 
795 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
796 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
797 	ati.SetAlertType(B_INFO_ALERT);
798 
799 	ati.GuiInfoTest();
800 }
801 
802 void
803 AlertTest::twentyX_20X_60X_UW_ES_IA()
804 {
805 	AlertTestInfo ati(this);
806 	GuiInfo wi, ti, bi;
807 	wi.label = "alert1";
808 	wi.width = 394.0f;
809 	wi.height = 77.0f;
810 	ati.SetWinInfo(wi);
811 
812 	ti.label = k60X;
813 	ti.width = 329.0f;
814 	ti.height = 26.0f;
815 	ti.topleft.Set(55.0f, 6.0f);
816 	ati.SetTextViewInfo(ti);
817 
818 	bi.label = k20X;
819 	bi.width = 160.0f;
820 	bi.height = 24.0f;
821 	bi.topleft.Set(62.0f, 44.0f);
822 	ati.SetButtonInfo(0, bi);
823 	bi.label = k20X;
824 	bi.width = 160.0f;
825 	bi.height = 30.0f;
826 	bi.topleft.Set(228.0f, 41.0f);
827 	ati.SetButtonInfo(1, bi);
828 
829 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
830 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
831 	ati.SetAlertType(B_INFO_ALERT);
832 
833 	ati.GuiInfoTest();
834 }
835 
836 ////// LW_ES_IA - Two Button //////
837 
838 void
839 AlertTest::empty_empty_X_LW_ES_IA()
840 {
841 	AlertTestInfo ati(this);
842 	GuiInfo wi, ti, bi;
843 	wi.label = "alert1";
844 	wi.width = 310.0f;
845 	wi.height = 64.0f;
846 	ati.SetWinInfo(wi);
847 
848 	ti.label = "X";
849 	ti.width = 245.0f;
850 	ti.height = 13.0f;
851 	ti.topleft.Set(55.0f, 6.0f);
852 	ati.SetTextViewInfo(ti);
853 
854 	bi.label = "";
855 	bi.width = 20.0f;
856 	bi.height = 24.0f;
857 	bi.topleft.Set(258.0f, 31.0f);
858 	ati.SetButtonInfo(0, bi);
859 	bi.label = "";
860 	bi.width = 20.0f;
861 	bi.height = 30.0f;
862 	bi.topleft.Set(284.0f, 28.0f);
863 	ati.SetButtonInfo(1, bi);
864 
865 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
866 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
867 	ati.SetAlertType(B_INFO_ALERT);
868 
869 	ati.GuiInfoTest();
870 }
871 
872 void
873 AlertTest::OK_Cancel_60X_LW_ES_IA()
874 {
875 	AlertTestInfo ati(this);
876 	GuiInfo wi, ti, bi;
877 	wi.label = "alert1";
878 	wi.width = 310.0f;
879 	wi.height = 77.0f;
880 	ati.SetWinInfo(wi);
881 
882 	ti.label = k60X;
883 	ti.width = 245.0f;
884 	ti.height = 26.0f;
885 	ti.topleft.Set(55.0f, 6.0f);
886 	ati.SetTextViewInfo(ti);
887 
888 	bi.label = "OK";
889 	bi.width = 35.0f;
890 	bi.height = 24.0f;
891 	bi.topleft.Set(211.0f, 44.0f);
892 	ati.SetButtonInfo(0, bi);
893 	bi.label = "Cancel";
894 	bi.width = 52.0f;
895 	bi.height = 30.0f;
896 	bi.topleft.Set(252.0f, 41.0f);
897 	ati.SetButtonInfo(1, bi);
898 
899 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
900 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
901 	ati.SetAlertType(B_INFO_ALERT);
902 
903 	ati.GuiInfoTest();
904 }
905 
906 ////// WW_ES_IA - Two Button //////
907 
908 void
909 AlertTest::empty_empty_X_WW_ES_IA()
910 {
911 	AlertTestInfo ati(this);
912 	GuiInfo wi, ti, bi;
913 	wi.width = 310.0f;
914 	wi.height = 64.0f;
915 	ati.SetWinInfo(wi);
916 
917 	ti.label = "X";
918 	ti.width = 245.0f;
919 	ti.height = 13.0f;
920 	ti.topleft.Set(55.0f, 6.0f);
921 	ati.SetTextViewInfo(ti);
922 
923 	bi.label = "";
924 	bi.width = 20.0f;
925 	bi.height = 24.0f;
926 	bi.topleft.Set(258.0f, 31.0f);
927 	ati.SetButtonInfo(0, bi);
928 	bi.label = "";
929 	bi.width = 20.0f;
930 	bi.height = 30.0f;
931 	bi.topleft.Set(284.0f, 28.0f);
932 	ati.SetButtonInfo(1, bi);
933 
934 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
935 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
936 	ati.SetAlertType(B_INFO_ALERT);
937 
938 	ati.GuiInfoTest();
939 }
940 
941 void
942 AlertTest::OK_Cancel_60X_WW_ES_IA()
943 {
944 	AlertTestInfo ati(this);
945 	GuiInfo wi, ti, bi;
946 	wi.width = 310.0f;
947 	wi.height = 77.0f;
948 	ati.SetWinInfo(wi);
949 
950 	ti.label = k60X;
951 	ti.width = 245.0f;
952 	ti.height = 26.0f;
953 	ti.topleft.Set(55.0f, 6.0f);
954 	ati.SetTextViewInfo(ti);
955 
956 	bi.label = "OK";
957 	bi.width = 52.0f;
958 	bi.height = 24.0f;
959 	bi.topleft.Set(194.0f, 44.0f);
960 	ati.SetButtonInfo(0, bi);
961 	bi.label = "Cancel";
962 	bi.width = 52.0f;
963 	bi.height = 30.0f;
964 	bi.topleft.Set(252.0f, 41.0f);
965 	ati.SetButtonInfo(1, bi);
966 
967 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
968 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
969 	ati.SetAlertType(B_INFO_ALERT);
970 
971 	ati.GuiInfoTest();
972 }
973 
974 void
975 AlertTest::twentyX_Cancel_60X_WW_ES_IA()
976 {
977 	AlertTestInfo ati(this);
978 	GuiInfo wi, ti, bi;
979 	wi.width = 394.0f;
980 	wi.height = 77.0f;
981 	ati.SetWinInfo(wi);
982 
983 	ti.label = k60X;
984 	ti.width = 329.0f;
985 	ti.height = 26.0f;
986 	ti.topleft.Set(55.0f, 6.0f);
987 	ati.SetTextViewInfo(ti);
988 
989 	bi.label = k20X;
990 	bi.width = 160.0f;
991 	bi.height = 24.0f;
992 	bi.topleft.Set(62.0f, 44.0f);
993 	ati.SetButtonInfo(0, bi);
994 	bi.label = "Cancel";
995 	bi.width = 160.0f;
996 	bi.height = 30.0f;
997 	bi.topleft.Set(228.0f, 41.0f);
998 	ati.SetButtonInfo(1, bi);
999 
1000 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
1001 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1002 	ati.SetAlertType(B_INFO_ALERT);
1003 
1004 	ati.GuiInfoTest();
1005 }
1006 
1007 void
1008 AlertTest::twentyX_20X_WW_ES_IA()
1009 {
1010 	AlertTestInfo ati(this);
1011 	GuiInfo wi, ti, bi;
1012 	wi.width = 394.0f;
1013 	wi.height = 77.0f;
1014 	ati.SetWinInfo(wi);
1015 
1016 	ti.label = k60X;
1017 	ti.width = 329.0f;
1018 	ti.height = 26.0f;
1019 	ti.topleft.Set(55.0f, 6.0f);
1020 	ati.SetTextViewInfo(ti);
1021 
1022 	bi.label = k20X;
1023 	bi.width = 160.0f;
1024 	bi.height = 24.0f;
1025 	bi.topleft.Set(62.0f, 44.0f);
1026 	ati.SetButtonInfo(0, bi);
1027 	bi.label = k20X;
1028 	bi.width = 160.0f;
1029 	bi.height = 30.0f;
1030 	bi.topleft.Set(228.0f, 41.0f);
1031 	ati.SetButtonInfo(1, bi);
1032 
1033 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
1034 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1035 	ati.SetAlertType(B_INFO_ALERT);
1036 
1037 	ati.GuiInfoTest();
1038 }
1039 
1040 ////// UW_ES_EA - Two Button //////
1041 
1042 void
1043 AlertTest::OK_Cancel_60X_UW_ES_EA()
1044 {
1045 	AlertTestInfo ati(this);
1046 	GuiInfo wi, ti, bi;
1047 	wi.label = "alert1";
1048 	wi.width = 310.0f;
1049 	wi.height = 77.0f;
1050 	ati.SetWinInfo(wi);
1051 
1052 	ti.label = k60X;
1053 	ti.width = 290.0f;
1054 	ti.height = 26.0f;
1055 	ti.topleft.Set(10.0f, 6.0f);
1056 	ati.SetTextViewInfo(ti);
1057 
1058 	bi.label = "OK";
1059 	bi.width = 75.0f;
1060 	bi.height = 24.0f;
1061 	bi.topleft.Set(148.0f, 44.0f);
1062 	ati.SetButtonInfo(0, bi);
1063 	bi.label = "Cancel";
1064 	bi.width = 75.0f;
1065 	bi.height = 30.0f;
1066 	bi.topleft.Set(229.0f, 41.0f);
1067 	ati.SetButtonInfo(1, bi);
1068 
1069 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
1070 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1071 	ati.SetAlertType(B_EMPTY_ALERT);
1072 
1073 	ati.GuiInfoTest();
1074 }
1075 
1076 void
1077 AlertTest::twentyX_20X_60X_UW_ES_EA()
1078 {
1079 	AlertTestInfo ati(this);
1080 	GuiInfo wi, ti, bi;
1081 	wi.label = "alert1";
1082 	wi.width = 349.0f;
1083 	wi.height = 77.0f;
1084 	ati.SetWinInfo(wi);
1085 
1086 	ti.label = k60X;
1087 	ti.width = 329.0f;
1088 	ti.height = 26.0f;
1089 	ti.topleft.Set(10.0f, 6.0f);
1090 	ati.SetTextViewInfo(ti);
1091 
1092 	bi.label = k20X;
1093 	bi.width = 160.0f;
1094 	bi.height = 24.0f;
1095 	bi.topleft.Set(17.0f, 44.0f);
1096 	ati.SetButtonInfo(0, bi);
1097 	bi.label = k20X;
1098 	bi.width = 160.0f;
1099 	bi.height = 30.0f;
1100 	bi.topleft.Set(183.0f, 41.0f);
1101 	ati.SetButtonInfo(1, bi);
1102 
1103 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
1104 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1105 	ati.SetAlertType(B_EMPTY_ALERT);
1106 
1107 	ati.GuiInfoTest();
1108 }
1109 
1110 
1111 ////// UW_ES_IA - Three Button //////
1112 
1113 void
1114 AlertTest::twentyX_20X_20X_60X_UW_ES_IA()
1115 {
1116 	AlertTestInfo ati(this);
1117 	GuiInfo wi, ti, bi;
1118 	wi.label = "alert1";
1119 	wi.width = 563.0f;
1120 	wi.height = 64.0f;
1121 	ati.SetWinInfo(wi);
1122 
1123 	ti.label = k60X;
1124 	ti.width = 498.0f;
1125 	ti.height = 13.0f;
1126 	ti.topleft.Set(55.0f, 6.0f);
1127 	ati.SetTextViewInfo(ti);
1128 
1129 	bi.label = k20X;
1130 	bi.width = 160.0f;
1131 	bi.height = 24.0f;
1132 	bi.topleft.Set(62.0f, 31.0f);
1133 	ati.SetButtonInfo(0, bi);
1134 	bi.label = k20X;
1135 	bi.width = 160.0f;
1136 	bi.height = 24.0f;
1137 	bi.topleft.Set(231.0f, 31.0f);
1138 	ati.SetButtonInfo(1, bi);
1139 	bi.label = k20X;
1140 	bi.width = 160.0f;
1141 	bi.height = 30.0f;
1142 	bi.topleft.Set(397.0f, 28.0f);
1143 	ati.SetButtonInfo(2, bi);
1144 
1145 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
1146 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1147 	ati.SetAlertType(B_INFO_ALERT);
1148 
1149 	ati.GuiInfoTest();
1150 }
1151 
1152 ////// LW_ES_IA - Three Button //////
1153 
1154 void
1155 AlertTest::empty_empty_empty_X_LW_ES_IA()
1156 {
1157 	AlertTestInfo ati(this);
1158 	GuiInfo wi, ti, bi;
1159 	wi.label = "alert1";
1160 	wi.width = 310.0f;
1161 	wi.height = 64.0f;
1162 	ati.SetWinInfo(wi);
1163 
1164 	ti.label = "X";
1165 	ti.width = 245.0f;
1166 	ti.height = 13.0f;
1167 	ti.topleft.Set(55.0f, 6.0f);
1168 	ati.SetTextViewInfo(ti);
1169 
1170 	bi.label = "";
1171 	bi.width = 20.0f;
1172 	bi.height = 24.0f;
1173 	bi.topleft.Set(229.0f, 31.0f);
1174 	ati.SetButtonInfo(0, bi);
1175 	bi.label = "";
1176 	bi.width = 20.0f;
1177 	bi.height = 24.0f;
1178 	bi.topleft.Set(258.0f, 31.0f);
1179 	ati.SetButtonInfo(1, bi);
1180 	bi.label = "";
1181 	bi.width = 20.0f;
1182 	bi.height = 30.0f;
1183 	bi.topleft.Set(284.0f, 28.0f);
1184 	ati.SetButtonInfo(2, bi);
1185 
1186 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
1187 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1188 	ati.SetAlertType(B_INFO_ALERT);
1189 
1190 	ati.GuiInfoTest();
1191 }
1192 
1193 void
1194 AlertTest::Yes_No_Cancel_X_LW_ES_IA()
1195 {
1196 	AlertTestInfo ati(this);
1197 	GuiInfo wi, ti, bi;
1198 	wi.label = "alert1";
1199 	wi.width = 310.0f;
1200 	wi.height = 64.0f;
1201 	ati.SetWinInfo(wi);
1202 
1203 	ti.label = "X";
1204 	ti.width = 245.0f;
1205 	ti.height = 13.0f;
1206 	ti.topleft.Set(55.0f, 6.0f);
1207 	ati.SetTextViewInfo(ti);
1208 
1209 	bi.label = "Yes";
1210 	bi.width = 37.0f;
1211 	bi.height = 24.0f;
1212 	bi.topleft.Set(167.0f, 31.0f);
1213 	ati.SetButtonInfo(0, bi);
1214 	bi.label = "No";
1215 	bi.width = 33.0f;
1216 	bi.height = 24.0f;
1217 	bi.topleft.Set(213.0f, 31.0f);
1218 	ati.SetButtonInfo(1, bi);
1219 	bi.label = "Cancel";
1220 	bi.width = 52.0f;
1221 	bi.height = 30.0f;
1222 	bi.topleft.Set(252.0f, 28.0f);
1223 	ati.SetButtonInfo(2, bi);
1224 
1225 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
1226 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1227 	ati.SetAlertType(B_INFO_ALERT);
1228 
1229 	ati.GuiInfoTest();
1230 }
1231 
1232 void
1233 AlertTest::twentyX_20X_20X_60X_LW_ES_IA()
1234 {
1235 	AlertTestInfo ati(this);
1236 	GuiInfo wi, ti, bi;
1237 	wi.label = "alert1";
1238 	wi.width = 563.0f;
1239 	wi.height = 64.0f;
1240 	ati.SetWinInfo(wi);
1241 
1242 	ti.label = k60X;
1243 	ti.width = 498.0f;
1244 	ti.height = 13.0f;
1245 	ti.topleft.Set(55.0f, 6.0f);
1246 	ati.SetTextViewInfo(ti);
1247 
1248 	bi.label = k20X;
1249 	bi.width = 160.0f;
1250 	bi.height = 24.0f;
1251 	bi.topleft.Set(62.0f, 31.0f);
1252 	ati.SetButtonInfo(0, bi);
1253 	bi.label = k20X;
1254 	bi.width = 160.0f;
1255 	bi.height = 24.0f;
1256 	bi.topleft.Set(231.0f, 31.0f);
1257 	ati.SetButtonInfo(1, bi);
1258 	bi.label = k20X;
1259 	bi.width = 160.0f;
1260 	bi.height = 30.0f;
1261 	bi.topleft.Set(397.0f, 28.0f);
1262 	ati.SetButtonInfo(2, bi);
1263 
1264 	ati.SetButtonWidthMode(B_WIDTH_FROM_LABEL);
1265 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1266 	ati.SetAlertType(B_INFO_ALERT);
1267 
1268 	ati.GuiInfoTest();
1269 }
1270 
1271 ////// WW_ES_IA - Three Button //////
1272 
1273 void
1274 AlertTest::empty_empty_empty_X_WW_ES_IA()
1275 {
1276 	AlertTestInfo ati(this);
1277 	GuiInfo wi, ti, bi;
1278 	wi.width = 310.0f;
1279 	wi.height = 64.0f;
1280 	ati.SetWinInfo(wi);
1281 
1282 	ti.label = "X";
1283 	ti.width = 245.0f;
1284 	ti.height = 13.0f;
1285 	ti.topleft.Set(55.0f, 6.0f);
1286 	ati.SetTextViewInfo(ti);
1287 
1288 	bi.label = "";
1289 	bi.width = 20.0f;
1290 	bi.height = 24.0f;
1291 	bi.topleft.Set(229.0f, 31.0f);
1292 	ati.SetButtonInfo(0, bi);
1293 	bi.label = "";
1294 	bi.width = 20.0f;
1295 	bi.height = 24.0f;
1296 	bi.topleft.Set(258.0f, 31.0f);
1297 	ati.SetButtonInfo(1, bi);
1298 	bi.label = "";
1299 	bi.width = 20.0f;
1300 	bi.height = 30.0f;
1301 	bi.topleft.Set(284.0f, 28.0f);
1302 	ati.SetButtonInfo(2, bi);
1303 
1304 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
1305 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1306 	ati.SetAlertType(B_INFO_ALERT);
1307 
1308 	ati.GuiInfoTest();
1309 }
1310 
1311 void
1312 AlertTest::Monkey_Dog_Cat_X_WW_ES_IA()
1313 {
1314 	AlertTestInfo ati(this);
1315 	GuiInfo wi, ti, bi;
1316 	wi.width = 310.0f;
1317 	wi.height = 64.0f;
1318 	ati.SetWinInfo(wi);
1319 
1320 	ti.label = "X";
1321 	ti.width = 245.0f;
1322 	ti.height = 13.0f;
1323 	ti.topleft.Set(55.0f, 6.0f);
1324 	ati.SetTextViewInfo(ti);
1325 
1326 	bi.label = "Monkey";
1327 	bi.width = 56.0f;
1328 	bi.height = 24.0f;
1329 	bi.topleft.Set(121.0f, 31.0f);
1330 	ati.SetButtonInfo(0, bi);
1331 	bi.label = "Dog";
1332 	bi.width = 56.0f;
1333 	bi.height = 24.0f;
1334 	bi.topleft.Set(186.0f, 31.0f);
1335 	ati.SetButtonInfo(1, bi);
1336 	bi.label = "Cat";
1337 	bi.width = 56.0f;
1338 	bi.height = 30.0f;
1339 	bi.topleft.Set(248.0f, 28.0f);
1340 	ati.SetButtonInfo(2, bi);
1341 
1342 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
1343 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1344 	ati.SetAlertType(B_INFO_ALERT);
1345 
1346 	ati.GuiInfoTest();
1347 }
1348 
1349 void
1350 AlertTest::X_20X_X_WW_ES_IA()
1351 {
1352 	AlertTestInfo ati(this);
1353 	GuiInfo wi, ti, bi;
1354 	wi.width = 563.0f;
1355 	wi.height = 64.0f;
1356 	ati.SetWinInfo(wi);
1357 
1358 	ti.label = "X";
1359 	ti.width = 498.0f;
1360 	ti.height = 13.0f;
1361 	ti.topleft.Set(55.0f, 6.0f);
1362 	ati.SetTextViewInfo(ti);
1363 
1364 	bi.label = "X";
1365 	bi.width = 160.0f;
1366 	bi.height = 24.0f;
1367 	bi.topleft.Set(62.0f, 31.0f);
1368 	ati.SetButtonInfo(0, bi);
1369 	bi.label = k20X;
1370 	bi.width = 160.0f;
1371 	bi.height = 24.0f;
1372 	bi.topleft.Set(231.0f, 31.0f);
1373 	ati.SetButtonInfo(1, bi);
1374 	bi.label = "X";
1375 	bi.width = 160.0f;
1376 	bi.height = 30.0f;
1377 	bi.topleft.Set(397.0f, 28.0f);
1378 	ati.SetButtonInfo(2, bi);
1379 
1380 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
1381 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1382 	ati.SetAlertType(B_INFO_ALERT);
1383 
1384 	ati.GuiInfoTest();
1385 }
1386 
1387 void
1388 AlertTest::Yes_No_Cancel_X_WW_ES_IA()
1389 {
1390 	AlertTestInfo ati(this);
1391 	GuiInfo wi, ti, bi;
1392 	wi.width = 310.0f;
1393 	wi.height = 64.0f;
1394 	ati.SetWinInfo(wi);
1395 
1396 	ti.label = "X";
1397 	ti.width = 245.0f;
1398 	ti.height = 13.0f;
1399 	ti.topleft.Set(55.0f, 6.0f);
1400 	ati.SetTextViewInfo(ti);
1401 
1402 	bi.label = "Yes";
1403 	bi.width = 52.0f;
1404 	bi.height = 24.0f;
1405 	bi.topleft.Set(133.0f, 31.0f);
1406 	ati.SetButtonInfo(0, bi);
1407 	bi.label = "No";
1408 	bi.width = 52.0f;
1409 	bi.height = 24.0f;
1410 	bi.topleft.Set(194.0f, 31.0f);
1411 	ati.SetButtonInfo(1, bi);
1412 	bi.label = "Cancel";
1413 	bi.width = 52.0f;
1414 	bi.height = 30.0f;
1415 	bi.topleft.Set(252.0f, 28.0f);
1416 	ati.SetButtonInfo(2, bi);
1417 
1418 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
1419 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1420 	ati.SetAlertType(B_INFO_ALERT);
1421 
1422 	ati.GuiInfoTest();
1423 }
1424 
1425 void
1426 AlertTest::twentyX_20X_20X_60X_WW_ES_IA()
1427 {
1428 	AlertTestInfo ati(this);
1429 	GuiInfo wi, ti, bi;
1430 	wi.width = 563.0f;
1431 	wi.height = 64.0f;
1432 	ati.SetWinInfo(wi);
1433 
1434 	ti.label = k60X;
1435 	ti.width = 498.0f;
1436 	ti.height = 13.0f;
1437 	ti.topleft.Set(55.0f, 6.0f);
1438 	ati.SetTextViewInfo(ti);
1439 
1440 	bi.label = k20X;
1441 	bi.width = 160.0f;
1442 	bi.height = 24.0f;
1443 	bi.topleft.Set(62.0f, 31.0f);
1444 	ati.SetButtonInfo(0, bi);
1445 	bi.label = k20X;
1446 	bi.width = 160.0f;
1447 	bi.height = 24.0f;
1448 	bi.topleft.Set(231.0f, 31.0f);
1449 	ati.SetButtonInfo(1, bi);
1450 	bi.label = k20X;
1451 	bi.width = 160.0f;
1452 	bi.height = 30.0f;
1453 	bi.topleft.Set(397.0f, 28.0f);
1454 	ati.SetButtonInfo(2, bi);
1455 
1456 	ati.SetButtonWidthMode(B_WIDTH_FROM_WIDEST);
1457 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1458 	ati.SetAlertType(B_INFO_ALERT);
1459 
1460 	ati.GuiInfoTest();
1461 }
1462 
1463 
1464 ////// UW_ES_EA - Three Button //////
1465 
1466 void
1467 AlertTest::twentyX_20X_20X_60X_UW_ES_EA()
1468 {
1469 	AlertTestInfo ati(this);
1470 	GuiInfo wi, ti, bi;
1471 	wi.label = "alert1";
1472 	wi.width = 518.0f;
1473 	wi.height = 64.0f;
1474 	ati.SetWinInfo(wi);
1475 
1476 	ti.label = k60X;
1477 	ti.width = 498.0f;
1478 	ti.height = 13.0f;
1479 	ti.topleft.Set(10.0f, 6.0f);
1480 	ati.SetTextViewInfo(ti);
1481 
1482 	bi.label = k20X;
1483 	bi.width = 160.0f;
1484 	bi.height = 24.0f;
1485 	bi.topleft.Set(17.0f, 31.0f);
1486 	ati.SetButtonInfo(0, bi);
1487 	bi.label = k20X;
1488 	bi.width = 160.0f;
1489 	bi.height = 24.0f;
1490 	bi.topleft.Set(186.0f, 31.0f);
1491 	ati.SetButtonInfo(1, bi);
1492 	bi.label = k20X;
1493 	bi.width = 160.0f;
1494 	bi.height = 30.0f;
1495 	bi.topleft.Set(352.0f, 28.0f);
1496 	ati.SetButtonInfo(2, bi);
1497 
1498 	ati.SetButtonWidthMode(B_WIDTH_AS_USUAL);
1499 	ati.SetButtonSpacingMode(B_EVEN_SPACING);
1500 	ati.SetAlertType(B_EMPTY_ALERT);
1501 
1502 	ati.GuiInfoTest();
1503 }
1504 
1505