From 2576b603649bd05cc80d33c22df65252c4a25843 Mon Sep 17 00:00:00 2001
From: Valerie R Young <valerie@bocoup.com>
Date: Thu, 8 Mar 2018 18:23:27 -0500
Subject: [PATCH] TypedArray and Async Iteration bug fixes

---
 .../AsyncFromSyncIteratorPrototype/next/return-promise.js   | 1 -
 .../return/iterator-result-unwrap-promise.js                | 3 ++-
 .../throw/iterator-result-unwrap-promise.js                 | 2 +-
 .../bufferbyteoffset-throws-from-modulo-element-size.js     | 6 ++++++
 .../byteoffset-throws-from-modulo-element-size.js           | 6 ++++++
 5 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/test/built-ins/AsyncFromSyncIteratorPrototype/next/return-promise.js b/test/built-ins/AsyncFromSyncIteratorPrototype/next/return-promise.js
index d3bb1be2f4..f4daeb01bc 100644
--- a/test/built-ins/AsyncFromSyncIteratorPrototype/next/return-promise.js
+++ b/test/built-ins/AsyncFromSyncIteratorPrototype/next/return-promise.js
@@ -12,7 +12,6 @@ info: |
   ...
   18. Return promiseCapability.[[Promise]].
 
-flags: [async]
 features: [async-iteration]
 ---*/
 
diff --git a/test/built-ins/AsyncFromSyncIteratorPrototype/return/iterator-result-unwrap-promise.js b/test/built-ins/AsyncFromSyncIteratorPrototype/return/iterator-result-unwrap-promise.js
index 08ed58ec30..311b93a8f6 100644
--- a/test/built-ins/AsyncFromSyncIteratorPrototype/return/iterator-result-unwrap-promise.js
+++ b/test/built-ins/AsyncFromSyncIteratorPrototype/return/iterator-result-unwrap-promise.js
@@ -60,4 +60,5 @@ iter.next().then(function (result) {
       }).then($DONE, $DONE);
     }
   ).catch($DONE);
-}).then($DONE, $DONE);
+
+}).catch($DONE);
diff --git a/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js b/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js
index 521f513111..f345682393 100644
--- a/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js
+++ b/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js
@@ -62,4 +62,4 @@ iter.next().then(function (result) {
       }).then($DONE, $DONE);
     }
   ).catch($DONE);
-}).then($DONE, $DONE);
+}).catch($DONE);
diff --git a/test/built-ins/TypedArrays/ctors/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrays/ctors/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js
index 1c916b43cd..0a2c1d6572 100644
--- a/test/built-ins/TypedArrays/ctors/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js
+++ b/test/built-ins/TypedArrays/ctors/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js
@@ -22,6 +22,12 @@ features: [TypedArray]
 var buffer = new ArrayBuffer(1);
 
 testWithTypedArrayConstructors(function(TA) {
+
+  // Exclude 8 bit buffers from this tests, as their elementSize = 1
+  if ( TA.name.indexOf("8") > -1 ) {
+    return;
+  }
+
   assert.throws(RangeError, function() {
     new TA(buffer);
   });
diff --git a/test/built-ins/TypedArrays/ctors/buffer-arg/byteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrays/ctors/buffer-arg/byteoffset-throws-from-modulo-element-size.js
index f495e6bcc0..1f68c09b3a 100644
--- a/test/built-ins/TypedArrays/ctors/buffer-arg/byteoffset-throws-from-modulo-element-size.js
+++ b/test/built-ins/TypedArrays/ctors/buffer-arg/byteoffset-throws-from-modulo-element-size.js
@@ -21,6 +21,12 @@ features: [TypedArray]
 var buffer = new ArrayBuffer(8);
 
 testWithTypedArrayConstructors(function(TA) {
+
+  // Exclude 8 bit buffers from this tests, as their elementSize = 1
+  if ( TA.name.indexOf("8") > -1 ) {
+    return;
+  }
+
   assert.throws(RangeError, function() {
     new TA(buffer, 7);
   });
-- 
GitLab