Commit a8c70c74 a8c70c74df4925b502265e3704fb03427cec02df by Nicolas Perriault

added more tests for frames support

1 parent 1cd9d85f
...@@ -14,13 +14,23 @@ casper.waitForFrame('frame2', function() { ...@@ -14,13 +14,23 @@ casper.waitForFrame('frame2', function() {
14 14
15 casper.withFrame('frame1', function() { 15 casper.withFrame('frame1', function() {
16 this.test.assertTitle('CasperJS frame 1'); 16 this.test.assertTitle('CasperJS frame 1');
17 this.test.assertExists("#f1");
18 this.test.assertDoesntExist("#f2");
19 this.test.assertEval(function() {
20 return '__utils__' in window && 'getBinary' in __utils__;
21 }, '__utils__ object is available in child frame');
17 }); 22 });
18 23
19 casper.withFrame('frame2', function() { 24 casper.withFrame('frame2', function() {
20 this.test.assertTitle('CasperJS frame 2'); 25 this.test.assertTitle('CasperJS frame 2');
26 this.test.assertExists("#f2");
27 this.test.assertDoesntExist("#f1");
28 this.test.assertEval(function() {
29 return '__utils__' in window && 'getBinary' in __utils__;
30 }, '__utils__ object is available in other child frame');
21 }); 31 });
22 32
23 casper.run(function() { 33 casper.run(function() {
24 this.test.assertTitle('CasperJS test frames'); 34 this.test.assertTitle('CasperJS test frames');
25 this.test.done(7); 35 this.test.done(13);
26 }); 36 });
......