Bug 1408044 - stop using about.dtd as an example in firefox-ui/puppeteer/marionette docs/tests, r?whimboo
MozReview-Commit-ID: 4zog9pSgCs9
--- 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.