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

Unified Diff: test/webkit/fast/js/kde/Object.js

Issue 21070002: 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
« no previous file with comments | « test/webkit/fast/js/kde/Number-expected.txt ('k') | test/webkit/fast/js/kde/Object-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/webkit/fast/js/kde/Object.js
diff --git a/test/webkit/dfg-double-addition-simplify-to-int.js b/test/webkit/fast/js/kde/Object.js
similarity index 65%
copy from test/webkit/dfg-double-addition-simplify-to-int.js
copy to test/webkit/fast/js/kde/Object.js
index 3e12b114284a1e4bfd59316c7b768ab1e40b25fd..2637309464245c07b287fd6710138b6b9879b824 100644
--- a/test/webkit/dfg-double-addition-simplify-to-int.js
+++ b/test/webkit/fast/js/kde/Object.js
@@ -21,29 +21,22 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-description(
-"Tests that the DFG doesn't get confused about an edge being a double edge after we perform CFG simplification."
-);
+description("KDE JS Test");
+shouldBe("typeof Object()", "'object'");
+shouldBe("var o = Object(); o.x = 11; o.x;", "11"); // wanted behaviour ?
+// shouldBe("Object(undefined)", ???);
+// shouldBe("Object(null)", ???);
+shouldBe("Object(1).valueOf()", "1");
+shouldBe("Object(true).valueOf()", "true");
+shouldBe("Object('s').valueOf()", "'s'");
-function foo(a, p) {
- var p2;
- var x;
- var y;
- if (p)
- p2 = true;
- else
- p2 = true;
- if (p2)
- x = a;
- else
- x = 0.5;
- if (p2)
- y = a;
- else
- y = 0.7;
- var result = x + y;
- return [result, [x, y], [x, y], [x, y]];
-}
+shouldBe("typeof (new Object())", "'object'");
+// shouldBe("new Object(undefined)", ???);
+// shouldBe("new Object(null)", ???);
+shouldBe("(new Object(1)).valueOf()", "1");
+shouldBe("(new Object(true)).valueOf()", "true");
+shouldBe("(new Object('s')).valueOf()", "'s'");
-for (var i = 0; i < 1000; ++i)
- shouldBe("foo(42, true)[0]", "84");
+shouldBe("String(Object())", "'[object Object]'");
+shouldBe("Object().toString()", "'[object Object]'");
+shouldBe("String(Object().valueOf())", "'[object Object]'");
« no previous file with comments | « test/webkit/fast/js/kde/Number-expected.txt ('k') | test/webkit/fast/js/kde/Object-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698