Closed Bug 746868 Opened 12 years ago Closed 12 years ago

Some subtests in test_doc.html fail with Bug 695480

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: khuey, Assigned: surkov)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Test disabling (obsolete) — Splinter Review
See the attached patch for the three failures.
So what exactly does bug 695480 do that makes these tests fail? I'm strictly against just disabling these tests since this is an indication that something may break us (and therefore screen readers) because of the patch in that bug.
Bug 695480 makes it so that you can't touch DOM objects in a Window (including nodes, etc) after the Window is navigated.  I'm not sure whether the bugs here are in the test or in the browser UI somewhere.  Unfortunately I can't really figure out what the tests are testing, so I was hoping someone on the a11y team could dig in here.
The tests perform all sorts of mutations on a document inside an iframe. The first of the ones that you disabled opens a new doc inside an iframe and tests whether the accessible tree built from the resulting DOM tree is what we expected, and if certain events are fired before testing that tree. The next one closes that same thing and checks whether afterwards, the tree conforms to the new expectations, mainly that the contents is gone. And the last test youdisabled tests whether content gets provided correctly if nodes are inserted without the document actually having a body element.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #2)
> Bug 695480 makes it so that you can't touch DOM objects in a Window
> (including nodes, etc) after the Window is navigated.

Could you give JS example?

>  I'm not sure whether
> the bugs here are in the test or in the browser UI somewhere.  Unfortunately
> I can't really figure out what the tests are testing, so I was hoping
> someone on the a11y team could dig in here.

failure log please?
(In reply to alexander :surkov from comment #4)
> (In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #2)
> > Bug 695480 makes it so that you can't touch DOM objects in a Window
> > (including nodes, etc) after the Window is navigated.
> 
> Could you give JS example?

Sure:

let win = window.open();
let documentElement = win.document.documentElement;
win.close();
documentElement.nodeType; // This now throws, because you can't touch things inside the window after it is closed.

> >  I'm not sure whether
> > the bugs here are in the test or in the browser UI somewhere.  Unfortunately
> > I can't really figure out what the tests are testing, so I was hoping
> > someone on the a11y team could dig in here.
> 
> failure log please?

The failure mode is just a timeout.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #5)
> > failure log please?
> The failure mode is just a timeout.

the log contains some extra info (it shows which test timed out) but please add
gA11yEventDumpToConsole = true;
to test_doc.html to log more details.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #7)
> Running test_doc.html: http://khuey.pastebin.mozilla.org/1593587

thank you. I can't spot anything evident in events.js why events comparison could fail (we just compare pointers to accessible objects) so I'm going to make a local build with bug 695480 patch applied to see what happens.
Attached patch patchSplinter Review
Assignee: nobody → surkov.alexander
Attachment #616442 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #618195 - Flags: review?(marco.zehe)
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #5)
> (In reply to alexander :surkov from comment #4)
> > (In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #2)
> > > Bug 695480 makes it so that you can't touch DOM objects in a Window
> > > (including nodes, etc) after the Window is navigated.
> > 
> > Could you give JS example?
> 
> Sure:
> 
> let win = window.open();
> let documentElement = win.document.documentElement;
> win.close();
> documentElement.nodeType; // This now throws, because you can't touch things
> inside the window after it is closed.

do I understand right, that's applicable to DOM node JS wrapper objects only?
Attachment #618195 - Flags: review?(marco.zehe) → review+
Thanks for digging in here!
yw!
https://hg.mozilla.org/mozilla-central/rev/6071b7a2cb39
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: