[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska updated ARQGRA-455:
-------------------------------
Description:
If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
*XHR2 request*:
{code:javascript}
function makeXHR2() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "sample1.html", true);
xhr.responseType = 'text';
xhr.onload = $.proxy(function (e) {
switch (e.target.status) {
case 200:
console.log('HTTP 200');
break;
default:
console.log('HTTP 500');
}
var responseContext = {
}
}, this);
xhr.send(null);
}
{code}
In browser console there is an error that states:
{code}
e.target is undefined
{code}
was:
If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
*XHR2 request*:
{code:javascript}
function makeXHR2() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "sample1.html", true);
xhr.responseType = 'text';
xhr.onload = $.proxy(function (e) {
switch (e.target.status) {
case 200:
console.log('HTTP 200');
break;
default:
console.log('HTTP 500');
}
var responseContext = {
}
}, this);
xhr.send(null);
}
{code}
In browser console there is an error that states:
{code}
e.target is undefined
{code}
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska updated ARQGRA-455:
-------------------------------
Description:
If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
*XHR2 request*:
{code:javascript}
function makeXHR2() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "sample1.html", true);
xhr.responseType = 'text';
xhr.onload = $.proxy(function (e) {
switch (e.target.status) {
case 200:
console.log('HTTP 200');
break;
default:
console.log('HTTP 500');
}
var responseContext = {
}
}, this);
xhr.send(null);
}
{code}
In browser console there is an error that states:
{code}
e.target is undefined
{code}
was:
If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
*XHR2 request*:
{code:javascript}
function makeXHR2() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "sample1.html", true);
xhr.responseType = 'text';
xhr.onload = $.proxy(function (e) {
switch (e.target.status) {
case 200:
console.log('HTTP 200');
break;
default:
console.log('HTTP 500');
}
var responseContext = {
}
}, this);
xhr.send(null);
}
{code}
In browser console there is an error that states:
{code}
e.target is undefined
{code}
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska commented on ARQGRA-455:
------------------------------------
Hey [~okiss] , you are JS ninja, any insight or hint please ?
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska edited comment on ARQGRA-455 at 7/21/14 10:34 AM:
--------------------------------------------------------------
Hey [~okiss] , you are JS ninja recently adding the XHR2 support. Any insight or hint please ?
was (Author: jhuska):
Hey [~okiss] , you are JS ninja, any insight or hint please ?
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska commented on ARQGRA-455:
------------------------------------
When I am comparing the content of the {{e}} argument which is passed to the callback, I get following:
* *Without* using of {{guardAjax}}
{code}
load { target: XMLHttpRequest, lengthComputable: true, loaded: 33893, total: 33893, isTrusted: true, eventPhase: 0, bubbles: false, cancelable: false, defaultPrevented: false, timeStamp: 1405946241825187, originalTarget: XMLHttpRequest }
{code}
* *With* using of {{guardAjax}}
{code}
Object { guarded: true, callbackCount: 0, changeState: enhanceXhrObject/xhr.changeState(), tryFinish: enhanceXhrObject/xhr.tryFinish(), proceedWithCallbacks: enhanceXhrObject/xhr.proceedWithCallbacks(), isGuarded: enhanceXhrObject/xhr.isGuarded(), xhr: XMLHttpRequest, readyState: 4, response: "", responseType: "", 10 more… }
{code}
Which gives me impression that {{e}} is the XHR request itself when using {{guardAjax}}, instead of the right version, where {{e.target}} is the XHR request.
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska updated ARQGRA-455:
-------------------------------
Steps to Reproduce:
# clone [this|https://github.com/arquillian/arquillian-graphene/tree/ARQGRA-455] branch.
# from module _ftest_ run: {{mvn clean verify -Pwebdriver-firefox -Dtest=TestXHR2OnloadAsProxy}}
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska commented on ARQGRA-455:
------------------------------------
Reproducer and test added to this branch:
https://github.com/arquillian/arquillian-graphene/tree/ARQGRA-455
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska updated ARQGRA-455:
-------------------------------
Description:
If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
*XHR2 request*:
{code:javascript}
function makeXHR2() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "sample1.html", true);
xhr.responseType = 'text';
xhr.onload = $.proxy(function (e) {
switch (e.target.status) {
case 200:
console.log('HTTP 200');
break;
default:
console.log('HTTP 500');
}
var responseContext = {
}
}, this);
xhr.send(null);
}
{code}
In browser console there is an error that states:
{code}
e.target is undefined
{code}
was:
If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
*XHR2 request*:
{code:javascript}
function makeXHR2() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "sample1.html", true);
xhr.responseType = 'text';
xhr.onload = $.proxy(function (e) {
switch (e.target.status) {
case 200:
console.log('HTTP 200');
break;
default:
console.log('HTTP 500');
}
var responseContext = {
}
}, this);
xhr.send(null);
}
{code}
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
Juraj Húska created ARQGRA-455:
----------------------------------
Summary: Guarded XHR2 request fails when its onload callback is JQuery proxy
Key: ARQGRA-455
URL: https://issues.jboss.org/browse/ARQGRA-455
Project: Arquillian Graphene
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: core
Affects Versions: 2.0.3.Final
Reporter: Juraj Húska
If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
*XHR2 request*:
{code:javascript}
function makeXHR2() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "sample1.html", true);
xhr.responseType = 'text';
xhr.onload = $.proxy(function (e) {
switch (e.target.status) {
case 200:
console.log('HTTP 200');
break;
default:
console.log('HTTP 500');
}
var responseContext = {
}
}, this);
xhr.send(null);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months
[JBoss JIRA] (ARQ-1824) Support Google Inc.:Google APIs (x86 System Image):19 format
by Karel Piwko (JIRA)
Karel Piwko created ARQ-1824:
--------------------------------
Summary: Support Google Inc.:Google APIs (x86 System Image):19 format
Key: ARQ-1824
URL: https://issues.jboss.org/browse/ARQ-1824
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Extension - Droidium
Affects Versions: droidium_1.0.0.Alpha5
Reporter: Karel Piwko
With new version format in Android SDK, we need to alter parsing options to support '()' in target format.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 6 months