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

Unified Diff: test/webkit/fast/js/array-slow-put.js

Issue 20280003: Migrate more tests from blink repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/fast/js/array-slow-put.js
diff --git a/test/webkit/dfg-arguments-cross-code-origin.js b/test/webkit/fast/js/array-slow-put.js
similarity index 79%
copy from test/webkit/dfg-arguments-cross-code-origin.js
copy to test/webkit/fast/js/array-slow-put.js
index 0793dfa9acb5dd82d3360b069f384667bdf48281..1e8c44d4ed539cc146bd13f29b82f3fc5f434f43 100644
--- a/test/webkit/dfg-arguments-cross-code-origin.js
+++ b/test/webkit/fast/js/array-slow-put.js
@@ -22,23 +22,21 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
description(
-"Tests uses of 'arguments' that are aliased but span code origins."
+"Tests that defining a setter on the Array prototype works."
);
-function foo() {
- return arguments;
-}
+var ouches = 0;
+Array.prototype.__defineSetter__("3", function() { debug("Ouch!"); ouches++; });
-function bar(a) {
- var result = 0;
- for (var i = 0; i < a.length; ++i)
- result += a[i];
+function foo() {
+ var result = [];
+ result.length = 5;
+ for (var i = 0; i < result.length; ++i)
+ result[i] = i;
return result;
}
-function baz(x) {
- return bar(foo(x));
-}
+for (var i = 0; i < 100; ++i)
+ shouldBe("\"" + foo().join(",") + "\"", "\"0,1,2,,4\"");
-for (var i = 0; i < 200; ++i)
- shouldBe("baz(42)", "42");
+shouldBe("ouches", "100");
« no previous file with comments | « test/webkit/fast/js/array-prototype-properties-expected.txt ('k') | test/webkit/fast/js/array-slow-put-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698