[PUSH] Fix lifetime of the hasPermission callback in layout Tests.

The promise needs to be created before calling the client for
layout tests to work, it does not seem to be an issue in real code.

BUG=401424

Review URL: https://codereview.chromium.org/709733003

git-svn-id: svn://svn.chromium.org/blink/trunk@185049 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Exposing correct state for summary element depending on open attribute.

Mac:
In the Mac accessibility API on the summary element (AXDisclosureTriangle), set AXExpanded property to NO.
When the details element content is shown, on the summary element (AXDisclosureTriangle), set theAXExpanded property to YES.

Win:
In the IA2 accessibility API on the summary element (ROLE_SYSTEM_PUSHBUTTON), set STATE_SYSTEM_COLLAPSED.
When the details element content is shown, on the summary element (ROLE_SYSTEM_PUSHBUTTON), set STATE_SYSTEM_EXPANDED.

How hidden nd show states is reflected for details element?
The hidden and shown states of the details element content is reflected by the absence or presence of the open attribute.

This is in accordance with the spec http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#summary-and-details-elements

BUG=282016

Review URL: https://codereview.chromium.org/712983002

git-svn-id: svn://svn.chromium.org/blink/trunk@185050 bbb929c8-8fbe-4397-9dbb-9b2b20218538