OLD | NEW |
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 3117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3128 CompileRun(script.c_str()); | 3128 CompileRun(script.c_str()); |
3129 v8::Local<Value> value = env->Global()->Get(v8_str("sym")); | 3129 v8::Local<Value> value = env->Global()->Get(v8_str("sym")); |
3130 | 3130 |
3131 CHECK(!value.IsEmpty()); | 3131 CHECK(!value.IsEmpty()); |
3132 CHECK(!symbol.IsEmpty()); | 3132 CHECK(!symbol.IsEmpty()); |
3133 CHECK(value->SameValue(symbol)); | 3133 CHECK(value->SameValue(symbol)); |
3134 } | 3134 } |
3135 | 3135 |
3136 | 3136 |
3137 THREADED_TEST(WellKnownSymbols) { | 3137 THREADED_TEST(WellKnownSymbols) { |
| 3138 CheckWellKnownSymbol(v8::Symbol::GetToStringTag, "Symbol.toStringTag"); |
3138 CheckWellKnownSymbol(v8::Symbol::GetIterator, "Symbol.iterator"); | 3139 CheckWellKnownSymbol(v8::Symbol::GetIterator, "Symbol.iterator"); |
3139 CheckWellKnownSymbol(v8::Symbol::GetUnscopables, "Symbol.unscopables"); | 3140 CheckWellKnownSymbol(v8::Symbol::GetUnscopables, "Symbol.unscopables"); |
3140 } | 3141 } |
3141 | 3142 |
3142 | 3143 |
3143 THREADED_TEST(GlobalPrivates) { | 3144 THREADED_TEST(GlobalPrivates) { |
3144 LocalContext env; | 3145 LocalContext env; |
3145 v8::Isolate* isolate = env->GetIsolate(); | 3146 v8::Isolate* isolate = env->GetIsolate(); |
3146 v8::HandleScope scope(isolate); | 3147 v8::HandleScope scope(isolate); |
3147 | 3148 |
(...skipping 21052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
24200 char chunk2[] = | 24201 char chunk2[] = |
24201 "XX\xec\x92\x81r = 13;\n" | 24202 "XX\xec\x92\x81r = 13;\n" |
24202 " return foob\xec\x92\x81\xec\x92\x81r;\n" | 24203 " return foob\xec\x92\x81\xec\x92\x81r;\n" |
24203 "}\n"; | 24204 "}\n"; |
24204 chunk1[strlen(chunk1) - 1] = reference[0]; | 24205 chunk1[strlen(chunk1) - 1] = reference[0]; |
24205 chunk2[0] = reference[1]; | 24206 chunk2[0] = reference[1]; |
24206 chunk2[1] = reference[2]; | 24207 chunk2[1] = reference[2]; |
24207 const char* chunks[] = {chunk1, chunk2, "foo();", NULL}; | 24208 const char* chunks[] = {chunk1, chunk2, "foo();", NULL}; |
24208 RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8); | 24209 RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8); |
24209 } | 24210 } |
OLD | NEW |