browser/components/translations/tests/browser/browser_translations_full_page_language_id_behavior.js
+2
−1
+8
−4
Loading
This patch reworks the way that we assert that the page is translated in Full-Page Translations tests. In addition to ensuring that the translated content matches the expectations, each test now ensures that the TranslationsDocument has fulfilled every translation request that we expect it to, as well as ensures that the intersection-observed nodes within the TranslationsDocument match what we expect, since nodes are no longer observed once they are fully translated (until they are mutated). These changes give us extremely strong correctness guarantees in terms of assurance that the TranslationsDocument algorithms are working as intended, and maintaining their invariants in all cases. Differential Revision: https://phabricator.services.mozilla.com/D249987