mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00
Backed out changeset fdf9ccb0b9ab (bug 1347801) for browser_all_files_referenced.js failures a=backout
MozReview-Commit-ID: EiSV0Jreid4
This commit is contained in:
parent
9b7a22f870
commit
cd50c88082
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'MessageContext.jsm',
|
||||
]
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
@ -1,39 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function run_test() {
|
||||
const { MessageContext } = Components.utils.import("resource://gre/modules/MessageContext.jsm", {});
|
||||
|
||||
test_methods_presence(MessageContext);
|
||||
test_methods_calling(MessageContext);
|
||||
|
||||
ok(true);
|
||||
}
|
||||
|
||||
function test_methods_presence(MessageContext) {
|
||||
const ctx = new MessageContext(["en-US", "pl"]);
|
||||
equal(typeof ctx.addMessages, "function");
|
||||
equal(typeof ctx.format, "function");
|
||||
equal(typeof ctx.formatToParts, "function");
|
||||
}
|
||||
|
||||
function test_methods_calling(MessageContext) {
|
||||
const ctx = new MessageContext(["en-US", "pl"], {
|
||||
useIsolating: false
|
||||
});
|
||||
ctx.addMessages("key = Value");
|
||||
|
||||
const msg = ctx.getMessage("key");
|
||||
equal(ctx.format(msg), "Value");
|
||||
deepEqual(ctx.formatToParts(msg), ["Value"]);
|
||||
|
||||
ctx.addMessages("key2 = Hello { $name }");
|
||||
|
||||
const msg2 = ctx.getMessage("key2");
|
||||
equal(ctx.format(msg2, { name: "Amy" }), "Hello Amy");
|
||||
deepEqual(ctx.formatToParts(msg2), ["Hello ", {
|
||||
value: "name",
|
||||
opts: undefined
|
||||
}]);
|
||||
ok(true);
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
[DEFAULT]
|
||||
head =
|
||||
|
||||
[test_messagecontext.js]
|
@ -16,7 +16,6 @@ DIRS += [
|
||||
'lwbrk',
|
||||
'strres',
|
||||
'unicharutil',
|
||||
'l10n',
|
||||
]
|
||||
|
||||
DIRS += [
|
||||
|
Loading…
x
Reference in New Issue
Block a user