Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
90646423
...
906464239aa8fa8e5ab31d5b93aa34a8a8f0f6f9
authored
2013-11-14 16:41:13 +0100
by
Laurent Jouanneau
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fixed jshint issues
1 parent
23fcb8e9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
modules/casper.js
modules/clientutils.js
tests/suites/http_status.js
modules/casper.js
View file @
9064642
...
...
@@ -925,16 +925,16 @@ Casper.prototype.getPageContent = function getPageContent() {
if
(
!
head
||
!
body
)
{
return
null
;
}
if
(
head
.
childNodes
.
length
==
0
&&
if
(
head
.
childNodes
.
length
==
=
0
&&
body
.
childNodes
.
length
===
1
&&
__utils__
.
findOne
(
'body pre[style]'
))
{
return
__utils__
.
findOne
(
'body pre'
).
textContent
.
trim
();
}
if
(
head
.
childNodes
.
length
===
1
&&
body
.
childNodes
.
length
===
1
&&
head
.
childNodes
[
0
].
localName
==
'link'
&&
head
.
childNodes
[
0
].
getAttribute
(
'href'
)
==
'resource://gre-resources/plaintext.css'
&&
body
.
childNodes
[
0
].
localName
==
'pre'
)
{
head
.
childNodes
[
0
].
localName
==
=
'link'
&&
head
.
childNodes
[
0
].
getAttribute
(
'href'
)
==
=
'resource://gre-resources/plaintext.css'
&&
body
.
childNodes
[
0
].
localName
==
=
'pre'
)
{
return
body
.
childNodes
[
0
].
textContent
.
trim
();
}
return
null
;
...
...
modules/clientutils.js
View file @
9064642
...
...
@@ -619,7 +619,7 @@
var
center_x
=
1
,
center_y
=
1
;
try
{
var
pos
=
elem
.
getBoundingClientRect
();
center_x
=
Math
.
floor
((
pos
.
left
+
pos
.
right
)
/
2
)
,
center_x
=
Math
.
floor
((
pos
.
left
+
pos
.
right
)
/
2
)
;
center_y
=
Math
.
floor
((
pos
.
top
+
pos
.
bottom
)
/
2
);
}
catch
(
e
)
{}
evt
.
initMouseEvent
(
type
,
true
,
true
,
window
,
1
,
1
,
1
,
center_x
,
center_y
,
false
,
false
,
false
,
false
,
0
,
elem
);
...
...
tests/suites/http_status.js
View file @
9064642
...
...
@@ -27,9 +27,9 @@ casper.test.begin("HTTP status code handling", 163, {
this
.
testCodes
.
push
(
118
);
}
if
(
utils
.
ltVersion
(
phantom
.
version
,
'1.9.0'
)
||
utils
.
gteVersion
(
phantom
.
version
,
'1.9.2'
)
||
isGecko
)
{
if
(
utils
.
ltVersion
(
phantom
.
version
,
'1.9.0'
)
||
utils
.
gteVersion
(
phantom
.
version
,
'1.9.2'
)
||
isGecko
)
{
// https://github.com/ariya/phantomjs/issues/11163
this
.
testCodes
=
this
.
testCodes
.
concat
([
400
,
401
,
402
,
403
,
404
,
405
,
406
,
407
,
409
,
410
,
411
,
412
,
413
,
...
...
Please
register
or
sign in
to post a comment