Follow-up patch 4 to bug 1041631 part 1 - Fix two more tests to pass in builds where Symbol is not defined. r=efaust, a=philor.

--HG--
extra : rebase_source : 62cc2eb36e3c579878f08adfdb88b46a5e6fd420
extra : amend_source : 46624c7c283cb8689867cda3ae86bdf7ad429d27
This commit is contained in:
Jason Orendorff 2014-08-31 20:33:22 -05:00
parent a2c5c75f32
commit 0f6b9ace2c
2 changed files with 27 additions and 18 deletions

View File

@ -75,26 +75,29 @@ let inputTests = [
output: "/foobar/",
inspectable: true,
},
// 9
{
input: "Symbol()",
output: "Symbol()"
},
// 10
{
input: "Symbol('foo')",
output: "Symbol(foo)"
},
// 11
{
input: "Symbol.iterator",
output: "Symbol(Symbol.iterator)"
},
];
if (typeof Symbol !== "undefined") {
inputTests.push(
// 9
{
input: "Symbol()",
output: "Symbol()"
},
// 10
{
input: "Symbol('foo')",
output: "Symbol(foo)"
},
// 11
{
input: "Symbol.iterator",
output: "Symbol(Symbol.iterator)"
});
}
longString = initialString = null;
function test() {

View File

@ -23,6 +23,12 @@ function run_test() {
}
function* testSymbols(client, debuggee) {
// Symbol is conditionally defined. If it isn't defined in this build, just pass.
if (typeof Symbol === "undefined") {
finishClient(client);
return;
}
const evalCode = () => {
Components.utils.evalInSandbox(
"(" + function () {