Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: tracing/tracing/extras/chrome/estimated_input_latency_test.html

Issue 2862103002: Fix main frame detection in loading metrics. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tracing/tracing/metrics/system_health/expected_queueing_time_metric_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/extras/chrome/estimated_input_latency_test.html
diff --git a/tracing/tracing/extras/chrome/estimated_input_latency_test.html b/tracing/tracing/extras/chrome/estimated_input_latency_test.html
index 64878fddd3fdbed7997c9142032d7ec86051a5c2..f30e9dd4f4e4379c72eb9028a353b5a4b835c041 100644
--- a/tracing/tracing/extras/chrome/estimated_input_latency_test.html
+++ b/tracing/tracing/extras/chrome/estimated_input_latency_test.html
@@ -56,13 +56,20 @@ tr.b.unittest.testSuite(function() {
* Adds a FrameLoader snapshot to rendererProcess that is used by test FMP
* candidate slices.
*/
- function addTestFrame(rendererProcess) {
+ function addTestFrame(rendererProcess, mainThread) {
rendererProcess.objects.addSnapshot(
'ptr', 'loading', 'FrameLoader', 300, {
isLoadingMainFrame: true,
frame: {id_ref: '0xdeadbeef'},
documentLoaderURL: 'http://example.com'
});
+ mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
+ cat: 'loading',
+ title: 'markAsMainFrame',
+ start: 300,
+ duration: 0.0,
+ args: {frame: '0xdeadbeef'}
+ }));
}
function addNavigationStart(mainThread, startNavTime) {
@@ -123,9 +130,8 @@ tr.b.unittest.testSuite(function() {
*/
test('getInteractiveTimestamps', () => {
const model = createTestModel(rendererProcess => {
- addTestFrame(rendererProcess);
-
const mainThread = rendererProcess.getOrCreateThread(MAIN_THREAD_ID);
+ addTestFrame(rendererProcess, mainThread);
addNavigationStart(mainThread, 0);
addFMPCandidate(mainThread, 5000);
@@ -155,7 +161,7 @@ tr.b.unittest.testSuite(function() {
const mainThread = rendererProcess.getOrCreateThread(pid + 10);
mainThread.name = 'CrRendererMain';
- addTestFrame(rendererProcess);
+ addTestFrame(rendererProcess, mainThread);
addNavigationStart(mainThread, pid * 1000);
addFMPCandidate(mainThread, pid * 1000 + 2000);
addNavigationStart(mainThread, pid * 2000);
« no previous file with comments | « no previous file | tracing/tracing/metrics/system_health/expected_queueing_time_metric_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698