1 Tests focus when a modal dialog is opened.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS document.activeElement is outerButton
7 Test that focus goes to body if the dialog has no focusable elements, including itself
8 PASS document.activeElement is document.body
9 Test that an autofocus element in the dialog gets focus.
10 PASS document.activeElement is autofocusButton
11 ... or else first focusable element in the dialog gets focus.
12 PASS document.activeElement is firstButton
13 ... or else the dialog itself gets focus.
14 PASS document.activeElement is dialog
15 PASS successfullyParsed is true