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

Unified Diff: tracing/tracing/base/multi_dimensional_view_test.html

Issue 2959713003: Remove tr.b.findFirstKeyInDictMatching. (Closed)
Patch Set: rebase Created 3 years, 6 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 | « tracing/tracing/base/iteration_helpers_test.html ('k') | tracing/tracing/ui/base/mouse_mode_icon.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/multi_dimensional_view_test.html
diff --git a/tracing/tracing/base/multi_dimensional_view_test.html b/tracing/tracing/base/multi_dimensional_view_test.html
index 3fb428eb892eea8ad0225e212aec6e40b0cd9dfb..4722c4f853df2a0097a3c1edab9cbc0bd2bf1d8e 100644
--- a/tracing/tracing/base/multi_dimensional_view_test.html
+++ b/tracing/tracing/base/multi_dimensional_view_test.html
@@ -373,10 +373,15 @@ tr.b.unittest.testSuite(function() {
generator.push('self: ', String(value.self), ',');
generator.breakLine();
generator.push('totalState: ');
- const totalStateName =
- tr.b.findFirstKeyInDictMatching(
- MultiDimensionalViewNode.TotalState,
- (n, s) => s === value.totalState);
+
+ let totalStateName;
+ for (const [name, state] of Object.entries(
+ MultiDimensionalViewNode.TotalState)) {
+ if (state === value.totalState) {
+ totalStateName = name;
+ break;
+ }
+ }
if (totalStateName === undefined) {
throw new Error(
'Unknown total state: ' + value.totalState);
« no previous file with comments | « tracing/tracing/base/iteration_helpers_test.html ('k') | tracing/tracing/ui/base/mouse_mode_icon.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698