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

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

Issue 6233: Removed the print, load, quit and version extensions from the VM. Moved the p... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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/serialize.cc ('k') | test/cctest/test-compiler.cc » ('j') | 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-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 4756 matching lines...) Expand 10 before | Expand all | Expand 10 after
4767 } 4767 }
4768 CHECK_EQ(count, GetSurvivingGlobalObjectsCount()); 4768 CHECK_EQ(count, GetSurvivingGlobalObjectsCount());
4769 4769
4770 { v8::HandleScope scope; 4770 { v8::HandleScope scope;
4771 const char* extension_list[] = { "v8/gc" }; 4771 const char* extension_list[] = { "v8/gc" };
4772 v8::ExtensionConfiguration extensions(1, extension_list); 4772 v8::ExtensionConfiguration extensions(1, extension_list);
4773 LocalContext context(&extensions); 4773 LocalContext context(&extensions);
4774 v8_compile("gc();")->Run(); 4774 v8_compile("gc();")->Run();
4775 } 4775 }
4776 CHECK_EQ(count, GetSurvivingGlobalObjectsCount()); 4776 CHECK_EQ(count, GetSurvivingGlobalObjectsCount());
4777
4778 { v8::HandleScope scope;
4779 const char* extension_list[] = { "v8/print" };
4780 v8::ExtensionConfiguration extensions(1, extension_list);
4781 LocalContext context(&extensions);
4782 v8_compile("print('hest');")->Run();
4783 }
4784 CHECK_EQ(count, GetSurvivingGlobalObjectsCount());
4785 } 4777 }
4786 } 4778 }
4787 4779
4788 4780
4789 THREADED_TEST(CheckForCrossContextObjectLiterals) { 4781 THREADED_TEST(CheckForCrossContextObjectLiterals) {
4790 v8::V8::Initialize(); 4782 v8::V8::Initialize();
4791 4783
4792 const int nof = 2; 4784 const int nof = 2;
4793 const char* sources[nof] = { 4785 const char* sources[nof] = {
4794 "try { [ 2, 3, 4 ].forEach(5); } catch(e) { e.toString(); }", 4786 "try { [ 2, 3, 4 ].forEach(5); } catch(e) { e.toString(); }",
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
4930 v8::Handle<v8::Script> script0 = 4922 v8::Handle<v8::Script> script0 =
4931 v8::Script::Compile(source0, v8::String::New("test.js")); 4923 v8::Script::Compile(source0, v8::String::New("test.js"));
4932 v8::Handle<v8::Script> script1 = 4924 v8::Handle<v8::Script> script1 =
4933 v8::Script::Compile(source1, v8::String::New("test.js")); 4925 v8::Script::Compile(source1, v8::String::New("test.js"));
4934 v8::Handle<v8::Script> script2 = 4926 v8::Handle<v8::Script> script2 =
4935 v8::Script::Compile(source0); // different origin 4927 v8::Script::Compile(source0); // different origin
4936 CHECK_EQ(1234, script0->Run()->Int32Value()); 4928 CHECK_EQ(1234, script0->Run()->Int32Value());
4937 CHECK_EQ(1234, script1->Run()->Int32Value()); 4929 CHECK_EQ(1234, script1->Run()->Int32Value());
4938 CHECK_EQ(1234, script2->Run()->Int32Value()); 4930 CHECK_EQ(1234, script2->Run()->Int32Value());
4939 } 4931 }
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698