forked from janodvarko/harviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestEmbeddedInvalidPreview.php
More file actions
51 lines (37 loc) · 2.16 KB
/
Copy pathtestEmbeddedInvalidPreview.php
File metadata and controls
51 lines (37 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
require_once("HARTestCase.php");
/**
* Check custom time stamps generated by console.timeStamp() method.
*/
class HAR_TestEmbeddedInvalidPreview extends HAR_TestCase
{
public function testEmbeddedInvalidPreview1()
{
print "\ntestEmbeddedInvalidPreview.php (1)";
$viewer_base = $GLOBALS["harviewer_base"];
$test_base = $GLOBALS["test_base"];
$this->open($GLOBALS["test_base"]."tests/testEmbeddedInvalidPreview1.html.php");
$document = "selenium.browserbot.getCurrentWindow().document.";
$this->waitForCondition($document."querySelectorAll('iframe').length == 1", 10000);
$this->waitForCondition($document."querySelector('#preview').firstChild.contentDocument.querySelectorAll('.errorTable').length == 1", 10000);
$script1 = $document."querySelector('#preview').firstChild.contentDocument.querySelectorAll('.errorRow').length";
$this->assertEquals("1", $this->getEval($script1));
$script2 = $document."querySelector('#preview').firstChild.contentDocument.querySelectorAll('.errorProperty').length";
$this->assertEquals("1", $this->getEval($script2));
$script3 = $document."querySelector('#preview').firstChild.contentDocument.querySelectorAll('.errorMessage').length";
$this->assertEquals("1", $this->getEval($script3));
}
public function testEmbeddedInvalidPreview2()
{
print "\ntestEmbeddedInvalidPreview.php (2)";
$viewer_base = $GLOBALS["harviewer_base"];
$test_base = $GLOBALS["test_base"];
$this->open($GLOBALS["test_base"]."tests/testEmbeddedInvalidPreview2.html.php");
$document = "selenium.browserbot.getCurrentWindow().document.";
$this->waitForCondition($document."querySelectorAll('iframe').length == 1", 10000);
$this->waitForCondition($document."querySelector('#preview').firstChild.contentDocument.querySelectorAll('.pageTable').length == 1", 10000);
$script1 = $document."querySelector('#preview').firstChild.contentDocument.querySelectorAll('.netRow').length";
$this->assertEquals("49", $this->getEval($script1));
}
}
?>