Bug 819639 - Part c: Add a test for the EventSource constructor in a sandbox.

This commit is contained in:
Ms2ger 2012-12-22 09:17:05 +01:00
parent 5a0d506bc4
commit e69cb81dbf

View File

@ -209,6 +209,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=741267
} catch (e) {
ok(false, "Should be able to create a WebSocket in a sandbox " + e);
}
try {
var es = Components.utils.evalInSandbox('var es = new EventSource("about:blank"); es', sandbox);
// Test that we actually got a EventSource object, probably
is(es.url, "about:blank", "What is this object?");
} catch (e) {
ok(false, "Should be able to create an EventSource in a sandbox " + e);
}
SimpleTest.finish();
}