Bug 1408044 - stop using about.dtd as an example in firefox-ui/puppeteer/marionette docs/tests, r?whimboo draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 14 Nov 2017 23:37:04 +0000
changeset 700580 468b920dcc3675d9bf68f6b38c73eaff69e2b22e
parent 700576 5c48b5edfc4ca945a2eaa5896454f3f4efa9052a
child 700581 a7100bb6a8d402b1f7f9f7ed018b9d7f4a8c74c4
push id89894
push usergijskruitbosch@gmail.com
push dateMon, 20 Nov 2017 13:11:38 +0000
reviewerswhimboo
bugs1408044
milestone59.0a1
Bug 1408044 - stop using about.dtd as an example in firefox-ui/puppeteer/marionette docs/tests, r?whimboo MozReview-Commit-ID: 4zog9pSgCs9
testing/firefox-ui/tests/puppeteer/test_l10n.py
testing/marionette/client/marionette_driver/localization.py
testing/marionette/driver.js
testing/marionette/l10n.js
--- a/testing/firefox-ui/tests/puppeteer/test_l10n.py
+++ b/testing/firefox-ui/tests/puppeteer/test_l10n.py
@@ -12,28 +12,28 @@ from marionette_harness import Marionett
 class TestL10n(PuppeteerMixin, MarionetteTestCase):
 
     def setUp(self):
         super(TestL10n, self).setUp()
 
         self.l10n = L10n(self.marionette)
 
     def test_dtd_entity_chrome(self):
-        dtds = ['chrome://global/locale/about.dtd',
+        dtds = ['chrome://branding/locale/brand.dtd',
                 'chrome://browser/locale/baseMenuOverlay.dtd']
 
         value = self.l10n.localize_entity(dtds, 'helpSafeMode.label')
         elm = self.marionette.find_element(By.ID, 'helpSafeMode')
         self.assertEqual(value, elm.get_attribute('label'))
 
         self.assertRaises(NoSuchElementException,
                           self.l10n.localize_entity, dtds, 'notExistent')
 
     def test_dtd_entity_content(self):
-        dtds = ['chrome://global/locale/about.dtd',
+        dtds = ['chrome://branding/locale/brand.dtd',
                 'chrome://global/locale/aboutSupport.dtd']
 
         value = self.l10n.localize_entity(dtds, 'aboutSupport.pageTitle')
 
         self.marionette.set_context(self.marionette.CONTEXT_CONTENT)
         self.marionette.navigate('about:support')
 
         elm = self.marionette.find_element(By.TAG_NAME, 'h1')
--- a/testing/marionette/client/marionette_driver/localization.py
+++ b/testing/marionette/client/marionette_driver/localization.py
@@ -12,17 +12,17 @@ class L10n(object):
     .property files. Both types of elements can be identifed via a unique id,
     and the translated content retrieved.
 
     For example::
 
         from marionette_driver.localization import L10n
         l10n = L10n(marionette)
 
-        l10n.localize_entity(["chrome://global/locale/about.dtd"], "about.version")
+        l10n.localize_entity(["chrome://branding/locale/brand.dtd"], "brandShortName")
         l10n.localize_property(["chrome://global/locale/findbar.properties"], "FastFind"))
 
     .. _localization: https://mzl.la/2eUMjyF
     """
 
     def __init__(self, marionette):
         self._marionette = marionette
 
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -3491,17 +3491,17 @@ GeckoDriver.prototype.responseCompleted 
     this.curBrowser.pendingCommands = [];
   }
 };
 
 /**
  * Retrieve the localized string for the specified entity id.
  *
  * Example:
- *     localizeEntity(["chrome://global/locale/about.dtd"], "about.version")
+ *     localizeEntity(["chrome://branding/locale/brand.dtd"], "brandShortName")
  *
  * @param {Array.<string>} urls
  *     Array of .dtd URLs.
  * @param {string} id
  *     The ID of the entity to retrieve the localized string for.
  *
  * @return {string}
  *     The localized string for the requested entity.
--- a/testing/marionette/l10n.js
+++ b/testing/marionette/l10n.js
@@ -30,17 +30,17 @@ this.EXPORTED_SYMBOLS = ["l10n"];
 
 /** @namespace */
 this.l10n = {};
 
 /**
  * Retrieve the localized string for the specified entity id.
  *
  * Example:
- *     localizeEntity(["chrome://global/locale/about.dtd"], "about.version")
+ *     localizeEntity(["chrome://branding/locale/brand.dtd"], "brandShortName")
  *
  * @param {Array.<string>} urls
  *     Array of .dtd URLs.
  * @param {string} id
  *     The ID of the entity to retrieve the localized string for.
  *
  * @return {string}
  *     The localized string for the requested entity.