Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tests / e4x / extensions / regress-595207.js
1 /*
2  * Any copyright is dedicated to the Public Domain.
3  * http://creativecommons.org/licenses/publicdomain/
4  */
5
6 var summary = "Recognize the function namespace anti-URI";
7 var expect = "1";
8 var actual;
9
10 function alert(s) {
11     actual = String(s);
12 }
13
14 var a = "@mozilla.org/js/function";
15 try {
16     a::alert("1");
17 } catch (e) {
18     <></>.function::['x'];
19     try {
20         a::alert("2 " + e);
21     } catch (e) {
22         alert("3 " + e);
23     }
24 }
25
26 reportCompare(expect, actual, summary);