forked from janodvarko/harviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestLoadHarAPI.php
More file actions
41 lines (33 loc) · 1.26 KB
/
testLoadHarAPI.php
File metadata and controls
41 lines (33 loc) · 1.26 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
<?php
require_once("HARTestCase.php");
/**
* Check pageTimings fields. Both these fields (onLoad, onContentLoad)
* are optional and can be omitted.
*/
class HAR_TestLoadHarAPI extends HAR_TestCase
{
public function testViewer()
{
print "\ntestLoadHarAPI.php (1)";
// Open customized viewer.
$this->open($GLOBALS["test_base"]."tests/testLoadHarAPIViewer.html.php");
// Wait for 10 sec to load HAR files.
$this->waitForCondition(
"selenium.browserbot.getCurrentWindow().document.querySelectorAll('.pageTable').length == 3",
30000);
$this->assertElementContainsText("css=.PreviewTab.selected", "Preview");
$this->assertEquals(3, $this->getCssCount(".pageTable"));
}
public function testPreview()
{
print "\ntestLoadHarAPI.php (2)";
// Open customized preview.
$this->open($GLOBALS["test_base"]."tests/testLoadHarAPIPreview.html.php");
// Wait for 10 sec to load HAR files.
$this->waitForCondition(
"selenium.browserbot.getCurrentWindow().document.querySelectorAll('.pageTable').length == 3",
30000);
$this->assertEquals(3, $this->getCssCount(".pageTable"));
}
}
?>