if (!TypedArrays.isSupported()) {
// TODO: some way of showing test as skipped in this case?
return;
}
String str = "\u0001\u0000\u0080\u0081";
ArrayBuffer buf = JsUtils.arrayBufferFromString(str);
Uint8Array view = TypedArrays.createUint8Array(buf);
assertEquals(4, buf.byteLength());
assertEquals(1, view.get(0));
assertEquals(0, view.get(1));
assertEquals(128, view.get(2));
assertEquals(129, view.get(3));
}