summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/regex/script-tests/cross-frame-callable.js
blob: 2d880a64b1444ffd872e13dfdf6c19c1506e01b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function doTest(childRegExp)
{
    re = childRegExp;
    shouldThrow("re('a')");
    shouldBe("re.exec('a')", "['a']");
}

var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
iframe.contentDocument.write('<script>top.doTest(/a/)</script>');
iframe.contentDocument.close();
document.write('DONE');