forked from janodvarko/harviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestPageTimings.php
More file actions
28 lines (24 loc) · 995 Bytes
/
Copy pathtestPageTimings.php
File metadata and controls
28 lines (24 loc) · 995 Bytes
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
<?php
require_once("HARTestCase.php");
/**
* Check pageTimings fields. Both these fields (onLoad, onContentLoad)
* are optional and can be omitted.
*/
class HAR_TestPageTimings extends HAR_TestCase
{
public function testPageTimings()
{
print "\ntestPageTimings.php";
$viewer_base = $GLOBALS["harviewer_base"];
$test_base = $GLOBALS["test_base"];
// Put together URL that specifies a test HAR file to load.
// Example of the result URL:
// http://legoas/har/viewer/?path=http://legoas/har/viewer/selenium/tests/hars/noPageTimings.har
$url = $viewer_base."?path=".$test_base."tests/hars/noPageTimings.har";
$this->open($url);
// The Preview tab must be selected and example HAR file loaded.
$this->assertElementContainsText("css=.PreviewTab.selected", "Preview");
$this->assertElementContainsText("css=.pageName", "http://127.0.0.1:1235/slow-css.html");
}
}
?>