blob: 74b1a187e4d0f33132e53093aeb948e6fe863891 [file] [log] [blame]
importScripts('../../../resources/js-test-pre.js');
description("This test checks whether String.prototype methods correctly handle |this| if |this| becomes worker global scope.");
var global = this;
global.jsTestIsAsync = true;
var error = null;
try {
var charAt = String.prototype.charAt;
charAt();
} catch (e) {
error = e;
}
shouldBe(`String(error)`, `"TypeError: Type error"`);
finishJSTest();