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

Issue 36913002: test.py: Sending JSON between test_controller.js <-> browser_controller (Closed)

Created:
7 years, 2 months ago by kustermann
Modified:
7 years, 1 month ago
Reviewers:
ricow1, Bill Hesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

test.py: Sending JSON between test_controller.js <-> browser_controller Currently test.py will look for FAIL/PASS messages in the DOM to determine if a test has failed or not. test_controller.js will add these PASS/FAIL messages to the DOM (in addition to other messages). This approach has several issues: - The test itself could create nodes in the DOM containing FAIL/PASS. This means that the outcome of a test cannot be reliably determined. - The test ifself can remove nodes from the DOM (e.g. setting document.body.innerHTML). This could result in a situation where the stacktraces/... test_controller.js prints to the DOM are lost. - It is unclear which parts of the DOM we see in test failure messages (reported by test.py) come from the test itself and which parts come from test_controller.js. This CL tries to fix this by recording all events that happend with global variables in test_controller.js and send back a JSON string with information about - debug messages - posted messages - print() calls of the test - DOM - errors (from window.onerror, script.onerror ...) Furthermore this CL fixes unittest to report unittest-suite-success/unittest-suite-fail instead of unittest-suite-done (which is broken). R=ricow@google.com Committed: https://code.google.com/p/dart/source/detail?r=30407

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Total comments: 60

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+542 lines, -43 lines) Patch
M dart/tests/html/html.status View 1 2 6 chunks +1 line, -6 lines 0 comments Download
M dart/tools/testing/dart/browser_controller.dart View 1 1 chunk +5 lines, -3 lines 0 comments Download
M dart/tools/testing/dart/browser_test.dart View 1 2 4 chunks +13 lines, -7 lines 0 comments Download
A dart/tools/testing/dart/test_controller.js View 1 2 1 chunk +261 lines, -0 lines 0 comments Download
M dart/tools/testing/dart/test_runner.dart View 1 2 4 chunks +215 lines, -27 lines 0 comments Download
M dart/tools/testing/dart/utils.dart View 1 2 1 chunk +47 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
kustermann
Request for initial comments. This CL is not ready yet.
7 years, 2 months ago (2013-10-23 10:03:34 UTC) #1
ricow1
Since we are making a bunch of changes in the unittest package we should coordinate ...
7 years, 2 months ago (2013-10-23 11:42:32 UTC) #2
kustermann
https://codereview.chromium.org/36913002/diff/130001/dart/pkg/unittest/lib/unittest.dart File dart/pkg/unittest/lib/unittest.dart (left): https://codereview.chromium.org/36913002/diff/130001/dart/pkg/unittest/lib/unittest.dart#oldcode782 dart/pkg/unittest/lib/unittest.dart:782: _config.onDone(passed > 0 && failed == 0 && errors ...
7 years, 1 month ago (2013-11-14 13:43:31 UTC) #3
ricow1
https://codereview.chromium.org/36913002/diff/130001/dart/pkg/unittest/lib/unittest.dart File dart/pkg/unittest/lib/unittest.dart (right): https://codereview.chromium.org/36913002/diff/130001/dart/pkg/unittest/lib/unittest.dart#newcode782 dart/pkg/unittest/lib/unittest.dart:782: _config.onDone(failed == 0 && errors == 0 && _uncaughtErrorMessage ...
7 years, 1 month ago (2013-11-14 14:42:26 UTC) #4
ricow1
A few more comments, just for my clarification here: This will not fix the issue ...
7 years, 1 month ago (2013-11-15 07:26:33 UTC) #5
Bill Hesse
https://codereview.chromium.org/36913002/diff/130001/dart/tools/testing/dart/browser_controller.dart File dart/tools/testing/dart/browser_controller.dart (right): https://codereview.chromium.org/36913002/diff/130001/dart/tools/testing/dart/browser_controller.dart#newcode679 dart/tools/testing/dart/browser_controller.dart:679: final String lastKnownMessage; Comment here on format (JSON?) https://codereview.chromium.org/36913002/diff/130001/dart/tools/testing/dart/browser_test.dart ...
7 years, 1 month ago (2013-11-15 11:24:03 UTC) #6
kustermann
https://codereview.chromium.org/36913002/diff/130001/dart/tests/html/html.status File dart/tests/html/html.status (right): https://codereview.chromium.org/36913002/diff/130001/dart/tests/html/html.status#newcode8 dart/tests/html/html.status:8: dromaeo_smoke_test: Skip, Fail, Pass # Issue 14521 On 2013/11/14 ...
7 years, 1 month ago (2013-11-19 10:06:10 UTC) #7
ricow1
LGTM https://codereview.chromium.org/36913002/diff/320001/dart/tools/testing/dart/test_runner.dart File dart/tools/testing/dart/test_runner.dart (right): https://codereview.chromium.org/36913002/diff/320001/dart/tools/testing/dart/test_runner.dart#newcode933 dart/tools/testing/dart/test_runner.dart:933: // JSON format. So we can't parse it. ...
7 years, 1 month ago (2013-11-19 11:55:36 UTC) #8
kustermann
7 years, 1 month ago (2013-11-19 12:54:50 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 manually as r30407 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698