1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/uconv/tests/unit/test_bug713519.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,19 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +function run_test() { 1.9 + let svc = Components.classes["@mozilla.org/charset-converter-manager;1"] 1.10 + .getService(Components.interfaces.nsICharsetConverterManager); 1.11 + 1.12 + // Ensure normal calls to getCharsetAlias do work. 1.13 + do_check_eq(svc.getCharsetAlias("Windows-1255"), "windows-1255"); 1.14 + 1.15 + try { 1.16 + svc.getCharsetAlias("no such thing"); 1.17 + do_throw("Calling getCharsetAlias with invalid value should throw."); 1.18 + } 1.19 + catch (ex) { 1.20 + // The exception is expected. 1.21 + } 1.22 +}