diff --git a/moli-renderer-v8/src/context_bootstrap/performance_runtime/install.rs b/moli-renderer-v8/src/context_bootstrap/performance_runtime/install.rs index cbfec726882..135519d7420 100644 --- a/moli-renderer-v8/src/context_bootstrap/performance_runtime/install.rs +++ b/moli-renderer-v8/src/context_bootstrap/performance_runtime/install.rs @@ -1397,15 +1397,3 @@ fn performance_navigation_timing_to_json_callback<'s>( } rv.set(output.into()); } - -fn object_json_snapshot<'s>( - scope: &mut v8::PinScope<'s, '_>, - source: v8::Local<'s, v8::Object>, - keys: &[&str], -) -> v8::Local<'s, v8::Object> { - let output = ObjectLiteralDeclaration::bind(scope); - for key in keys { - output.copy_string_property(scope, source, key); - } - output.into_object() -} diff --git a/moli-renderer-v8/src/script_vm/tests/navigation_timing_inheritance.rs b/moli-renderer-v8/src/script_vm/tests/navigation_timing_inheritance.rs index f8f6f5237dc..a1393b036e8 100644 --- a/moli-renderer-v8/src/script_vm/tests/navigation_timing_inheritance.rs +++ b/moli-renderer-v8/src/script_vm/tests/navigation_timing_inheritance.rs @@ -70,7 +70,8 @@ fn navigation_timing_json_reads_native_inherited_state_after_freezing_and_lifecy const read = (prototype, key) => Object.getOwnPropertyDescriptor(prototype, key).get.call(navigationEntry); return JSON.stringify({ - identity: ['name', 'entryType', 'startTime'].every(key => + identity: ['id', 'navigationId'].every(key => typeof json[key] === 'number') + && ['name', 'entryType', 'startTime', 'id', 'navigationId'].every(key => json[key] === initialNavigationSnapshot[key] && base[key] === json[key] && resource[key] === json[key] && read(PerformanceEntry.prototype, key) === json[key]), diff --git a/moli-renderer-v8/tests/fixtures/navigation-timing-inheritance.js b/moli-renderer-v8/tests/fixtures/navigation-timing-inheritance.js index 8a5708ee685..592301398fa 100644 --- a/moli-renderer-v8/tests/fixtures/navigation-timing-inheritance.js +++ b/moli-renderer-v8/tests/fixtures/navigation-timing-inheritance.js @@ -11,8 +11,8 @@ 'fetchStart', 'domainLookupStart', 'domainLookupEnd', 'connectStart', 'connectEnd', 'secureConnectionStart', 'requestStart', 'responseStart', 'responseEnd', 'transferSize', 'encodedBodySize', 'decodedBodySize', 'renderBlockingStatus', 'responseStatus']; - // contentType is covered by the Rust regression; the reference browser - // does not expose it yet. + // contentType and the new entry identity fields are covered by the Rust + // regression: the Chromium reference does not expose them yet. const navigationNames = ['unloadEventStart', 'unloadEventEnd', 'domInteractive', 'domContentLoadedEventStart', 'domContentLoadedEventEnd', 'domComplete', 'loadEventStart', 'loadEventEnd', 'type', 'redirectCount']; const allNames = [...baseNames, ...resourceNames, ...navigationNames];