11cb0ef41Sopenharmony_ci<!DOCTYPE html>
21cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script>
31cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script>
41cb0ef41Sopenharmony_ci<script>
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_citest(() => {
71cb0ef41Sopenharmony_ci  const decoder = new TextDecoder('utf-8');
81cb0ef41Sopenharmony_ci  const buffer = new SharedArrayBuffer(4);
91cb0ef41Sopenharmony_ci  assert_throws_js(TypeError, () => {
101cb0ef41Sopenharmony_ci    decoder.decode(new Uint8Array(buffer));
111cb0ef41Sopenharmony_ci  }, 'constructing TextDecoder with SharedArrayBuffer view should throw');
121cb0ef41Sopenharmony_ci}, 'decoding SharedArrayBuffer');
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ci</script>
15