Write automated tests for the about:home caching mechanism
Categories
(Firefox :: New Tab Page, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
The tests should cover the following cases:
- Test that we display the dynamically generated page if we:
- Have an unpopulated cache
- Have a partially written cache
- Are too slow to read the cache
- Test that we can show a cached page
- Test that we can cache a page
- Test that we can overwrite a pre-existing cache
- Test that we can invalidate a cache with a cache version bump
- Test that clearing history clears the cache
- Test that changing locales clears the cache
- Test that we try to write to the cache at shutdown if the state has updated
- Test that we don't try to write to the cache at shutdown if the state has not been updated since the last write
- Test that the cache worker produces a workable HTML document
- Test that non-privileged content processes cannot read from or write to the cache.
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D70954
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D71793
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Backed out for sanitizer failures on RootingAPI.h
backout: https://hg.mozilla.org/integration/autoland/rev/e6aad3fb66599f6465419c6b8944e1584c564a1d
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=300942951&repo=autoland&lineNumber=2039
[task 2020-05-05T22:19:48.961Z] 22:19:48 INFO - TEST-START | browser/components/newtab/test/browser/abouthomecache/browser_process_crash.js
[task 2020-05-05T22:19:50.257Z] 22:19:50 INFO - GECKO(2014) | Et tu, Brute?
[task 2020-05-05T22:19:50.265Z] 22:19:50 INFO - GECKO(2014) | AddressSanitizer:DEADLYSIGNAL
[task 2020-05-05T22:19:50.265Z] 22:19:50 INFO - GECKO(2014) | =================================================================
[task 2020-05-05T22:19:50.266Z] 22:19:50 ERROR - GECKO(2014) | ==2075==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f1020de0970 bp 0x7ffeaa2d1460 sp 0x7ffeaa2d0d80 T0)
[task 2020-05-05T22:19:50.266Z] 22:19:50 INFO - GECKO(2014) | ==2075==The signal is caused by a READ memory access.
[task 2020-05-05T22:19:50.267Z] 22:19:50 INFO - GECKO(2014) | ==2075==Hint: address points to the zero page.
[task 2020-05-05T22:19:50.718Z] 22:19:50 INFO - GECKO(2014) | #0 0x7f1020de096f in set /builds/worker/workspace/obj-build/dist/include/js/RootingAPI.h:691:10
[task 2020-05-05T22:19:50.719Z] 22:19:50 INFO - GECKO(2014) | #1 0x7f1020de096f in set /builds/worker/workspace/obj-build/dist/include/js/Value.h:1187:34
[task 2020-05-05T22:19:50.719Z] 22:19:50 INFO - GECKO(2014) | #2 0x7f1020de096f in setDouble /builds/worker/workspace/obj-build/dist/include/js/Value.h:1194:30
[task 2020-05-05T22:19:50.719Z] 22:19:50 INFO - GECKO(2014) | #3 0x7f1020de096f in js::ctypes::ConvertToJS(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, void*, bool, bool, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/ctypes/CTypes.cpp:3119:7
[task 2020-05-05T22:19:50.719Z] 22:19:50 INFO - GECKO(2014) | #4 0x7f1020ddea08 in js::ctypes::PointerType::ContentsGetter(JSContext*, JS::CallArgs const&) /builds/worker/checkouts/gecko/js/src/ctypes/CTypes.cpp:5252:8
[task 2020-05-05T22:19:50.719Z] 22:19:50 INFO - GECKO(2014) | #5 0x7f1020e0d139 in CallNonGenericMethod<&js::ctypes::PointerType::IsPointer, &js::ctypes::PointerType::ContentsGetter> /builds/worker/workspace/obj-build/dist/include/js/CallNonGenericMethod.h:103:12
[task 2020-05-05T22:19:50.719Z] 22:19:50 INFO - GECKO(2014) | #6 0x7f1020e0d139 in js::ctypes::Property<&(js::ctypes::PointerType::IsPointer(JS::Handle<JS::Value>)), &(js::ctypes::PointerType::ContentsGetter(JSContext*, JS::CallArgs const&))>::Fun(JSContext*, unsigned int, JS::Value*) /builds/worker/checkouts/gecko/js/src/ctypes/CTypes.cpp:122:12
[task 2020-05-05T22:19:50.734Z] 22:19:50 INFO - GECKO(2014) | #7 0x7f1020e82c37 in CallJSNative /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:493:13
[task 2020-05-05T22:19:50.734Z] 22:19:50 INFO - GECKO(2014) | #8 0x7f1020e82c37 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:585:12
[task 2020-05-05T22:19:50.734Z] 22:19:50 INFO - GECKO(2014) | #9 0x7f1020e84d1a in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:648:10
[task 2020-05-05T22:19:50.734Z] 22:19:50 INFO - GECKO(2014) | #10 0x7f1020e84f99 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:665:8
[task 2020-05-05T22:19:50.735Z] 22:19:50 INFO - GECKO(2014) | #11 0x7f1020e86778 in js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:789:10
[task 2020-05-05T22:19:50.752Z] 22:19:50 INFO - GECKO(2014) | #12 0x7f102142d651 in CallGetter /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2262:12
[task 2020-05-05T22:19:50.752Z] 22:19:50 INFO - GECKO(2014) | #13 0x7f102142d651 in GetExistingProperty<js::CanGC> /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2313:12
[task 2020-05-05T22:19:50.752Z] 22:19:50 INFO - GECKO(2014) | #14 0x7f102142d651 in NativeGetPropertyInline<js::CanGC> /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2453:14
[task 2020-05-05T22:19:50.754Z] 22:19:50 INFO - GECKO(2014) | #15 0x7f102142d651 in js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2490:10
[task 2020-05-05T22:19:50.754Z] 22:19:50 INFO - GECKO(2014) | #16 0x7f1020e8d79f in GetProperty /builds/worker/checkouts/gecko/js/src/vm/ObjectOperations-inl.h:117:10
[task 2020-05-05T22:19:50.754Z] 22:19:50 INFO - GECKO(2014) | #17 0x7f1020e8d79f in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/ObjectOperations-inl.h:124:10
[task 2020-05-05T22:19:50.755Z] 22:19:50 INFO - GECKO(2014) | #18 0x7f1020e8c5eb in js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:4710:10
[task 2020-05-05T22:19:50.755Z] 22:19:50 INFO - GECKO(2014) | #19 0x7f1020e6a27c in GetPropertyOperation /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:224:10
[task 2020-05-05T22:19:50.756Z] 22:19:50 INFO - GECKO(2014) | #20 0x7f1020e6a27c in Interpret(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:3001:12
[task 2020-05-05T22:19:50.756Z] 22:19:50 INFO - GECKO(2014) | #21 0x7f1020e52266 in js::RunScript(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:465:10
[task 2020-05-05T22:19:50.757Z] 22:19:50 INFO - GECKO(2014) | #22 0x7f1020e82d1a in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:620:13
[task 2020-05-05T22:19:50.757Z] 22:19:50 INFO - GECKO(2014) | #23 0x7f1020e84d1a in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:648:10
[task 2020-05-05T22:19:50.758Z] 22:19:50 INFO - GECKO(2014) | #24 0x7f1020e84f99 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:665:8
[task 2020-05-05T22:19:50.773Z] 22:19:50 INFO - GECKO(2014) | #25 0x7f102100cb60 in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/jsapi.cpp:2840:10
[task 2020-05-05T22:19:50.808Z] 22:19:50 INFO - GECKO(2014) | #26 0x7f1019c41338 in mozilla::dom::MessageListener::ReceiveMessage(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::ReceiveMessageArgument const&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/MessageManagerBinding.cpp:6415:8
[task 2020-05-05T22:19:50.816Z] 22:19:50 INFO - GECKO(2014) | #27 0x7f101ccb3675 in mozilla::dom::MessageListener::ReceiveMessage(mozilla::dom::ReceiveMessageArgument const&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) /builds/worker/workspace/obj-build/dist/include/mozilla/dom/MessageManagerBinding.h:784:12
[task 2020-05-05T22:19:50.816Z] 22:19:50 INFO - GECKO(2014) | #28 0x7f101ccb2e7c in mozilla::dom::JSActor::ReceiveMessageOrQuery(JSContext*, mozilla::dom::JSActorMessageMeta const&, JS::Handle<JS::Value>, mozilla::ErrorResult&) /builds/worker/checkouts/gecko/dom/ipc/JSActor.cpp:353:20
[task 2020-05-05T22:19:50.817Z] 22:19:50 INFO - GECKO(2014) | #29 0x7f101ccb1c73 in mozilla::dom::JSActor::ReceiveRawMessage(mozilla::dom::JSActorMessageMeta const&, mozilla::dom::ipc::StructuredCloneData&&, mozilla::dom::ipc::StructuredCloneData&&) /builds/worker/checkouts/gecko/dom/ipc/JSActor.cpp:310:7
[task 2020-05-05T22:19:50.832Z] 22:19:50 INFO - GECKO(2014) | #30 0x7f101cd02f38 in mozilla::dom::WindowGlobalChild::ReceiveRawMessage(mozilla::dom::JSActorMessageMeta const&, mozilla::dom::ipc::StructuredCloneData&&, mozilla::dom::ipc::StructuredCloneData&&) /builds/worker/checkouts/gecko/dom/ipc/WindowGlobalChild.cpp:461:12
[task 2020-05-05T22:19:50.833Z] 22:19:50 INFO - GECKO(2014) | #31 0x7f101cd02d4b in mozilla::dom::WindowGlobalChild::RecvRawMessage(mozilla::dom::JSActorMessageMeta const&, mozilla::dom::ClonedMessageData const&, mozilla::dom::ClonedMessageData const&) /builds/worker/checkouts/gecko/dom/ipc/WindowGlobalChild.cpp:451:3
[task 2020-05-05T22:19:50.833Z] 22:19:50 INFO - GECKO(2014) | #32 0x7f1017a3145d in mozilla::dom::PWindowGlobalChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PWindowGlobalChild.cpp:973:61
[task 2020-05-05T22:19:50.868Z] 22:19:50 INFO - GECKO(2014) | #33 0x7f101757630d in mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PContentChild.cpp:8442:32
[task 2020-05-05T22:19:50.872Z] 22:19:50 INFO - GECKO(2014) | #34 0x7f10173d1b0c in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/checkouts/gecko/ipc/glue/MessageChannel.cpp:2186:25
[task 2020-05-05T22:19:50.873Z] 22:19:50 INFO - GECKO(2014) | #35 0x7f10173ce5ad in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/checkouts/gecko/ipc/glue/MessageChannel.cpp:2110:9
[task 2020-05-05T22:19:50.873Z] 22:19:50 INFO - GECKO(2014) | #36 0x7f10173cfa3f in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/checkouts/gecko/ipc/glue/MessageChannel.cpp:1958:3
[task 2020-05-05T22:19:50.874Z] 22:19:50 INFO - GECKO(2014) | #37 0x7f10173d024e in mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/checkouts/gecko/ipc/glue/MessageChannel.cpp:1989:13
[task 2020-05-05T22:19:50.889Z] 22:19:50 INFO - GECKO(2014) | #38 0x7f10163212b8 in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1200:14
[task 2020-05-05T22:19:50.889Z] 22:19:50 INFO - GECKO(2014) | #39 0x7f101632b3cc in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:481:10
[task 2020-05-05T22:19:50.889Z] 22:19:50 INFO - GECKO(2014) | #40 0x7f10173d951a in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:87:21
[task 2020-05-05T22:19:50.891Z] 22:19:50 INFO - GECKO(2014) | #41 0x7f1017302407 in RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:315:10
[task 2020-05-05T22:19:50.891Z] 22:19:50 INFO - GECKO(2014) | #42 0x7f1017302407 in RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:308:3
[task 2020-05-05T22:19:50.891Z] 22:19:50 INFO - GECKO(2014) | #43 0x7f1017302407 in MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:290:3
[task 2020-05-05T22:19:50.895Z] 22:19:50 INFO - GECKO(2014) | #44 0x7f101d47fdd8 in nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:137:27
[task 2020-05-05T22:19:50.895Z] 22:19:50 INFO - GECKO(2014) | #45 0x7f1020c5e096 in XRE_RunAppShell() /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:909:20
[task 2020-05-05T22:19:50.895Z] 22:19:50 INFO - GECKO(2014) | #46 0x7f1017302407 in RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:315:10
[task 2020-05-05T22:19:50.896Z] 22:19:50 INFO - GECKO(2014) | #47 0x7f1017302407 in RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:308:3
[task 2020-05-05T22:19:50.896Z] 22:19:50 INFO - GECKO(2014) | #48 0x7f1017302407 in MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:290:3
[task 2020-05-05T22:19:50.896Z] 22:19:50 INFO - GECKO(2014) | #49 0x7f1020c5d751 in XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:740:34
[task 2020-05-05T22:19:50.904Z] 22:19:50 INFO - GECKO(2014) | #50 0x5579f83e500b in content_process_main /builds/worker/checkouts/gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28
[task 2020-05-05T22:19:50.904Z] 22:19:50 INFO - GECKO(2014) | #51 0x5579f83e500b in main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:303:18
[task 2020-05-05T22:19:50.981Z] 22:19:50 INFO - GECKO(2014) | #52 0x7f103604eb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
[task 2020-05-05T22:19:50.981Z] 22:19:50 INFO - GECKO(2014) | #53 0x5579f8339998 in _start (/builds/worker/workspace/build/application/firefox/firefox+0xa2998)
[task 2020-05-05T22:19:50.981Z] 22:19:50 INFO - GECKO(2014) | AddressSanitizer can not provide additional info.
[task 2020-05-05T22:19:50.981Z] 22:19:50 INFO - GECKO(2014) | SUMMARY: AddressSanitizer: SEGV /builds/worker/workspace/obj-build/dist/include/js/RootingAPI.h:691:10 in set
[task 2020-05-05T22:19:50.981Z] 22:19:50 INFO - GECKO(2014) | ==2075==ABORTING
[task 2020-05-05T22:19:51.041Z] 22:19:51 INFO - GECKO(2014) | Crash cleaned up
[task 2020-05-05T22:19:51.259Z] 22:19:51 INFO - GECKO(2014) | about:tabcrashed loaded and ready
[task 2020-05-05T22:19:51.599Z] 22:19:51 INFO - GECKO(2014) | JavaScript error: resource:///modules/ContentCrashHandlers.jsm, line 50: TypeError: can't access property "permanentKey", browser is undefined
Comment 6•5 years ago
•
|
||
Other failure:
- TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_basic_endtoend.js | There should be page scripts. - false == true - got false, expected true (operator ==) with log https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=300936891&repo=autoland&lineNumber=14384
- TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_no_cache.js | Test timed out - with log https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=300946367&repo=autoland&lineNumber=3324
- https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=300949881&repo=autoland&lineNumber=3702
Assignee | ||
Updated•4 years ago
|
Comment 7•4 years ago
|
||
There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:mconley, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•4 years ago
|
Comment 9•4 years ago
|
||
Backed out 3 changesets (bug 1622088) for XPCshell and Browser-chrome failurs on browser/abouthomecache/browser_process_crash.js. CLOSED TREE
BC log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=305494437&repo=autoland&lineNumber=13849
XPCShell:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=305494824&repo=autoland&lineNumber=8511
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=238fa307504a2abf17b908078369f77a81a9cacd
Backout:
https://hg.mozilla.org/integration/autoland/rev/587696ca314a6b410110d8087ad467cadbdfc11c
Assignee | ||
Comment 10•4 years ago
|
||
The about:home startup cache needs this so that it knows when a content process has transitioned
to the privileged about content process (since, at that point, it then sends the nsIInputStreams
for the cache down to that process).
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 11•4 years ago
|
||
ni?ing jesup for https://phabricator.services.mozilla.com/D78908#2409737
Assignee | ||
Comment 12•4 years ago
|
||
Depends on D78908
Comment 13•4 years ago
|
||
Responded on phab. New notification; perhaps process-type-set.
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d7a086a83233
https://hg.mozilla.org/mozilla-central/rev/c3ba160c4aac
https://hg.mozilla.org/mozilla-central/rev/72345c1b878e
https://hg.mozilla.org/mozilla-central/rev/82096b7702c7
https://hg.mozilla.org/mozilla-central/rev/4de2192a42e4
Description
•