mozilla

Compare Revisions

Gaia Integration tests

Change Revisions

Revision 543469:

Revision 543469 by gaye on

Revision 543475:

Revision 543475 by gaye on

Title:
Gaia Integration tests
Gaia Integration tests
Slug:
Mozilla/Firefox_OS/Platform/Automated_testing/Gaia_integration_tests
Mozilla/Firefox_OS/Platform/Automated_testing/Gaia_integration_tests
Tags:
"tests", "Automation", "Firefox OS", "Integration", "B2G", "Gaia"
"tests", "Automation", "Firefox OS", "Integration", "B2G", "Gaia"
Content:

Revision 543469
Revision 543475
n190    <h3 id="How_should_I_structure_my_ui_test_libraries.3F">n190    <h3 id="How_can_tests_switch_back_to_the_system_app.3F">
tt212    <h3>
213      Regarding all of the many windows and contexts
214    </h3>
215    <p>
216      As you probably already know, gecko makes a distinction bet
 >ween content and&nbsp;<a href="https://developer.mozilla.org/en-U
 >S/Add-ons/SDK/Tutorials/Chrome_Authority">chrome</a> javascript c
 >ontexts. If you would like to jump into chrome context to mock we
 >b apis, access the dev tools, and any number of other things you 
 >can't do in content windows, you need <a href="http://mozilla-b2g
 >.github.io/marionette-js-client/api-docs/classes/Marionette.Clien
 >t.html#method_setContext">Marionette.Client#setContext</a>. If yo
 >u want to expose methods or properties from chrome to code runnin
 >g in content, you need to use <a href="https://developer.mozilla.
 >org/en-US/docs/Mozilla/XPConnect/XPConnect_wrappers#__exposedProp
 >s__">__exposedProps__</a> as we do <a href="https://raw.githubuse
 >rcontent.com/mozilla-b2g/gaia/1f91f202578cfc36937e774fabd8055d768
 >e0128/shared/test/integration/mock_navigator_mozalarms.js">here</
 >a>. Another important thing to know is that to persist data in ja
 >vascript between calls to <a href="http://mozilla-b2g.github.io/m
 >arionette-js-client/api-docs/classes/Marionette.Client.html#metho
 >d_executeScript">Marionette.Client#executeScript</a>, you will ne
 >ed to put things on <a href="https://developer.mozilla.org/en-US/
 >docs/wrappedJSObject">window.wrappedJSObject</a> like we do <a hr
 >ef="https://raw.githubusercontent.com/mozilla-b2g/marionette-apps
 >/36bff7ec841d760ff8adcc6777b84373b4be46e9/lib/scripts/objectcache
 >.js">here</a> in marionette-apps.
217    </p>

Back to History