Index: test/mjsunit/regress/regress-324028.js |
diff --git a/test/intl/break-iterator/protected-icu-internals.js b/test/mjsunit/regress/regress-324028.js |
similarity index 71% |
copy from test/intl/break-iterator/protected-icu-internals.js |
copy to test/mjsunit/regress/regress-324028.js |
index ad1dc54fbedf1f52687834bcbd1c64ee2a1dc4b1..7fe0fcd81f90a58ef19d8dc3c44b99d72f281ea7 100644 |
--- a/test/intl/break-iterator/protected-icu-internals.js |
+++ b/test/mjsunit/regress/regress-324028.js |
@@ -25,25 +25,14 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Internal object we got from native code should not be writable, |
-// configurable or enumerable. One can still change its public properties, but |
-// we don't use them to do actual work. |
+var badObj = { length : 1e40 }; |
-var iterator = new Intl.v8BreakIterator([]); |
- |
-// Direct write should fail. |
-iterator.iterator = {'zzz':'some random object'}; |
- |
-assertFalse(iterator.iterator.hasOwnProperty('zzz')); |
- |
-// Try redefining the property. |
-var didThrow = false; |
-try { |
- Object.defineProperty(iterator, 'iterator', {value: undefined}); |
-} catch(e) { |
- didThrow = true; |
-} |
-assertTrue(didThrow); |
- |
-// Try deleting the property. |
-assertFalse(delete iterator.iterator); |
+assertThrows(function() { new Uint8Array(badObj); }, RangeError); |
+assertThrows(function() { new Uint8ClampedArray(badObj); }, RangeError); |
+assertThrows(function() { new Int8Array(badObj); }, RangeError); |
+assertThrows(function() { new Uint16Array(badObj); }, RangeError); |
+assertThrows(function() { new Int16Array(badObj); }, RangeError); |
+assertThrows(function() { new Uint32Array(badObj); }, RangeError); |
+assertThrows(function() { new Int32Array(badObj); }, RangeError); |
+assertThrows(function() { new Float32Array(badObj); }, RangeError); |
+assertThrows(function() { new Float64Array(badObj); }, RangeError); |