Commit 79ffcf53 authored by Matthew Cary's avatar Matthew Cary Committed by Commit Bot

CustomTabs: update benchmark tool for warmupCompleted callback.

This callback was recently added to the CustomTabs API, but the benchmark
tool was not updated and crashes when receiving this unexpected callback.

Change-Id: I4288af96791f4ac5087a8a16ad5cb9a25a150b58
Reviewed-on: https://chromium-review.googlesource.com/964323Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Commit-Queue: Matthew Cary <mattcary@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543365}
parent 49736ec2
...@@ -287,7 +287,10 @@ public class MainActivity extends Activity implements View.OnClickListener { ...@@ -287,7 +287,10 @@ public class MainActivity extends Activity implements View.OnClickListener {
@Override @Override
public void extraCallback(String callbackName, Bundle args) { public void extraCallback(String callbackName, Bundle args) {
assert "NavigationMetrics".equals(callbackName); if (!"NavigationMetrics".equals(callbackName)) {
Log.w(TAG, "Unknown extra callback skipped: " + callbackName);
return;
}
long firstPaintMs = args.getLong("firstContentfulPaint", NONE); long firstPaintMs = args.getLong("firstContentfulPaint", NONE);
long navigationStartMs = args.getLong("navigationStart", NONE); long navigationStartMs = args.getLong("navigationStart", NONE);
if (firstPaintMs == NONE || navigationStartMs == NONE) return; if (firstPaintMs == NONE || navigationStartMs == NONE) return;
......
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