| 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 14002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14013 TEST_TOSTRINGTAG(Object, String, String); | 14013 TEST_TOSTRINGTAG(Object, String, String); |
| 14014 TEST_TOSTRINGTAG(Object, Foo, Foo); | 14014 TEST_TOSTRINGTAG(Object, Foo, Foo); |
| 14015 | 14015 |
| 14016 #undef TEST_TOSTRINGTAG | 14016 #undef TEST_TOSTRINGTAG |
| 14017 | 14017 |
| 14018 Local<v8::RegExp> valueRegExp = v8::RegExp::New(v8_str("^$"), | 14018 Local<v8::RegExp> valueRegExp = v8::RegExp::New(v8_str("^$"), |
| 14019 v8::RegExp::kNone); | 14019 v8::RegExp::kNone); |
| 14020 Local<Value> valueNumber = v8_num(123); | 14020 Local<Value> valueNumber = v8_num(123); |
| 14021 Local<v8::Symbol> valueSymbol = v8_symbol("TestSymbol"); | 14021 Local<v8::Symbol> valueSymbol = v8_symbol("TestSymbol"); |
| 14022 Local<v8::Function> valueFunction = | 14022 Local<v8::Function> valueFunction = |
| 14023 CompileRun("function fn() {}").As<v8::Function>(); | 14023 CompileRun("(function fn() {})").As<v8::Function>(); |
| 14024 Local<v8::Object> valueObject = v8::Object::New(v8::Isolate::GetCurrent()); | 14024 Local<v8::Object> valueObject = v8::Object::New(v8::Isolate::GetCurrent()); |
| 14025 Local<v8::Primitive> valueNull = v8::Null(v8::Isolate::GetCurrent()); | 14025 Local<v8::Primitive> valueNull = v8::Null(v8::Isolate::GetCurrent()); |
| 14026 Local<v8::Primitive> valueUndef = v8::Undefined(v8::Isolate::GetCurrent()); | 14026 Local<v8::Primitive> valueUndef = v8::Undefined(v8::Isolate::GetCurrent()); |
| 14027 | 14027 |
| 14028 #define TEST_TOSTRINGTAG(type, tagValue, expected) \ | 14028 #define TEST_TOSTRINGTAG(type, tagValue, expected) \ |
| 14029 do { \ | 14029 do { \ |
| 14030 object = CompileRun("new " #type "()"); \ | 14030 object = CompileRun("new " #type "()"); \ |
| 14031 object.As<v8::Object>()->Set(toStringTag, tagValue); \ | 14031 object.As<v8::Object>()->Set(toStringTag, tagValue); \ |
| 14032 value = object.As<v8::Object>()->ObjectProtoToString(); \ | 14032 value = object.As<v8::Object>()->ObjectProtoToString(); \ |
| 14033 CHECK(value->IsString() && \ | 14033 CHECK(value->IsString() && \ |
| (...skipping 10856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24890 "bar2.js"); | 24890 "bar2.js"); |
| 24891 } | 24891 } |
| 24892 | 24892 |
| 24893 | 24893 |
| 24894 TEST(StreamingScriptWithSourceMappingURLInTheMiddle) { | 24894 TEST(StreamingScriptWithSourceMappingURLInTheMiddle) { |
| 24895 const char* chunks[] = {"function foo() { ret", "urn 13; }\n//#", | 24895 const char* chunks[] = {"function foo() { ret", "urn 13; }\n//#", |
| 24896 " sourceMappingURL=bar2.js\n", "foo();", NULL}; | 24896 " sourceMappingURL=bar2.js\n", "foo();", NULL}; |
| 24897 RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8, true, NULL, | 24897 RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8, true, NULL, |
| 24898 "bar2.js"); | 24898 "bar2.js"); |
| 24899 } | 24899 } |
| OLD | NEW |