diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/test | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/test')
-rw-r--r-- | chromium/v8/test/BUILD.gn | 8 | ||||
-rw-r--r-- | chromium/v8/test/cctest/BUILD.gn | 4 | ||||
-rw-r--r-- | chromium/v8/test/fuzzilli/BUILD.gn | 21 | ||||
-rw-r--r-- | chromium/v8/test/inspector/BUILD.gn | 5 | ||||
-rw-r--r-- | chromium/v8/test/torque/test-torque.tq | 75 | ||||
-rw-r--r-- | chromium/v8/test/unittests/BUILD.gn | 13 |
6 files changed, 120 insertions, 6 deletions
diff --git a/chromium/v8/test/BUILD.gn b/chromium/v8/test/BUILD.gn index f6d30537a83..9085af05549 100644 --- a/chromium/v8/test/BUILD.gn +++ b/chromium/v8/test/BUILD.gn @@ -9,8 +9,8 @@ group("gn_all") { data_deps = [ "benchmarks:v8_benchmarks", - "intl:v8_intl", "fuzzer:v8_fuzzer", + "intl:v8_intl", "message:v8_message", "mjsunit:v8_mjsunit", "mozilla:v8_mozilla", @@ -26,6 +26,10 @@ group("gn_all") { "wasm-api-tests:wasm_api_tests", ] + if (v8_fuzzilli) { + deps += [ "fuzzilli:v8_fuzzilli_test" ] + } + if (host_os != "mac" || !is_android) { # These items don't compile for Android on Mac. deps += [ @@ -44,8 +48,8 @@ group("v8_perf") { testonly = true data_deps = [ - "..:v8_python_base", "..:d8", + "..:v8_python_base", "../tools:v8_android_test_runner_deps", "../tools:v8_testrunner", ] diff --git a/chromium/v8/test/cctest/BUILD.gn b/chromium/v8/test/cctest/BUILD.gn index 2c9363130a3..a55451c6c9c 100644 --- a/chromium/v8/test/cctest/BUILD.gn +++ b/chromium/v8/test/cctest/BUILD.gn @@ -196,6 +196,7 @@ v8_source_set("cctest_sources") { "test-code-pages.cc", "test-code-stub-assembler.cc", "test-compiler.cc", + "test-concurrent-descriptor-array.cc", "test-constantpool.cc", "test-conversions.cc", "test-cpu-profiler.cc", @@ -393,6 +394,7 @@ v8_source_set("cctest_sources") { } configs = [ + "../..:cppgc_base_config", "../..:external_config", "../..:internal_config_base", "../..:v8_tracing_config", @@ -404,7 +406,7 @@ v8_source_set("cctest_sources") { "../..:v8_for_testing", "../..:v8_libbase", "../..:v8_libplatform", - "../..:wasm_module_runner", + "../..:wasm_test_common", "../../tools/debug_helper:v8_debug_helper", "//build/win:default_exe_manifest", ] diff --git a/chromium/v8/test/fuzzilli/BUILD.gn b/chromium/v8/test/fuzzilli/BUILD.gn new file mode 100644 index 00000000000..8cf5f0bdef7 --- /dev/null +++ b/chromium/v8/test/fuzzilli/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright 2020 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("../../gni/v8.gni") + +v8_executable("v8_fuzzilli_test") { + testonly = true + + sources = [ + "libreprl.c", + "libreprl.h", + "main.cc", + ] + + configs = [] + + deps = [] + + data = [] +} diff --git a/chromium/v8/test/inspector/BUILD.gn b/chromium/v8/test/inspector/BUILD.gn index eb8c8f0863e..94e6f29752c 100644 --- a/chromium/v8/test/inspector/BUILD.gn +++ b/chromium/v8/test/inspector/BUILD.gn @@ -28,9 +28,7 @@ v8_executable("inspector-test") { "//build/win:default_exe_manifest", ] - data_deps = [ - "../../tools:v8_testrunner", - ] + data_deps = [ "../../tools:v8_testrunner" ] data = [ "console/", @@ -46,6 +44,7 @@ v8_executable("inspector-test") { "sessions/", "testcfg.py", "type-profiler/", + "wasm-inspector-test.js", ] cflags = [] diff --git a/chromium/v8/test/torque/test-torque.tq b/chromium/v8/test/torque/test-torque.tq index 8db908bc334..271541f3ba8 100644 --- a/chromium/v8/test/torque/test-torque.tq +++ b/chromium/v8/test/torque/test-torque.tq @@ -1118,6 +1118,42 @@ macro TestBitFieldUintptrOps( check(val3.e == 1234); } +bitfield struct TestBitFieldStruct4 extends uint31 { + a: bool: 1 bit; + b: int32: 3 bit; + c: bool: 1 bit; +} + +bitfield struct TestBitFieldStruct5 extends uint31 { + b: int32: 19 bit; + a: bool: 1 bit; + c: bool: 1 bit; +} + +@export +macro TestBitFieldMultipleFlags(a: bool, b: int32, c: bool) { + const f = TestBitFieldStruct4{a: a, b: b, c: c}; + let simpleExpression = f.a & f.b == 3 & !f.c; + let expectedReduction = (Signed(f) & 0x1f) == Convert<int32>(1 | 3 << 1); + StaticAssert(simpleExpression == expectedReduction); + simpleExpression = !f.a & f.b == 4 & f.c; + expectedReduction = (Signed(f) & 0x1f) == Convert<int32>(4 << 1 | 1 << 4); + StaticAssert(simpleExpression == expectedReduction); + simpleExpression = f.b == 0 & f.c; + expectedReduction = (Signed(f) & 0x1e) == Convert<int32>(1 << 4); + StaticAssert(simpleExpression == expectedReduction); + simpleExpression = f.a & f.c; + expectedReduction = (Signed(f) & 0x11) == Convert<int32>(1 | 1 << 4); + StaticAssert(simpleExpression == expectedReduction); + const f2 = TestBitFieldStruct5{b: b, a: a, c: c}; + simpleExpression = !f2.a & f2.b == 1234 & f2.c; + expectedReduction = (Signed(f2) & 0x1fffff) == Convert<int32>(1234 | 1 << 20); + StaticAssert(simpleExpression == expectedReduction); + simpleExpression = !f2.a & !f2.c; + expectedReduction = (Signed(f2) & 0x180000) == Convert<int32>(0); + StaticAssert(simpleExpression == expectedReduction); +} + @export class ExportedSubClass extends ExportedSubClassBase { c_field: int32; @@ -1229,4 +1265,43 @@ macro TestFullyGeneratedClassFromCpp(): ExportedSubClass { return new ExportedSubClass{a: Null, b: Null, c_field: 7, d_field: 8, e_field: 9}; } + +@export +class ExportedSubClass2 extends ExportedSubClassBase { + x_field: int32; + y_field: int32; + z_field: Smi; +} + +@export +macro TestGeneratedCastOperators(implicit context: Context)() { + const a = new + ExportedSubClass{a: Null, b: Null, c_field: 3, d_field: 4, e_field: 5}; + const b = new ExportedSubClassBase{a: Undefined, b: Null}; + const c = new + ExportedSubClass2{a: Null, b: Null, x_field: 3, y_field: 4, z_field: 5}; + const aO: Object = a; + const bO: Object = b; + const cO: Object = c; + assert(Is<ExportedSubClassBase>(aO)); + assert(Is<ExportedSubClass>(aO)); + assert(!Is<ExportedSubClass2>(aO)); + assert(Is<ExportedSubClassBase>(bO)); + assert(!Is<ExportedSubClass>(bO)); + assert(Is<ExportedSubClassBase>(cO)); + assert(!Is<ExportedSubClass>(cO)); + assert(Is<ExportedSubClass2>(cO)); + + const nativeContext = LoadNativeContext(context); + const jsf: JSFunction = UnsafeCast<JSFunction>( + nativeContext[NativeContextSlot::REGEXP_FUNCTION_INDEX]); + assert(!Is<JSSloppyArgumentsObject>(jsf)); + + const parameterValues = NewFixedArray(0, ConstantIterator(TheHole)); + const elements = NewSloppyArgumentsElements( + 0, context, parameterValues, ConstantIterator(TheHole)); + const fastArgs = arguments::NewJSFastAliasedArgumentsObject( + elements, Convert<Smi>(0), jsf); + assert(Is<JSArgumentsObject>(fastArgs)); +} } diff --git a/chromium/v8/test/unittests/BUILD.gn b/chromium/v8/test/unittests/BUILD.gn index ae69c248213..b42d09d7605 100644 --- a/chromium/v8/test/unittests/BUILD.gn +++ b/chromium/v8/test/unittests/BUILD.gn @@ -44,11 +44,14 @@ v8_source_set("cppgc_unittests_sources") { testonly = true sources = [ + "heap/cppgc/concurrent-sweeper-unittest.cc", "heap/cppgc/custom-spaces-unittest.cc", "heap/cppgc/finalizer-trait-unittest.cc", "heap/cppgc/free-list-unittest.cc", "heap/cppgc/garbage-collected-unittest.cc", "heap/cppgc/gc-info-unittest.cc", + "heap/cppgc/gc-invoker-unittest.cc", + "heap/cppgc/heap-growing-unittest.cc", "heap/cppgc/heap-object-header-unittest.cc", "heap/cppgc/heap-page-unittest.cc", "heap/cppgc/heap-unittest.cc", @@ -56,17 +59,22 @@ v8_source_set("cppgc_unittests_sources") { "heap/cppgc/marker-unittest.cc", "heap/cppgc/marking-visitor-unittest.cc", "heap/cppgc/member-unittest.cc", + "heap/cppgc/minor-gc-unittest.cc", "heap/cppgc/object-start-bitmap-unittest.cc", "heap/cppgc/page-memory-unittest.cc", "heap/cppgc/persistent-unittest.cc", "heap/cppgc/prefinalizer-unittest.cc", "heap/cppgc/source-location-unittest.cc", "heap/cppgc/stack-unittest.cc", + "heap/cppgc/stats-collector-unittest.cc", "heap/cppgc/sweeper-unittest.cc", + "heap/cppgc/test-platform.cc", + "heap/cppgc/test-platform.h", "heap/cppgc/tests.cc", "heap/cppgc/tests.h", "heap/cppgc/visitor-unittest.cc", "heap/cppgc/worklist-unittest.cc", + "heap/cppgc/write-barrier-unittest.cc", ] configs = [ @@ -231,6 +239,7 @@ v8_source_set("unittests_sources") { "heap/gc-tracer-unittest.cc", "heap/heap-controller-unittest.cc", "heap/heap-unittest.cc", + "heap/heap-utils.h", "heap/item-parallel-job-unittest.cc", "heap/list-unittest.cc", "heap/local-heap-unittest.cc", @@ -242,6 +251,7 @@ v8_source_set("unittests_sources") { "heap/safepoint-unittest.cc", "heap/slot-set-unittest.cc", "heap/spaces-unittest.cc", + "heap/unified-heap-unittest.cc", "heap/unmapper-unittest.cc", "heap/worklist-unittest.cc", "interpreter/bytecode-array-builder-unittest.cc", @@ -305,6 +315,7 @@ v8_source_set("unittests_sources") { "wasm/loop-assignment-analysis-unittest.cc", "wasm/module-decoder-unittest.cc", "wasm/streaming-decoder-unittest.cc", + "wasm/subtyping-unittest.cc", "wasm/wasm-code-manager-unittest.cc", "wasm/wasm-compiler-unittest.cc", "wasm/wasm-macro-gen-unittest.cc", @@ -371,6 +382,7 @@ v8_source_set("unittests_sources") { } configs = [ + "../..:cppgc_base_config", "../..:external_config", "../..:internal_config_base", ] @@ -380,6 +392,7 @@ v8_source_set("unittests_sources") { "../..:v8_for_testing", "../..:v8_libbase", "../..:v8_libplatform", + "../..:wasm_test_common", "../../third_party/inspector_protocol:crdtp_test", "//build/win:default_exe_manifest", "//testing/gmock", |