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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineModel.js

Issue 1104233004: DevTools: rebaseline inspector tests with poor expectations (2). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaselined Created 5 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 unified diff | Download patch
« no previous file with comments | « Source/core/inspector/InjectedScriptBase.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 _stopProfilingOnAllTargets: function() 648 _stopProfilingOnAllTargets: function()
649 { 649 {
650 var targets = this._profiling ? this._targets : []; 650 var targets = this._profiling ? this._targets : [];
651 this._profiling = false; 651 this._profiling = false;
652 return Promise.all(targets.map(this._stopProfilingOnTarget, this)); 652 return Promise.all(targets.map(this._stopProfilingOnTarget, this));
653 }, 653 },
654 654
655 /** 655 /**
656 * @param {string} categories 656 * @param {string} categories
657 * @param {boolean=} enableJSSampling 657 * @param {boolean=} enableJSSampling
658 * @param {function(?string)=} callback
658 */ 659 */
659 _startRecordingWithCategories: function(categories, enableJSSampling) 660 _startRecordingWithCategories: function(categories, enableJSSampling, callba ck)
660 { 661 {
661 if (!this._targets.length) 662 if (!this._targets.length)
662 return; 663 return;
663 WebInspector.targetManager.suspendAllTargets(); 664 WebInspector.targetManager.suspendAllTargets();
664 var profilingStartedPromise = enableJSSampling && !Runtime.experiments.i sEnabled("timelineTracingJSProfile") ? 665 var profilingStartedPromise = enableJSSampling && !Runtime.experiments.i sEnabled("timelineTracingJSProfile") ?
665 this._startProfilingOnAllTargets() : Promise.resolve(); 666 this._startProfilingOnAllTargets() : Promise.resolve();
666 var samplingFrequencyHz = WebInspector.moduleSetting("highResolutionCpuP rofiling").get() ? 10000 : 1000; 667 var samplingFrequencyHz = WebInspector.moduleSetting("highResolutionCpuP rofiling").get() ? 10000 : 1000;
667 var options = "sampling-frequency=" + samplingFrequencyHz; 668 var options = "sampling-frequency=" + samplingFrequencyHz;
668 var tracingManager = this._targets[0].tracingManager; 669 var tracingManager = this._targets[0].tracingManager;
669 profilingStartedPromise.then(tracingManager.start.bind(tracingManager, t his, categories, options, undefined)); 670 profilingStartedPromise.then(tracingManager.start.bind(tracingManager, t his, categories, options, callback));
670 }, 671 },
671 672
672 /** 673 /**
673 * @param {boolean} fromFile 674 * @param {boolean} fromFile
674 */ 675 */
675 _startCollectingTraceEvents: function(fromFile) 676 _startCollectingTraceEvents: function(fromFile)
676 { 677 {
677 this._tracingModel.reset(); 678 this._tracingModel.reset();
678 this.reset(); 679 this.reset();
679 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.Recordin gStarted, { fromFile: fromFile }); 680 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.Recordin gStarted, { fromFile: fromFile });
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */ 2084 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */
2084 this._invalidations = {}; 2085 this._invalidations = {};
2085 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */ 2086 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */
2086 this._invalidationsByNodeId = {}; 2087 this._invalidationsByNodeId = {};
2087 2088
2088 this._lastRecalcStyle = undefined; 2089 this._lastRecalcStyle = undefined;
2089 this._lastPaintWithLayer = undefined; 2090 this._lastPaintWithLayer = undefined;
2090 this._didPaint = false; 2091 this._didPaint = false;
2091 } 2092 }
2092 } 2093 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698