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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/Tests.js

Issue 2486853002: Timeline: remove TimelineModel inferred properties from TracingModel.Event (Closed)
Patch Set: addressed comments and rebased Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 var expectedEvents = new Set(arguments); 969 var expectedEvents = new Set(arguments);
970 var model = WebInspector.panels.timeline._model; 970 var model = WebInspector.panels.timeline._model;
971 var asyncEvents = model.mainThreadAsyncEvents(); 971 var asyncEvents = model.mainThreadAsyncEvents();
972 var input = asyncEvents.get(WebInspector.TimelineModel.AsyncEventGroup.input ) || []; 972 var input = asyncEvents.get(WebInspector.TimelineModel.AsyncEventGroup.input ) || [];
973 var prefix = 'InputLatency::'; 973 var prefix = 'InputLatency::';
974 for (var e of input) { 974 for (var e of input) {
975 if (!e.name.startsWith(prefix)) 975 if (!e.name.startsWith(prefix))
976 continue; 976 continue;
977 if (e.steps.length < 2) 977 if (e.steps.length < 2)
978 continue; 978 continue;
979 if (e.name.startsWith(prefix + 'Mouse') && typeof e.steps[0].timeWaitingFo rMainThread !== 'number') 979 if (e.name.startsWith(prefix + 'Mouse') && typeof WebInspector.TimelineDat a.forEvent(e.steps[0]).timeWaitingForMainThread !== 'number')
980 throw `Missing timeWaitingForMainThread on ${e.name}`; 980 throw `Missing timeWaitingForMainThread on ${e.name}`;
981 expectedEvents.delete(e.name.substr(prefix.length)); 981 expectedEvents.delete(e.name.substr(prefix.length));
982 } 982 }
983 if (expectedEvents.size) 983 if (expectedEvents.size)
984 throw 'Some expected events are not found: ' + Array.from(expectedEvents.k eys()).join(','); 984 throw 'Some expected events are not found: ' + Array.from(expectedEvents.k eys()).join(',');
985 }; 985 };
986 986
987 /** 987 /**
988 * Serializes array of uiSourceCodes to string. 988 * Serializes array of uiSourceCodes to string.
989 * @param {!Array.<!WebInspectorUISourceCode>} uiSourceCodes 989 * @param {!Array.<!WebInspectorUISourceCode>} uiSourceCodes
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 callback.call(null); 1107 callback.call(null);
1108 else 1108 else
1109 this.addSniffer( 1109 this.addSniffer(
1110 WebInspector.RuntimeModel.prototype, '_executionContextCreated', che ckForExecutionContexts.bind(this)); 1110 WebInspector.RuntimeModel.prototype, '_executionContextCreated', che ckForExecutionContexts.bind(this));
1111 } 1111 }
1112 }; 1112 };
1113 1113
1114 1114
1115 window.uiTests = new TestSuite(window.domAutomationController); 1115 window.uiTests = new TestSuite(window.domAutomationController);
1116 })(window); 1116 })(window);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698