Title: [198790] trunk
- Revision
- 198790
- Author
- [email protected]
- Date
- 2016-03-29 13:10:20 -0700 (Tue, 29 Mar 2016)
Log Message
"Can not" => "cannot" in String.prototype error messages
https://bugs.webkit.org/show_bug.cgi?id=155895
Reviewed by Mark Lam.
Source/_javascript_Core:
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncStartsWith):
(JSC::stringProtoFuncEndsWith):
(JSC::stringProtoFuncIncludes):
* tests/stress/string-prototype-methods-endsWith-startsWith-includes-correctness.js:
(test):
(test.get let):
LayoutTests:
* js/string-includes-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (198789 => 198790)
--- trunk/LayoutTests/ChangeLog 2016-03-29 19:51:17 UTC (rev 198789)
+++ trunk/LayoutTests/ChangeLog 2016-03-29 20:10:20 UTC (rev 198790)
@@ -1,3 +1,12 @@
+2016-03-29 Saam barati <[email protected]>
+
+ "Can not" => "cannot" in String.prototype error messages
+ https://bugs.webkit.org/show_bug.cgi?id=155895
+
+ Reviewed by Mark Lam.
+
+ * js/string-includes-expected.txt:
+
2016-03-29 Ryan Haddad <[email protected]>
Adding Timeout to ios-simulator TestExpectations for perf/adding-radio-buttons.html
Modified: trunk/LayoutTests/js/string-includes-expected.txt (198789 => 198790)
--- trunk/LayoutTests/js/string-includes-expected.txt 2016-03-29 19:51:17 UTC (rev 198789)
+++ trunk/LayoutTests/js/string-includes-expected.txt 2016-03-29 20:10:20 UTC (rev 198790)
@@ -118,9 +118,9 @@
PASS (function() { var f = String.prototype.startsWith; (function() { f('a'); })(); })() threw exception TypeError: Type error.
PASS (function() { var f = String.prototype.endsWith; (function() { f('a'); })(); })() threw exception TypeError: Type error.
PASS (function() { var f = String.prototype.includes; (function() { f('a'); })(); })() threw exception TypeError: Type error.
-PASS 'foo bar'.startsWith(/w+/) threw exception TypeError: Argument to String.prototype.startsWith can not be a RegExp..
-PASS 'foo bar'.endsWith(/w+/) threw exception TypeError: Argument to String.prototype.endsWith can not be a RegExp..
-PASS 'foo bar'.includes(/w+/) threw exception TypeError: Argument to String.prototype.includes can not be a RegExp..
+PASS 'foo bar'.startsWith(/w+/) threw exception TypeError: Argument to String.prototype.startsWith cannot be a RegExp..
+PASS 'foo bar'.endsWith(/w+/) threw exception TypeError: Argument to String.prototype.endsWith cannot be a RegExp..
+PASS 'foo bar'.includes(/w+/) threw exception TypeError: Argument to String.prototype.includes cannot be a RegExp..
PASS stringToSearchIn.startsWith(searchString, startOffset) is true
PASS sideEffect == 'ABC' is true
PASS stringToSearchIn.startsWith(searchString, startOffset) threw exception error.
Modified: trunk/Source/_javascript_Core/ChangeLog (198789 => 198790)
--- trunk/Source/_javascript_Core/ChangeLog 2016-03-29 19:51:17 UTC (rev 198789)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-03-29 20:10:20 UTC (rev 198790)
@@ -1,3 +1,18 @@
+2016-03-29 Saam barati <[email protected]>
+
+ "Can not" => "cannot" in String.prototype error messages
+ https://bugs.webkit.org/show_bug.cgi?id=155895
+
+ Reviewed by Mark Lam.
+
+ * runtime/StringPrototype.cpp:
+ (JSC::stringProtoFuncStartsWith):
+ (JSC::stringProtoFuncEndsWith):
+ (JSC::stringProtoFuncIncludes):
+ * tests/stress/string-prototype-methods-endsWith-startsWith-includes-correctness.js:
+ (test):
+ (test.get let):
+
2016-03-29 Joseph Pecoraro <[email protected]>
Web Inspector: We should have a way to capture heap snapshots programatically.
Modified: trunk/Source/_javascript_Core/runtime/StringPrototype.cpp (198789 => 198790)
--- trunk/Source/_javascript_Core/runtime/StringPrototype.cpp 2016-03-29 19:51:17 UTC (rev 198789)
+++ trunk/Source/_javascript_Core/runtime/StringPrototype.cpp 2016-03-29 20:10:20 UTC (rev 198790)
@@ -1955,7 +1955,7 @@
if (vm.exception())
return JSValue::encode(JSValue());
if (isRegularExpression)
- return throwVMTypeError(exec, "Argument to String.prototype.startsWith can not be a RegExp.");
+ return throwVMTypeError(exec, "Argument to String.prototype.startsWith cannot be a RegExp.");
String searchString = a0.toString(exec)->value(exec);
if (exec->hadException())
@@ -1991,7 +1991,7 @@
if (vm.exception())
return JSValue::encode(JSValue());
if (isRegularExpression)
- return throwVMTypeError(exec, "Argument to String.prototype.endsWith can not be a RegExp.");
+ return throwVMTypeError(exec, "Argument to String.prototype.endsWith cannot be a RegExp.");
String searchString = a0.toString(exec)->value(exec);
if (exec->hadException())
@@ -2028,7 +2028,7 @@
if (vm.exception())
return JSValue::encode(JSValue());
if (isRegularExpression)
- return throwVMTypeError(exec, "Argument to String.prototype.includes can not be a RegExp.");
+ return throwVMTypeError(exec, "Argument to String.prototype.includes cannot be a RegExp.");
String searchString = a0.toString(exec)->value(exec);
if (exec->hadException())
Modified: trunk/Source/_javascript_Core/tests/stress/string-prototype-methods-endsWith-startsWith-includes-correctness.js (198789 => 198790)
--- trunk/Source/_javascript_Core/tests/stress/string-prototype-methods-endsWith-startsWith-includes-correctness.js 2016-03-29 19:51:17 UTC (rev 198789)
+++ trunk/Source/_javascript_Core/tests/stress/string-prototype-methods-endsWith-startsWith-includes-correctness.js 2016-03-29 20:10:20 UTC (rev 198790)
@@ -14,7 +14,7 @@
try {
foo.endsWith(/foo/);
} catch(e) {
- assert(e.toString() === "TypeError: Argument to String.prototype.endsWith can not be a RegExp.");
+ assert(e.toString() === "TypeError: Argument to String.prototype.endsWith cannot be a RegExp.");
threw = true;
}
assert(threw);
@@ -26,7 +26,7 @@
try {
foo.startsWith(/foo/);
} catch(e) {
- assert(e.toString() === "TypeError: Argument to String.prototype.startsWith can not be a RegExp.");
+ assert(e.toString() === "TypeError: Argument to String.prototype.startsWith cannot be a RegExp.");
threw = true;
}
assert(threw);
@@ -38,7 +38,7 @@
try {
foo.includes(/foo/);
} catch(e) {
- assert(e.toString() === "TypeError: Argument to String.prototype.includes can not be a RegExp.");
+ assert(e.toString() === "TypeError: Argument to String.prototype.includes cannot be a RegExp.");
threw = true;
}
assert(threw);
@@ -58,7 +58,7 @@
try {
foo.endsWith(proxy);
} catch(e) {
- assert(e.toString() === "TypeError: Argument to String.prototype.endsWith can not be a RegExp.");
+ assert(e.toString() === "TypeError: Argument to String.prototype.endsWith cannot be a RegExp.");
threw = true;
}
assert(threw);
@@ -80,7 +80,7 @@
try {
foo.startsWith(proxy);
} catch(e) {
- assert(e.toString() === "TypeError: Argument to String.prototype.startsWith can not be a RegExp.");
+ assert(e.toString() === "TypeError: Argument to String.prototype.startsWith cannot be a RegExp.");
threw = true;
}
assert(threw);
@@ -102,7 +102,7 @@
try {
foo.includes(proxy);
} catch(e) {
- assert(e.toString() === "TypeError: Argument to String.prototype.includes can not be a RegExp.");
+ assert(e.toString() === "TypeError: Argument to String.prototype.includes cannot be a RegExp.");
threw = true;
}
assert(threw);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes