3 Copyright (c) 2014 Intel Corporation.
5 Redistribution and use in source and binary forms, with or without modification,
6 are permitted provided that the following conditions are met:
8 * Redistributions of works must retain the original copyright notice, this lis
9 of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the original copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
13 * Neither the name of Intel Corporation nor the names of its contributors
14 may be used to endorse or promote products derived from this work withou
15 specific prior written permission.
17 THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
18 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
21 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 Xu,Liyu <liyux.xu@intel.com>
34 <title>Typed Arrays Test: Uint8Array_constructor_ArrayBuffer_byteOffset_length</title>
35 <link rel="author" title="Intel" href="http://www.intel.com" />
36 <link rel="help" href="https://www.khronos.org/registry/typedarray/specs/1.0/#7" />
37 <meta name="flags" content="" />
38 <meta name="assert" content="Verify the constructor(arraybuffer, byteOffset, length) of Uint8Array" />
39 <script src="../resources/testharness.js"></script>
40 <script src="../resources/testharnessreport.js"></script>
47 var a = new ArrayBuffer(10);
48 var b = new Uint8Array(a, 2, 5);
49 assert_true(b instanceof Uint8Array);