~osomon/firefox/firefox.disco-geckodriver

« back to all changes in this revision

Viewing changes to debian/testing/extra/xpcshell/package-tests/test_ubuntu_searchplugins.js

  • Committer: Olivier Tilloy
  • Date: 2019-06-03 13:16:42 UTC
  • Revision ID: olivier.tilloy@canonical.com-20190603131642-d0doihfpjua018ek
* Stop building firefox-testsuite (LP: #1805019)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
function do_test(aLocale, aCallback)
2
 
{
3
 
  do_test_pending();
4
 
  do_print("Starting test for " + aLocale);
5
 
  do_run_test_in_subprocess_with_params("test_ubuntu_searchplugins_real.js",
6
 
                                        { "_SEARCHPLUGIN_TEST_LOCALE": aLocale },
7
 
                                        null, function(aSuccess) {
8
 
    do_check_true(aSuccess);
9
 
    do_print("Finished test for " + aLocale);
10
 
    aCallback();
11
 
    do_test_finished();
12
 
  });
13
 
}
14
 
 
15
 
function run_test()
16
 
{
17
 
  _XPCSHELL_PROCESS = "parent";
18
 
 
19
 
  let istream = Services.io.newChannelFromURI(Services.io.newFileURI(do_get_file("data/locales.shipped"))).open();
20
 
 
21
 
  let line = { value: "" };
22
 
  let tests = [];
23
 
  while (istream.readLine(line)) {
24
 
    if (!line.value.match(/^\s*#.*/)) {
25
 
      tests.push(line.value.replace(/^([^:]*).*/, "$1"));
26
 
    }
27
 
  }
28
 
 
29
 
  run_tests_async(tests, do_test);
30
 
}