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

Unified Diff: test/webkit/fast/js/object-prototype-constructor.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/object-prototype-constructor.js
diff --git a/test/webkit/array-iterate-backwards.js b/test/webkit/fast/js/object-prototype-constructor.js
similarity index 72%
copy from test/webkit/array-iterate-backwards.js
copy to test/webkit/fast/js/object-prototype-constructor.js
index 301cbd5290c9dfafcf44c22b351483aa219212f3..d3031ae106a4b27823bf9f22572bd0d4dbbb3c20 100644
--- a/test/webkit/array-iterate-backwards.js
+++ b/test/webkit/fast/js/object-prototype-constructor.js
@@ -22,34 +22,21 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
description(
-"This test checks that iterating a large array backwards works correctly."
+'This is a test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=3537">bug 3537</a>.'
);
-var bytes = new Array();
+var Foo = { Bar: function () {}};
+var f = new Foo.Bar();
+shouldBe("f.constructor", "Foo.Bar");
+shouldBe("typeof f.constructor", '"function"');
-function prepare(nbytes) {
- var i = nbytes - 1;
- while (i >= 0) {
- bytes[i] = new Number(i);
- i -= 1;
- }
-}
+function F() {};
+var Foo2 = { Bar: F};
+var f2 = new Foo2.Bar();
+shouldBe("f2.constructor", "Foo2.Bar");
+shouldBe("typeof f2.constructor", '"function"');
-function verify(nbytes) {
- var i = nbytes - 1;
- while (i >= 0) {
- if (bytes[i] != i)
- return false;
- i -= 1;
- }
- return true;
-}
-
-prepare(32768);
-shouldBeTrue('verify(32768)');
-
-prepare(65536);
-shouldBeTrue('verify(65536)');
-
-prepare(120000);
-shouldBeTrue('verify(120000)');
+var Foo3 = { Bar: new Function("")};
+var f3 = new Foo3.Bar();
+shouldBe("f3.constructor", "Foo3.Bar");
+shouldBe("typeof f3.constructor", '"function"');
« no previous file with comments | « test/webkit/fast/js/object-extra-comma-expected.txt ('k') | test/webkit/fast/js/object-prototype-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698