Closed Bug 1449499 Opened 6 years ago Closed 6 years ago

Intermittent /webdriver/tests/fullscreen_window.py | test_handle_prompt_missing_value - JavascriptErrorException: javascript error (500): ReferenceError: accept1 is not defined

Categories

(Testing :: geckodriver, defect, P1)

defect

Tracking

(firefox60 fixed, firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox60 --- fixed
firefox61 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

Running the test locally fails with:

>         if response.status != 200:
> >           raise error.from_response(response)
> E           JavascriptErrorException: javascript error (500): ReferenceError: accept1 is not defined
> E
> E           Remote-end stacktrace:
> E
> E           execute_script @, line 0
> E           inline javascript, line 1
> E           src: "undefined"
> E           Stack:
> E           @http://web-platform.test:8000/webdriver/tests/support/inline.py?doc=%3Ctitle%3EWD+doc+title%3C%2Ftitle%3E&content-type=text%2Fhtml%3Bcharset%3Dutf-8:1:15
> E           @http://web-platform.test:8000/webdriver/tests/support/inline.py?doc=%3Ctitle%3EWD+doc+title%3C%2Ftitle%3E&content-type=text%2Fhtml%3Bcharset%3Dutf-8:1:2
> 
> body       = {'args': [], 'script': 'return accept1;'}
> method     = 'POST'
> response   = <Response status=500 error=<JavascriptErrorException http_status=500>>
> self       = <webdriver.client.Session object at 0x10f00d390>
> url        = 'session/8a9cee76-bf44-9740-99c4-f5113fadff46/execute/sync'
> 
> testing/web-platform/tests/tools/webdriver/webdriver/client.py:435: JavascriptErrorException

Sadly this failure is not noticed because we marked the test as expected failure due to the unfinished alert handling. And as such it is never reported as actual failure on Treeherder, and causes following tests (see bug 1396180) to fail.
Blocks: 1396180
The line which fails here is:

https://hg.mozilla.org/mozilla-central/annotate/b906009d875d1f5d29b0d1252cdb43a9b1a5889c/testing/web-platform/tests/webdriver/tests/fullscreen_window.py#l124

> assert read_global(session, "accept1") == None

It was added via bug 1388036 when the fullscreen tests have been added.

So `accept1` is clearly not defined because the value gets assigned as `dismiss1`:

> create_dialog("alert", text="dismiss #1", result_var="dismiss1")
(In reply to Henrik Skupin (:whimboo) from comment #0)
> Sadly this failure is not noticed because we marked the test as expected
> failure due to the unfinished alert handling. And as such it is never

Well, I was wrong! The failure was only flagged as expected because of THIS javascript error. It basically should not have happened. We should analyze failures more carefully to prevent those situations. I will remove the unexpected fail from the manifest file.
Attachment #8963028 - Flags: review?(james)
Comment on attachment 8963028 [details]
Bug 1449499 - Fix fullscreen_window.py:test_handle_prompt_missing_value for wrong dialog reference.

https://reviewboard.mozilla.org/r/231868/#review237458
Attachment #8963028 - Flags: review+
Attachment #8963028 - Flags: review?(james)
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/282fa6844858
Fix fullscreen_window.py:test_handle_prompt_missing_value for wrong dialog reference. r=ato
Summary: Intermittent TEST-UNEXPECTED-FAILURE | /webdriver/tests/fullscreen_window.py | test_handle_prompt_missing_value - JavascriptErrorException: javascript error (500): ReferenceError: accept1 is not defined → Intermittent /webdriver/tests/fullscreen_window.py | test_handle_prompt_missing_value - JavascriptErrorException: javascript error (500): ReferenceError: accept1 is not defined
https://hg.mozilla.org/mozilla-central/rev/282fa6844858
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Typo in a test which caused us to inappropriately disable a test. Lets uplift this test-only patch to beta. Thanks.
Whiteboard: [checkin-needed-beta]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: