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

Side by Side Diff: test/cctest/test-api.cc

Issue 6260011: Port r6388 to 2.4 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.4/
Patch Set: Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 expected_ptr = reinterpret_cast<void*>(1); 866 expected_ptr = reinterpret_cast<void*>(1);
867 TestExternalPointerWrapping(); 867 TestExternalPointerWrapping();
868 868
869 expected_ptr = reinterpret_cast<void*>(0xdeadbeef); 869 expected_ptr = reinterpret_cast<void*>(0xdeadbeef);
870 TestExternalPointerWrapping(); 870 TestExternalPointerWrapping();
871 871
872 expected_ptr = reinterpret_cast<void*>(0xdeadbeef + 1); 872 expected_ptr = reinterpret_cast<void*>(0xdeadbeef + 1);
873 TestExternalPointerWrapping(); 873 TestExternalPointerWrapping();
874 874
875 #if defined(V8_HOST_ARCH_X64) 875 #if defined(V8_HOST_ARCH_X64)
876 // Check a value with a leading 1 bit in x64 Smi encoding.
877 expected_ptr = reinterpret_cast<void*>(0x400000000);
878 TestExternalPointerWrapping();
879
876 expected_ptr = reinterpret_cast<void*>(0xdeadbeefdeadbeef); 880 expected_ptr = reinterpret_cast<void*>(0xdeadbeefdeadbeef);
877 TestExternalPointerWrapping(); 881 TestExternalPointerWrapping();
878 882
879 expected_ptr = reinterpret_cast<void*>(0xdeadbeefdeadbeef + 1); 883 expected_ptr = reinterpret_cast<void*>(0xdeadbeefdeadbeef + 1);
880 TestExternalPointerWrapping(); 884 TestExternalPointerWrapping();
881 #endif 885 #endif
882 } 886 }
883 887
884 888
885 THREADED_TEST(FindInstanceInPrototypeChain) { 889 THREADED_TEST(FindInstanceInPrototypeChain) {
(...skipping 10931 matching lines...) Expand 10 before | Expand all | Expand 10 after
11817 v8::Context::Scope context_scope(context.local()); 11821 v8::Context::Scope context_scope(context.local());
11818 11822
11819 v8::Handle<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New(); 11823 v8::Handle<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New();
11820 tmpl->SetNamedPropertyHandler(Getter, NULL, NULL, NULL, Enumerator); 11824 tmpl->SetNamedPropertyHandler(Getter, NULL, NULL, NULL, Enumerator);
11821 context->Global()->Set(v8_str("o"), tmpl->NewInstance()); 11825 context->Global()->Set(v8_str("o"), tmpl->NewInstance());
11822 v8::Handle<v8::Array> result = v8::Handle<v8::Array>::Cast(CompileRun( 11826 v8::Handle<v8::Array> result = v8::Handle<v8::Array>::Cast(CompileRun(
11823 "var result = []; for (var k in o) result.push(k); result")); 11827 "var result = []; for (var k in o) result.push(k); result"));
11824 CHECK_EQ(1, result->Length()); 11828 CHECK_EQ(1, result->Length());
11825 CHECK_EQ(v8_str("universalAnswer"), result->Get(0)); 11829 CHECK_EQ(v8_str("universalAnswer"), result->Get(0));
11826 } 11830 }
OLDNEW
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698