tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

translator.https.window.js (679B)


      1 // META: title=Translator tests
      2 // META: global=window
      3 // META: timeout=long
      4 // META: script=../resources/util.js
      5 // META: script=/resources/testdriver.js
      6 // META: script=resources/util.js
      7 //
      8 // Setting `timeout=long` as this test may require downloading the translation
      9 // library and the language models.
     10 
     11 promise_test(async t => {
     12  // Can pass in valid but unsupported languages since the create monitor error
     13  // should be thrown before language support is checked.
     14  await testCreateMonitorCallbackThrowsError(
     15      t, createTranslator, {sourceLanguage: 'und', targetLanguage: 'und'});
     16 }, 'If monitor throws an error, LanguageDetector.create() rejects with that error');