Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2118)

Unified Diff: test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js

Issue 18068003: Migrated several tests from blink to V8 repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js
diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js
similarity index 71%
copy from test/webkit/concat-while-having-a-bad-time.js
copy to test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js
index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..140ba7fcf29be8933232d0a53613d046e069252b 100644
--- a/test/webkit/concat-while-having-a-bad-time.js
+++ b/test/webkit/try-catch-try-try-catch-try-finally-return-catch-finally.js
@@ -22,10 +22,32 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
description(
-"Tests the behavior of Array.prototype.concat while the array is having a bad time due to one of the elements we are concatenating."
+"Tests what would happen if you a throwing operation at the beginning of a finally blow that gets inlined inside a complicated catch/finally stack. The correct outcome is for this test to not crash during exception throwing."
);
-Object.defineProperty(Array.prototype, 0, { writable: false });
-shouldBe("[42].concat()", "[42]");
+function foo() {
+ try{
+ N
+ } catch(x) {
+ try {
+ try {
+ w
+ } catch(x) {
+ try {
+ } finally {
+ return
+ }
+ }
+ } catch (a) {
+ }
+ } finally {
+ z
+ }
+}
+try {
+ foo();
+} catch (e) {
+ testPassed("It worked.");
+}

Powered by Google App Engine
This is Rietveld 408576698