blob: d8ae74d4eaf12c49409299cef14d56032697f330 [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5assertEquals('', ''.normalize());
6assertTrue(delete Array.prototype.indexOf);
7assertEquals('', ''.normalize());
8
9assertThrows(function() { ''.normalize('invalid'); }, RangeError);
10assertTrue(delete Array.prototype.join);
11assertThrows(function() { ''.normalize('invalid'); }, RangeError);
12
13// All of these toString to an invalid form argument.
14assertThrows(function() { ''.normalize(null) }, RangeError);
15assertThrows(function() { ''.normalize(true) }, RangeError);
16assertThrows(function() { ''.normalize(false) }, RangeError);
17assertThrows(function() { ''.normalize(42) }, RangeError);
18assertThrows(function() { ''.normalize({}) }, RangeError);
19assertThrows(function() { ''.normalize([]) }, RangeError);