| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 for (f of Object.getOwnPropertyNames(String.prototype)) { | 46 for (f of Object.getOwnPropertyNames(String.prototype)) { |
| 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" || f == "replace") { | 56 if (f == "split") continue; |
| 57 fail(`'abcd'.${f}(2)`); | |
| 58 continue; | |
| 59 } | |
| 60 success("abcd"[f](2), `"abcd".${f}(2);`); | 57 success("abcd"[f](2), `"abcd".${f}(2);`); |
| 61 } | 58 } |
| 62 } | 59 } |
| 63 fail("'abCd'.toLowerCase()"); | 60 fail("'abCd'.toLowerCase()"); |
| 64 fail("'abcd'.toUpperCase()"); | 61 fail("'abcd'.toUpperCase()"); |
| 65 fail("'abCd'.toLocaleLowerCase()"); | 62 fail("'abCd'.toLocaleLowerCase()"); |
| 66 fail("'abcd'.toLocaleUpperCase()"); | 63 fail("'abcd'.toLocaleUpperCase()"); |
| 67 fail("'abcd'.match(/a/)"); | 64 fail("'abcd'.match(/a/)"); |
| 68 fail("'abcd'.replace(/a/)"); | 65 fail("'abcd'.replace(/a/)"); |
| 69 fail("'abcd'.search(/a/)"); | 66 fail("'abcd'.search(/a/)"); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 80 // Add the debug event listener. | 77 // Add the debug event listener. |
| 81 Debug.setListener(listener); | 78 Debug.setListener(listener); |
| 82 | 79 |
| 83 function f() { | 80 function f() { |
| 84 debugger; | 81 debugger; |
| 85 }; | 82 }; |
| 86 | 83 |
| 87 f(); | 84 f(); |
| 88 | 85 |
| 89 assertNull(exception); | 86 assertNull(exception); |
| OLD | NEW |