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

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

Issue 123383003: Unbreak build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 10103 matching lines...) Expand 10 before | Expand all | Expand 10 after
10114 10114
10115 // Inherit from t1 and mark prototype as hidden. 10115 // Inherit from t1 and mark prototype as hidden.
10116 t2->Inherit(t1); 10116 t2->Inherit(t1);
10117 t2->InstanceTemplate()->Set(v8_str("mine"), v8_num(4)); 10117 t2->InstanceTemplate()->Set(v8_str("mine"), v8_num(4));
10118 10118
10119 Local<v8::Object> o2 = t2->GetFunction()->NewInstance(); 10119 Local<v8::Object> o2 = t2->GetFunction()->NewInstance();
10120 CHECK(o2->SetPrototype(o1)); 10120 CHECK(o2->SetPrototype(o1));
10121 10121
10122 v8::Local<v8::Symbol> sym = v8::Symbol::New(context->GetIsolate(), "s1"); 10122 v8::Local<v8::Symbol> sym = v8::Symbol::New(context->GetIsolate(), "s1");
10123 o1->Set(sym, v8_num(3)); 10123 o1->Set(sym, v8_num(3));
10124 o1->SetHiddenValue(v8_str("h1"), v8::Integer::New(2013)); 10124 o1->SetHiddenValue(v8_str("h1"),
10125 v8::Integer::New(context->GetIsolate(), 2013));
10125 10126
10126 // Call the runtime version of GetLocalPropertyNames() on 10127 // Call the runtime version of GetLocalPropertyNames() on
10127 // the natively created object through JavaScript. 10128 // the natively created object through JavaScript.
10128 context->Global()->Set(v8_str("obj"), o2); 10129 context->Global()->Set(v8_str("obj"), o2);
10129 context->Global()->Set(v8_str("sym"), sym); 10130 context->Global()->Set(v8_str("sym"), sym);
10130 CompileRun("var names = %GetLocalPropertyNames(obj, true);"); 10131 CompileRun("var names = %GetLocalPropertyNames(obj, true);");
10131 10132
10132 ExpectInt32("names.length", 7); 10133 ExpectInt32("names.length", 7);
10133 ExpectTrue("names.indexOf(\"foo\") >= 0"); 10134 ExpectTrue("names.indexOf(\"foo\") >= 0");
10134 ExpectTrue("names.indexOf(\"bar\") >= 0"); 10135 ExpectTrue("names.indexOf(\"bar\") >= 0");
(...skipping 11336 matching lines...) Expand 10 before | Expand all | Expand 10 after
21471 } 21472 }
21472 for (int i = 0; i < runs; i++) { 21473 for (int i = 0; i < runs; i++) {
21473 Local<String> expected; 21474 Local<String> expected;
21474 if (i != 0) { 21475 if (i != 0) {
21475 CHECK_EQ(v8_str("escape value"), values[i]); 21476 CHECK_EQ(v8_str("escape value"), values[i]);
21476 } else { 21477 } else {
21477 CHECK(values[i].IsEmpty()); 21478 CHECK(values[i].IsEmpty());
21478 } 21479 }
21479 } 21480 }
21480 } 21481 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698