Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Issue 59903016: LayoutTests/resources/js-test.js onerror tweak. (Closed)

Created:
7 years, 1 month ago by pwnall-personal
Modified:
7 years, 1 month ago
Reviewers:
ojan
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

LayoutTests/resources/js-test.js onerror tweak. Previously, the onerror handler set up by js-test.js in LayoutTests did not call finishJSTest(). If an error was thrown in an async test, testRunner.notifyDone() was never called, causing a timeout. This change makes async tests terminate immediately when an unexpected error occurs, making it easier/faster to debug async tests. Tests that expect unhandled errors to be thrown (usually signaled by calling shouldHaveHadError()) must now call expectError() before the errors will be thrown. This change updates existing tests that use shouldHaveHadErrors(). BUG=164933 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161860

Patch Set 1 #

Patch Set 2 : Added opt-out for new behavior, fixed layout tests. #

Patch Set 3 : Updated expectation to own test. #

Patch Set 4 : Retrying failed upload. #

Patch Set 5 : Updated test expectations with new FAIL message. #

Total comments: 3

Patch Set 6 : Removed setTimeout from js-tests changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -55 lines) Patch
M LayoutTests/fast/dom/Geolocation/callback-exception-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/shadow/tab-order-iframe-and-shadow-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/fast/harness/error-in-async-test.html View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/fast/harness/error-in-async-test-expected.txt View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/fast/harness/expected-error-in-async-test.html View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/fast/harness/expected-error-in-async-test-expected.txt View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/fast/js/const-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/js/i18n-bindings-locale-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/js/kde/garbage-n.html View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M LayoutTests/fast/js/kde/script-tests/TEMPLATE-n.html View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M LayoutTests/fast/js/kde/string-1-n.html View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M LayoutTests/fast/js/kde/string-2-n.html View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M LayoutTests/fast/parser/entity-end-script-tag.html View 1 2 3 1 chunk +6 lines, -8 lines 0 comments Download
M LayoutTests/fast/parser/entity-end-script-tag-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/img-blocked-no-gc-crash-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/resources/js-test.js View 1 2 3 4 5 4 chunks +37 lines, -10 lines 0 comments Download
M LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt View 1 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/exception-in-event-aborts.js View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/svg/dom/SVGViewSpec-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
pwnall-personal
Can you please take a look? This is a little tweak to js-test.js that makes ...
7 years, 1 month ago (2013-11-08 07:19:31 UTC) #1
ojan
I like the direction this change is going. Unfortunately, this doesn't quite work as is ...
7 years, 1 month ago (2013-11-08 18:37:23 UTC) #2
pwnall-personal
On 2013/11/08 18:37:23, ojan wrote: > I like the direction this change is going. Unfortunately, ...
7 years, 1 month ago (2013-11-10 05:21:18 UTC) #3
ojan
https://codereview.chromium.org/59903016/diff/220001/LayoutTests/resources/js-test.js File LayoutTests/resources/js-test.js (right): https://codereview.chromium.org/59903016/diff/220001/LayoutTests/resources/js-test.js#newcode109 LayoutTests/resources/js-test.js:109: setTimeout(finishJSTest, 0); Why the setTimeout?
7 years, 1 month ago (2013-11-11 20:22:29 UTC) #4
pwnall-personal
https://codereview.chromium.org/59903016/diff/220001/LayoutTests/resources/js-test.js File LayoutTests/resources/js-test.js (right): https://codereview.chromium.org/59903016/diff/220001/LayoutTests/resources/js-test.js#newcode109 LayoutTests/resources/js-test.js:109: setTimeout(finishJSTest, 0); On 2013/11/11 20:22:29, ojan wrote: > Why ...
7 years, 1 month ago (2013-11-11 22:45:33 UTC) #5
ojan
https://codereview.chromium.org/59903016/diff/220001/LayoutTests/resources/js-test.js File LayoutTests/resources/js-test.js (right): https://codereview.chromium.org/59903016/diff/220001/LayoutTests/resources/js-test.js#newcode109 LayoutTests/resources/js-test.js:109: setTimeout(finishJSTest, 0); On 2013/11/11 22:45:34, pwnall wrote: > On ...
7 years, 1 month ago (2013-11-11 23:30:41 UTC) #6
pwnall-personal
On 2013/11/11 23:30:41, ojan wrote: > setTimeout often leads to test flakiness. We try to ...
7 years, 1 month ago (2013-11-12 10:19:56 UTC) #7
pwnall-personal
On 2013/11/12 10:19:56, pwnall wrote: > On 2013/11/11 23:30:41, ojan wrote: > > setTimeout often ...
7 years, 1 month ago (2013-11-12 10:22:08 UTC) #8
ojan
lgtm > Also, what do you think about checking for console.error and calling it with ...
7 years, 1 month ago (2013-11-12 22:04:52 UTC) #9
pwnall-personal
On 2013/11/12 22:04:52, ojan wrote: > lgtm > > > Also, what do you think ...
7 years, 1 month ago (2013-11-12 22:06:06 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/costan@gmail.com/59903016/270003
7 years, 1 month ago (2013-11-12 22:41:40 UTC) #11
commit-bot: I haz the power
7 years, 1 month ago (2013-11-12 23:59:58 UTC) #12
Message was sent while issue was closed.
Change committed as 161860

Powered by Google App Engine
This is Rietveld 408576698