summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Terrier <b.terrier@gmail.com>2022-06-04 00:31:42 +0200
committerBenjamin Terrier <b.terrier@gmail.com>2022-08-22 19:12:33 +0000
commita0efb7e1ab1cee24c387abe1897ff18fa116c17d (patch)
treec6d9e4b5352d5900b79a77d5d8a919d7b34ae3c0
parent7d1cf05c547a636495b2731c4fc2842a01849064 (diff)
downloadqtdeclarative-testsuites-dev.tar.gz
Update ArrayBuffer.byteLength test for detached ArrayBufferHEADdev
ECMAScript 2021 (ES12) changed the behavior of byteLength of detached ArrayBuffer. Task-number: QTBUG-103925 Change-Id: If407e2093f7716e4bbbacfff9e9e7af248c22ee8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--test/built-ins/ArrayBuffer/prototype/byteLength/detached-buffer.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/built-ins/ArrayBuffer/prototype/byteLength/detached-buffer.js b/test/built-ins/ArrayBuffer/prototype/byteLength/detached-buffer.js
index 6a80c08a2..a0a224361 100644
--- a/test/built-ins/ArrayBuffer/prototype/byteLength/detached-buffer.js
+++ b/test/built-ins/ArrayBuffer/prototype/byteLength/detached-buffer.js
@@ -1,15 +1,15 @@
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
-es6id: 24.1.4.1
+es12id: 25.1.5.1
esid: sec-get-arraybuffer.prototype.bytelength
description: Returns 0 if the buffer is detached
info: |
- 24.1.4.1 get ArrayBuffer.prototype.byteLength
+ 25.1.5.1 get ArrayBuffer.prototype.byteLength
1. Let O be the this value.
...
- 4. If IsDetachedBuffer(O) is true, throw a TypeError exception.
+ 4. If IsDetachedBuffer(O) is true, return 0.
...
includes: [detachArrayBuffer.js]
---*/
@@ -18,6 +18,4 @@ var ab = new ArrayBuffer(1);
$DETACHBUFFER(ab);
-assert.throws(TypeError, function() {
- ab.byteLength;
-});
+assert.sameValue(ab.byteLength, 0);