Changeset 184083 in webkit
- Timestamp:
- May 11, 2015, 5:10:06 AM (11 years ago)
- Location:
- releases/WebKitGTK/webkit-2.8
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/js/script-tests/string-includes.js (modified) (3 diffs)
-
LayoutTests/js/string-includes-expected.txt (modified) (3 diffs)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/StringPrototype.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog
r184082 r184083 1 2015-04-15 Jordan Harband <ljharb@gmail.com> 2 3 String.prototype.startsWith/endsWith/includes have wrong length in r182673 4 https://bugs.webkit.org/show_bug.cgi?id=143659 5 6 Reviewed by Benjamin Poulain. 7 8 * js/script-tests/string-includes.js: 9 * js/string-includes-expected.txt: 10 1 11 2015-04-15 Jordan Harband <ljharb@gmail.com> 2 12 -
releases/WebKitGTK/webkit-2.8/LayoutTests/js/script-tests/string-includes.js
r181236 r184083 2 2 3 3 // Test includes 4 shouldBe("String.prototype.includes.length", "1"); 4 5 shouldBe("'foo bar'.includes('bar')", "true"); 5 6 shouldBe("'foo bar'.includes('bar', 4)", "true"); … … 32 33 33 34 // Test startsWith 35 shouldBe("String.prototype.startsWith.length", "1"); 34 36 shouldBe("'foo bar'.startsWith('foo')", "true"); 35 37 shouldBe("'foo bar'.startsWith('foo', 0)", "true"); … … 61 63 62 64 // Test endsWith 65 shouldBe("String.prototype.endsWith.length", "1"); 63 66 shouldBe("'foo bar'.endsWith('bar')", "true"); 64 67 shouldBe("'foo bar'.endsWith('ba', 6)", "true"); -
releases/WebKitGTK/webkit-2.8/LayoutTests/js/string-includes-expected.txt
r181236 r184083 4 4 5 5 6 PASS String.prototype.includes.length is 1 6 7 PASS 'foo bar'.includes('bar') is true 7 8 PASS 'foo bar'.includes('bar', 4) is true … … 32 33 PASS 'フーバー'.includes('ーバ') is true 33 34 PASS 'フーバー'.includes('クー') is false 35 PASS String.prototype.startsWith.length is 1 34 36 PASS 'foo bar'.startsWith('foo') is true 35 37 PASS 'foo bar'.startsWith('foo', 0) is true … … 59 61 PASS 'foo bar'.startsWith('フー') is false 60 62 PASS 'foo bar'.startsWith('フー', 1) is false 63 PASS String.prototype.endsWith.length is 1 61 64 PASS 'foo bar'.endsWith('bar') is true 62 65 PASS 'foo bar'.endsWith('ba', 6) is true -
releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore/ChangeLog
r184082 r184083 1 2015-04-15 Jordan Harband <ljharb@gmail.com> 2 3 String.prototype.startsWith/endsWith/includes have wrong length in r182673 4 https://bugs.webkit.org/show_bug.cgi?id=143659 5 6 Reviewed by Benjamin Poulain. 7 8 Fix lengths of String.prototype.{includes,startsWith,endsWith} per spec 9 https://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.includes 10 https://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith 11 https://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith 12 13 * runtime/StringPrototype.cpp: 14 (JSC::StringPrototype::finishCreation): 15 1 16 2015-04-15 Jordan Harband <ljharb@gmail.com> 2 17 -
releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore/runtime/StringPrototype.cpp
r181236 r184083 3 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserved. 4 4 * Copyright (C) 2009 Torch Mobile, Inc. 5 * Copyright (C) 2015 Jordan Harband (ljharb@gmail.com) 5 6 * 6 7 * This library is free software; you can redistribute it and/or … … 138 139 JSC_NATIVE_FUNCTION("trimLeft", stringProtoFuncTrimLeft, DontEnum, 0); 139 140 JSC_NATIVE_FUNCTION("trimRight", stringProtoFuncTrimRight, DontEnum, 0); 140 JSC_NATIVE_FUNCTION("startsWith", stringProtoFuncStartsWith, DontEnum, 0);141 JSC_NATIVE_FUNCTION("endsWith", stringProtoFuncEndsWith, DontEnum, 0);142 JSC_NATIVE_FUNCTION("includes", stringProtoFuncIncludes, DontEnum, 0);141 JSC_NATIVE_FUNCTION("startsWith", stringProtoFuncStartsWith, DontEnum, 1); 142 JSC_NATIVE_FUNCTION("endsWith", stringProtoFuncEndsWith, DontEnum, 1); 143 JSC_NATIVE_FUNCTION("includes", stringProtoFuncIncludes, DontEnum, 1); 143 144 144 145 // The constructor will be added later, after StringConstructor has been built
Note:
See TracChangeset
for help on using the changeset viewer.