Last Comment Bug 746868 - Some subtests in test_doc.html fail with Bug 695480
: Some subtests in test_doc.html fail with Bug 695480
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla15
Assigned To: alexander :surkov
:
Mentors:
Depends on:
Blocks: hueyfix
  Show dependency treegraph
 
Reported: 2012-04-18 20:42 PDT by Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
Modified: 2012-04-25 20:33 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Test disabling (1.23 KB, patch)
2012-04-18 20:42 PDT, Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
no flags Details | Diff | Splinter Review
patch (2.34 KB, patch)
2012-04-25 02:40 PDT, alexander :surkov
mzehe: review+
Details | Diff | Splinter Review

Description Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-04-18 20:42:38 PDT
Created attachment 616442 [details] [diff] [review]
Test disabling

See the attached patch for the three failures.
Comment 1 Marco Zehe (:MarcoZ) 2012-04-19 02:48:32 PDT
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.
Comment 2 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-04-19 03:45:22 PDT
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.
Comment 3 Marco Zehe (:MarcoZ) 2012-04-19 05:18:10 PDT
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.
Comment 4 alexander :surkov 2012-04-22 21:00:08 PDT
(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?
Comment 5 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-04-23 20:03:50 PDT
(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.
Comment 6 alexander :surkov 2012-04-24 00:52:52 PDT
(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.
Comment 7 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-04-24 06:51:00 PDT
Running test_doc.html: http://khuey.pastebin.mozilla.org/1593587
Comment 8 alexander :surkov 2012-04-24 22:13:24 PDT
(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.
Comment 9 alexander :surkov 2012-04-25 02:40:38 PDT
Created attachment 618195 [details] [diff] [review]
patch
Comment 10 alexander :surkov 2012-04-25 02:43:52 PDT
(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?
Comment 12 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-04-25 11:37:48 PDT
Thanks for digging in here!
Comment 13 alexander :surkov 2012-04-25 19:53:19 PDT
yw!
Comment 14 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-04-25 20:33:50 PDT
https://hg.mozilla.org/mozilla-central/rev/6071b7a2cb39

Note You need to log in before you can comment on or make changes to this bug.