FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
php-webdriver/test/VideoTest.php at master · drupalmind/php-webdriver · GitHub
drupalmind
/
php-webdriver
Public
forked from
Element-34/php-webdriver
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
php-webdriver
/
test
/
VideoTest.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
101 lines (86 loc) · 3.29 KB
Breadcrumbs
php-webdriver
/
test
/
VideoTest.php
Copy path
File metadata and controls
101 lines (86 loc) · 3.29 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
require_once
(
dirname
(
__FILE__
) .
'
/../PHPWebDriver/Support/HTML5/Video.php
'
);
require_once
(
dirname
(
__FILE__
) .
'
/../PHPWebDriver/WebDriver.php
'
);
class
VideoTest
extends
PHPUnit_Framework_TestCase {
protected
static
$
session
;
public
static
function
setUpBeforeClass
() {
$
driver
=
new
PHPWebDriver_WebDriver
();
self
::
$
session
=
$
driver
->
session
();
// firefox
self
::
$
session
->
open
(
"
http://html5demos.com/video
"
);
}
public
static
function
tearDownAfterClass
() {
self
::
$
session
->
close
();
}
public
function
testGetHeight
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
0
,
$
v
->
height
);
}
public
function
testSetHeight
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
v
->
height
=
600
;
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
600
,
$
v
->
height
);
}
public
function
testGetWidth
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
0
,
$
v
->
width
);
}
public
function
testSetWidth
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
v
->
width
=
600
;
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
600
,
$
v
->
width
);
}
public
function
testGetVideoHeight
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
360
,
$
v
->
videoHeight
);
}
public
function
testGetVideoWidth
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
480
,
$
v
->
videoWidth
);
}
public
function
testGetPoster
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
''
,
$
v
->
poster
);
}
public
function
testSetPoster
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
v
->
poster
=
"
http://foo.com/bar.png
"
;
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
"
http://foo.com/bar.png
"
,
$
v
->
poster
);
}
/**
* @expectedException PHPWebDriver_ObsoleteElementWebDriverError
*/
public
function
testStaleAttribute
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
v
->
height
=
600
;
$
this
->
assertEquals
(
600
,
$
v
->
height
);
}
public
function
testGetParentProperty
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
this
->
assertEquals
(
"
metadata
"
,
$
v
->
preload
);
}
/**
* @expectedException UnexpectedValueException
*/
public
function
testWrongType
() {
$
e
=
self
::
$
session
->
element
(
"
tag name
"
,
'
video
'
);
$
v
=
new
PHPWebDriver_WebDriver_Support_HTML5_Video
(
$
e
);
$
v
->
height
=
"
600
"
;
}
}
?>
Back
|
FazBrowse Home
|
New Git URL