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

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

Issue 19541: Fixing the flakiness of the serialization tests by assuring that serializatio... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 10 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
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 Heap::Verify(); 214 Heap::Verify();
215 #endif 215 #endif
216 CHECK(Top::global()->IsJSObject()); 216 CHECK(Top::global()->IsJSObject());
217 CHECK(Top::global_context()->IsContext()); 217 CHECK(Top::global_context()->IsContext());
218 CHECK(Top::special_function_table()->IsFixedArray()); 218 CHECK(Top::special_function_table()->IsFixedArray());
219 CHECK(Heap::symbol_table()->IsSymbolTable()); 219 CHECK(Heap::symbol_table()->IsSymbolTable());
220 CHECK(!Factory::LookupAsciiSymbol("Empty")->IsFailure()); 220 CHECK(!Factory::LookupAsciiSymbol("Empty")->IsFailure());
221 } 221 }
222 222
223 223
224 TEST(Deserialize) { 224 DEPENDENT_TEST(Deserialize, Serialize) {
225 v8::HandleScope scope; 225 v8::HandleScope scope;
226 226
227 Deserialize(); 227 Deserialize();
228 228
229 SanityCheck(); 229 SanityCheck();
230 } 230 }
231 231
232 TEST(DeserializeAndRunScript) { 232 DEPENDENT_TEST(DeserializeAndRunScript, Serialize) {
233 v8::HandleScope scope; 233 v8::HandleScope scope;
234 234
235 Deserialize(); 235 Deserialize();
236 236
237 const char* c_source = "\"1234\".length"; 237 const char* c_source = "\"1234\".length";
238 v8::Local<v8::String> source = v8::String::New(c_source); 238 v8::Local<v8::String> source = v8::String::New(c_source);
239 v8::Local<v8::Script> script = v8::Script::Compile(source); 239 v8::Local<v8::Script> script = v8::Script::Compile(source);
240 CHECK_EQ(4, script->Run()->Int32Value()); 240 CHECK_EQ(4, script->Run()->Int32Value());
241 } 241 }
242 242
243 243
244 TEST(DeserializeNatives) { 244 DEPENDENT_TEST(DeserializeNatives, Serialize) {
245 v8::HandleScope scope; 245 v8::HandleScope scope;
246 246
247 Deserialize(); 247 Deserialize();
248 248
249 const char* c_source = "\"abcd\".charAt(2) == 'c'"; 249 const char* c_source = "\"abcd\".charAt(2) == 'c'";
250 v8::Local<v8::String> source = v8::String::New(c_source); 250 v8::Local<v8::String> source = v8::String::New(c_source);
251 v8::Local<v8::Script> script = v8::Script::Compile(source); 251 v8::Local<v8::Script> script = v8::Script::Compile(source);
252 v8::Local<v8::Value> value = script->Run(); 252 v8::Local<v8::Value> value = script->Run();
253 CHECK(value->BooleanValue()); 253 CHECK(value->BooleanValue());
254 } 254 }
255 255
256 256
257 TEST(DeserializeExtensions) { 257 DEPENDENT_TEST(DeserializeExtensions, Serialize) {
258 v8::HandleScope scope; 258 v8::HandleScope scope;
259 259
260 Deserialize(); 260 Deserialize();
261 const char* c_source = "gc();"; 261 const char* c_source = "gc();";
262 v8::Local<v8::String> source = v8::String::New(c_source); 262 v8::Local<v8::String> source = v8::String::New(c_source);
263 v8::Local<v8::Script> script = v8::Script::Compile(source); 263 v8::Local<v8::Script> script = v8::Script::Compile(source);
264 v8::Local<v8::Value> value = script->Run(); 264 v8::Local<v8::Value> value = script->Run();
265 CHECK(value->IsUndefined()); 265 CHECK(value->IsUndefined());
266 } 266 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.cc ('k') | test/cctest/testcfg.py » ('j') | test/cctest/testcfg.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698