browser/devtools/tilt/test/browser_tilt_utils02.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/devtools/tilt/test/browser_tilt_utils02.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,21 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +"use strict";
     1.7 +
     1.8 +function test() {
     1.9 +  let l10 = TiltUtils.L10n;
    1.10 +  ok(l10, "The TiltUtils.L10n wasn't found.");
    1.11 +
    1.12 +
    1.13 +  ok(l10.stringBundle,
    1.14 +    "The necessary string bundle wasn't found.");
    1.15 +  is(l10.get(), null,
    1.16 +    "The get() function shouldn't work if no params are passed.");
    1.17 +  is(l10.format(), null,
    1.18 +    "The format() function shouldn't work if no params are passed.");
    1.19 +
    1.20 +  is(typeof l10.get("initWebGL.error"), "string",
    1.21 +    "No valid string was returned from a corect name in the bundle.");
    1.22 +  is(typeof l10.format("linkProgram.error", ["error"]), "string",
    1.23 +    "No valid formatted string was returned from a name in the bundle.");
    1.24 +}

mercurial