OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --ignition --side-effect-free-debug-evaluate | 5 // Flags: --ignition --side-effect-free-debug-evaluate |
6 | 6 |
7 Debug = debug.Debug | 7 Debug = debug.Debug |
8 | 8 |
9 var exception = null; | 9 var exception = null; |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 if (typeof String.prototype[f] === "function") { | 47 if (typeof String.prototype[f] === "function") { |
48 // Do not expect locale-specific or regexp-related functions to work. | 48 // Do not expect locale-specific or regexp-related functions to work. |
49 // {Lower,Upper}Case (Locale-specific or not) do not work either. | 49 // {Lower,Upper}Case (Locale-specific or not) do not work either. |
50 if (f.indexOf("locale") >= 0) continue; | 50 if (f.indexOf("locale") >= 0) continue; |
51 if (f.indexOf("Lower") >= 0) continue; | 51 if (f.indexOf("Lower") >= 0) continue; |
52 if (f.indexOf("Upper") >= 0) continue; | 52 if (f.indexOf("Upper") >= 0) continue; |
53 if (f == "normalize") continue; | 53 if (f == "normalize") continue; |
54 if (f == "match") continue; | 54 if (f == "match") continue; |
55 if (f == "search") continue; | 55 if (f == "search") continue; |
56 if (f == "split") continue; | 56 if (f == "split") continue; |
| 57 if (f == "replace") continue; |
57 success("abcd"[f](2), `"abcd".${f}(2);`); | 58 success("abcd"[f](2), `"abcd".${f}(2);`); |
58 } | 59 } |
59 } | 60 } |
60 fail("'abCd'.toLowerCase()"); | 61 fail("'abCd'.toLowerCase()"); |
61 fail("'abcd'.toUpperCase()"); | 62 fail("'abcd'.toUpperCase()"); |
62 fail("'abCd'.toLocaleLowerCase()"); | 63 fail("'abCd'.toLocaleLowerCase()"); |
63 fail("'abcd'.toLocaleUpperCase()"); | 64 fail("'abcd'.toLocaleUpperCase()"); |
64 fail("'abcd'.match(/a/)"); | 65 fail("'abcd'.match(/a/)"); |
65 fail("'abcd'.replace(/a/)"); | 66 fail("'abcd'.replace(/a/)"); |
66 fail("'abcd'.search(/a/)"); | 67 fail("'abcd'.search(/a/)"); |
(...skipping 10 matching lines...) Expand all Loading... |
77 // Add the debug event listener. | 78 // Add the debug event listener. |
78 Debug.setListener(listener); | 79 Debug.setListener(listener); |
79 | 80 |
80 function f() { | 81 function f() { |
81 debugger; | 82 debugger; |
82 }; | 83 }; |
83 | 84 |
84 f(); | 85 f(); |
85 | 86 |
86 assertNull(exception); | 87 assertNull(exception); |
OLD | NEW |