[Marionette-Helper] Change the way finding window.confirm

RESOLVED WONTFIX

Status

Firefox OS
Gaia
RESOLVED WONTFIX
5 years ago
5 months ago

People

(Reporter: alive, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

https://github.com/alivedise/marionette-helper/blob/master/index.js#L18

In bug 907013 we're going to change the DOM structure of all modal dialogs include alert/confirm/prompt. It's not system shared but app specific then.
That is to say we may don't have a fixed ID for window.confirm.

Sample HTML:

<div loading-state="false" style="background-image: url(&quot;http://uitest.gaiamobile.org:8080/style/icons/Uitest.png&quot;);" data-manifest-name="UI tests" class="appWindow render active" id="AppWindow-0" transition-state="opened"><div style="background-image: url(&quot;blob:ba16622c-a9c6-4b43-bc39-0fe06aea18d4&quot;);" class="screenshot-overlay"></div><div class="fade-overlay"></div><iframe style="background-color: rgb(0, 0, 0);" data-frame-origin="http://uitest.gaiamobile.org:8080" data-frame-type="window" class="browser" id="browser1" data-url="http://uitest.gaiamobile.org:8080/index.html" src="http://uitest.gaiamobile.org:8080/index.html" expecting-system-message="expecting-system-message" mozapp="http://uitest.gaiamobile.org:8080/manifest.webapp" remote="true" name="main" mozbrowser="true" mozallowfullscreen="true"></iframe>
<div class="modal-dialog visible" id="AppModalDialog1"><form class="modal-dialog-alert generic-dialog" role="dialog" tabindex="-1"><div class="modal-dialog-message-container inner"><h3 class="modal-dialog-alert-title"></h3><p><span class="modal-dialog-alert-message"></span></p></div><menu><button class="modal-dialog-alert-ok confirm" data-l10n-id="ok">OK</button></menu></form><form class="modal-dialog-confirm generic-dialog visible" role="dialog" tabindex="-1"><div class="modal-dialog-message-container inner"><h3 class="modal-dialog-confirm-title"></h3><p><span class="modal-dialog-confirm-message">Hello world?</span></p></div><menu data-items="2"><button class="modal-dialog-confirm-cancel cancel" data-l10n-id="cancel">Cancel</button><button class="modal-dialog-confirm-ok confirm" data-l10n-id="ok">OK</button></menu></form><form class="modal-dialog-prompt generic-dialog" role="dialog" tabindex="-1"><div class="modal-dialog-message-container inner"><h3 class="modal-dialog-prompt-title"></h3><p><span class="modal-dialog-prompt-message"></span><input class="modal-dialog-prompt-input"></p></div><menu data-items="2"><button class="modal-dialog-prompt-cancel cancel" data-l10n-id="cancel">Cancel</button><button class="modal-dialog-prompt-ok confirm" data-l10n-id="ok">OK</button></menu></form><form class="modal-dialog-select-one generic-dialog" role="dialog" tabindex="-1"><div class="modal-dialog-message-container inner"><h3 class="modal-dialog-select-one-title"></h3><ul class="modal-dialog-select-one-menu"></ul></div><menu><button class="modal-dialog-select-one-cancel cancel" data-l10n-id="cancel">Cancel</button></menu></form></div></div>
Component: Gaia::System::Window Mgmt → Gaia
https://github.com/mozilla-b2g/marionette-helper/pull/11

I don't know why travis even fails with master :(
Alive,

Thanks for the patch! You have lint errors. Fix them, use Array#some instead of a for loop, wait for the build, and then r=me.
Flags: needinfo?(alive)
It's green now, though my gjslint complains "Line 11, E:0220: No docs found for member 'module.exports'".
Gareth, thanks for checking, I'll merge this after bug 907013 landed.
No longer blocks: 907013
Depends on: 907013
Flags: needinfo?(alive)

Comment 4

5 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.