1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/xpconnect/tests/unit/test_bug451678.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,18 @@ 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 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +const Cc = Components.classes; 1.9 +const Ci = Components.interfaces; 1.10 + 1.11 +function run_test() { 1.12 + var file = do_get_file("bug451678_subscript.js"); 1.13 + var ios = Cc["@mozilla.org/network/io-service;1"] 1.14 + .getService(Ci.nsIIOService); 1.15 + var uri = ios.newFileURI(file); 1.16 + var scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"] 1.17 + .getService(Ci.mozIJSSubScriptLoader); 1.18 + var srvScope = {}; 1.19 + scriptLoader.loadSubScript(uri.spec, srvScope); 1.20 + do_check_true('makeTags' in srvScope && srvScope.makeTags instanceof Function); 1.21 +}