New issue
Advanced search Search tips

Issue 701813 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 672152



Sign in to add a comment

should.beResolved vs Audit.loadFileFromUrl

Project Member Reported by rtoy@chromium.org, Mar 15 2017

Issue description

Consider this simple example:

should(Audit.loadFileFromURL('resources/hyper-reality/laughter.wav'),
  'Load file')
  .beResolved()

vs

Audit.loadFileFromURL('resources/hyper-reality/laughter.wav')
  .then(response => {
    should(true, 'Load file').message('resolved', 'oops');
  })

In the latter case, this all works and the message is printed.

In the former case, I get an xhr.status of 0, which seems to indicate a cross-domain access. (Or something; I'm not 100% sure.)
 
Labels: Test-Layout
Owner: hongchan@chromium.org
Status: Started (was: Available)
rtoy@

Wait, you're saying the latter works without the fix?

Comment 3 Deleted

Oh, I don't think the latter is working correctly. The function in then() gets called after the XHR fetching is completed regardless of its success. If you verify the buffer content, it won't be correct.
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/709962cdd9abacd997ca1a884bbccefbcb43c1ad

commit 709962cdd9abacd997ca1a884bbccefbcb43c1ad
Author: hongchan <hongchan@chromium.org>
Date: Wed Mar 22 03:42:52 2017

Allow status = 0 when XHR is completed in Audit.loadFileFromUrl().

Currently Audit.loadFileFromUrl() checks the XHR status rigorously after
its completion. This makes the XHR toward run-webkit-test server fail.
To fix this issue, Audit.loadFileFromUrl() now accepts status = 0 in
the |onload| handler.

This change fixes the silent failure of XHR file fetching, thus enables
some layout tests to do the actual buffer comparison within
run-webkit-test.

BUG= 701813 
TEST=
LayoutTests/webaudio/unit-tests/audit.html
LayoutTests/webaudio/unit-tests/audit-failures.html
LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
LayoutTests/webaudio/Oscillator/osc-sawtooth-sweep-snr.html
LayoutTests/webaudio/Oscillator/osc-sine-sweep-snr.html
LayoutTests/webaudio/Oscillator/osc-square-sweep-snr.html
LayoutTests/webaudio/Oscillator/osc-triangle-sweep-snr.html
LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html

Review-Url: https://codereview.chromium.org/2766883002
Cr-Commit-Position: refs/heads/master@{#458621}

[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-sawtooth-sweep-snr.html
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-sine-sweep-snr.html
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-square-sweep-snr.html
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-triangle-sweep-snr.html
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/resources/oscillator-testing.js
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-expected.txt
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html
[modify] https://crrev.com/709962cdd9abacd997ca1a884bbccefbcb43c1ad/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html

Project Member

Comment 6 by bugdroid1@chromium.org, Mar 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd641d3c73f24f48a5d0a66029b2fcd557f930ab

commit cd641d3c73f24f48a5d0a66029b2fcd557f930ab
Author: horo <horo@chromium.org>
Date: Wed Mar 22 07:04:21 2017

Revert of Allow status = 0 when XHR is completed in Audit.loadFileFromUrl(). (patchset #3 id:80001 of https://codereview.chromium.org/2766883002/ )

Reason for revert:
webaudio/Oscillator/osc-custom-sweep-snr.html is failing

See:  https://crbug.com/704021 

BUG= 704021 

Original issue's description:
> Allow status = 0 when XHR is completed in Audit.loadFileFromUrl().
>
> Currently Audit.loadFileFromUrl() checks the XHR status rigorously after
> its completion. This makes the XHR toward run-webkit-test server fail.
> To fix this issue, Audit.loadFileFromUrl() now accepts status = 0 in
> the |onload| handler.
>
> This change fixes the silent failure of XHR file fetching, thus enables
> some layout tests to do the actual buffer comparison within
> run-webkit-test.
>
> BUG= 701813 
> TEST=
> LayoutTests/webaudio/unit-tests/audit.html
> LayoutTests/webaudio/unit-tests/audit-failures.html
> LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
> LayoutTests/webaudio/Oscillator/osc-sawtooth-sweep-snr.html
> LayoutTests/webaudio/Oscillator/osc-sine-sweep-snr.html
> LayoutTests/webaudio/Oscillator/osc-square-sweep-snr.html
> LayoutTests/webaudio/Oscillator/osc-triangle-sweep-snr.html
> LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html
>
> Review-Url: https://codereview.chromium.org/2766883002
> Cr-Commit-Position: refs/heads/master@{#458621}
> Committed: https://chromium.googlesource.com/chromium/src/+/709962cdd9abacd997ca1a884bbccefbcb43c1ad

TBR=rtoy@chromium.org,hongchan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 701813 

Review-Url: https://codereview.chromium.org/2768773002
Cr-Commit-Position: refs/heads/master@{#458654}

[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-sawtooth-sweep-snr.html
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-sine-sweep-snr.html
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-square-sweep-snr.html
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-triangle-sweep-snr.html
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/resources/oscillator-testing.js
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-expected.txt
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html
[modify] https://crrev.com/cd641d3c73f24f48a5d0a66029b2fcd557f930ab/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html

Project Member

Comment 7 by bugdroid1@chromium.org, Mar 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba

commit a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba
Author: hongchan <hongchan@chromium.org>
Date: Wed Mar 22 16:26:30 2017

Allow status = 0 when XHR is completed in Audit.loadFileFromUrl().

Currently Audit.loadFileFromUrl() checks the XHR status rigorously after
its completion. This makes the XHR toward run-webkit-test server fail.
To fix this issue, Audit.loadFileFromUrl() now accepts status = 0 in
the |onload| handler.

This change fixes the silent failure of XHR file fetching, thus enables
some layout tests to do the actual buffer comparison within
run-webkit-test.

BUG= 701813 ,  704021 
TEST=
LayoutTests/webaudio/unit-tests/audit.html
LayoutTests/webaudio/unit-tests/audit-failures.html
LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
LayoutTests/webaudio/Oscillator/osc-sawtooth-sweep-snr.html
LayoutTests/webaudio/Oscillator/osc-sine-sweep-snr.html
LayoutTests/webaudio/Oscillator/osc-square-sweep-snr.html
LayoutTests/webaudio/Oscillator/osc-triangle-sweep-snr.html
LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html

Review-Url: https://codereview.chromium.org/2766883002
Cr-Original-Commit-Position: refs/heads/master@{#458621}
Committed: https://chromium.googlesource.com/chromium/src/+/709962cdd9abacd997ca1a884bbccefbcb43c1ad
Review-Url: https://codereview.chromium.org/2766883002
Cr-Commit-Position: refs/heads/master@{#458770}

[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-sawtooth-sweep-snr.html
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-sine-sweep-snr.html
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-square-sweep-snr.html
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-triangle-sweep-snr.html
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-contexts.html
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/resources/oscillator-testing.js
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-expected.txt
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html
[modify] https://crrev.com/a0e67dc1313e0e18fe5215ad75e4daa2bedf50ba/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html

Status: Verified (was: Started)

Sign in to add a comment