@@ -509,6 +509,7 @@ title: Your new Proton site
509
509
// Super simple test framework.
510
510
var T = {
511
511
test: null ,
512
+ alerted: false ,
512
513
513
514
run : function (tests ) {
514
515
var self = this ;
@@ -519,15 +520,16 @@ title: Your new Proton site
519
520
var fn = tests[test];
520
521
var obj = {};
521
522
if (tests ._setup ) tests ._setup .apply (obj);
522
- fn .apply (obj, [ function (val ) { self .assert (val, test); } ]);
523
+ fn .apply (obj, [ function (val ) { self .assert (val, test, this ); } ]);
523
524
}
524
525
}
525
526
},
526
527
527
- assert : function (value , test ) {
528
+ assert : function (value , test , T ) {
528
529
if (! value) {
529
530
console .error (test, " - Assertion failed." );
530
531
console .trace ();
532
+ if (! T .alerted ) alert (" An assertion failed. See the console for details." );
531
533
}
532
534
}
533
535
};
@@ -576,6 +578,20 @@ title: Your new Proton site
576
578
a (this .div .css (' translate' ) == [' 300em' ,' 400em' ]);
577
579
},
578
580
581
+ scale_1 : function (a ) {
582
+ this .div .css (' scale' , [2 ,3 ]);
583
+ var s = this .div .css (' scale' );
584
+
585
+ a (s .length == 2 );
586
+ a (s[0 ] == 2 );
587
+ a (s[1 ] == 3 );
588
+ },
589
+
590
+ scale_2 : function (a ) {
591
+ this .div .css (' scale' , [2.5 , 2.5 ]);
592
+ a (this .div .css (' scale' ) == 2.5 );
593
+ },
594
+
579
595
transform_object : function (a ) {
580
596
this .div .css (' x' , ' 40px' );
581
597
this .div .css (' y' , ' 90px' );
0 commit comments