Commit d0b7da14 authored by Scott Haseley's avatar Scott Haseley Committed by Commit Bot

RC: Allow renderer-initiated freezing, as triggered by ChromeDriver

Change TabLifecycleUnit to consider active --> frozen as a valid state
change if initiated from the renderer. Freezing a page through
ChromeDriver will trigger a renderer-initiated freeze event and cause
this transition. This is necessary for wpt tests to work on
DCHECK-enabled builds outside of web_tests.

Bug: 930270
Change-Id: I335ba03eba6046e397c4917561c556eb72216a99
Reviewed-on: https://chromium-review.googlesource.com/c/1460433Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Scott Haseley <shaseley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630568}
parent f65150ea
...@@ -71,6 +71,11 @@ bool IsValidStateChange(LifecycleUnitState from, ...@@ -71,6 +71,11 @@ bool IsValidStateChange(LifecycleUnitState from,
return reason == StateChangeReason::SYSTEM_MEMORY_PRESSURE || return reason == StateChangeReason::SYSTEM_MEMORY_PRESSURE ||
reason == StateChangeReason::EXTENSION_INITIATED; reason == StateChangeReason::EXTENSION_INITIATED;
} }
case LifecycleUnitState::FROZEN: {
// Render-initiated freezing, which happens when freezing a page
// through ChromeDriver.
return reason == StateChangeReason::RENDERER_INITIATED;
}
default: default:
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment