Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
c896a182
Commit
c896a182
authored
Apr 23, 2012
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
increase length of waitfor timeout for phantom
parent
091a97c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
js/tests/phantom.js
js/tests/phantom.js
+3
-3
js/tests/pid.txt
js/tests/pid.txt
+1
-0
No files found.
js/tests/phantom.js
View file @
c896a182
...
...
@@ -2,15 +2,15 @@
// Adapted from Modernizr
function
waitFor
(
testFx
,
onReady
,
timeOutMillis
)
{
var
maxtimeOutMillis
=
timeOutMillis
?
timeOutMillis
:
3001
//< Default Max Timout is 3
s
var
maxtimeOutMillis
=
timeOutMillis
?
timeOutMillis
:
5001
//< Default Max Timout is 5
s
,
start
=
new
Date
().
getTime
()
,
condition
=
false
,
interval
=
setInterval
(
function
()
{
,
interval
=
setInterval
(
function
()
{
if
((
new
Date
().
getTime
()
-
start
<
maxtimeOutMillis
)
&&
!
condition
)
{
// If not time-out yet and condition not yet fulfilled
condition
=
(
typeof
(
testFx
)
===
"
string
"
?
eval
(
testFx
)
:
testFx
())
//< defensive code
}
else
{
if
(
!
condition
)
{
if
(
!
condition
)
{
// If condition still not fulfilled (timeout but condition is 'false')
console
.
log
(
"
'waitFor()' timeout
"
)
phantom
.
exit
(
1
)
...
...
js/tests/pid.txt
0 → 100644
View file @
c896a182
1520
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment