| Index: tracing/tracing/metrics/system_health/loading_metric_test.html
|
| diff --git a/tracing/tracing/metrics/system_health/loading_metric_test.html b/tracing/tracing/metrics/system_health/loading_metric_test.html
|
| index 9d13ca6737dea34b94ecb781508623349dd7eff6..4f9e3c6c127f5fa5e7bc9e46d295c52f8b9dfc1b 100644
|
| --- a/tracing/tracing/metrics/system_health/loading_metric_test.html
|
| +++ b/tracing/tracing/metrics/system_health/loading_metric_test.html
|
| @@ -32,13 +32,6 @@
|
| documentLoaderURL: 'http://example.com'
|
| });
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading,rail,devtools.timeline',
|
| title: 'firstContentfulPaint',
|
| start: 1000,
|
| @@ -80,13 +73,6 @@
|
| documentLoaderURL: 'http://example.com'
|
| });
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading,rail,devtools.timeline',
|
| title: 'firstContentfulPaint',
|
| start: 1000,
|
| @@ -115,13 +101,6 @@
|
| documentLoaderURL: 'http://example.com'
|
| });
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 2100,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading,rail,devtools.timeline',
|
| title: 'firstContentfulPaint',
|
| start: 2400,
|
| @@ -154,13 +133,6 @@
|
| 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'}
|
| - }));
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading',
|
| title: 'firstMeaningfulPaintCandidate',
|
| @@ -212,13 +184,6 @@
|
| });
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| title: 'firstMeaningfulPaintCandidate',
|
| start: 600,
|
| duration: 0.0,
|
| @@ -280,13 +245,6 @@
|
| 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'}
|
| - }));
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading',
|
| title: 'firstMeaningfulPaintCandidate',
|
| @@ -359,13 +317,6 @@
|
| });
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| title: 'firstMeaningfulPaintCandidate',
|
| start: 600,
|
| duration: 0.0,
|
| @@ -400,13 +351,6 @@
|
| 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'}
|
| - }));
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading',
|
| title: 'firstMeaningfulPaintCandidate',
|
| @@ -463,13 +407,6 @@
|
| 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'}
|
| - }));
|
|
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading',
|
| @@ -564,13 +501,6 @@
|
| });
|
| mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| title: 'firstMeaningfulPaintCandidate',
|
| start: 9180,
|
| duration: 0.0,
|
| @@ -662,13 +592,6 @@
|
| frame: {id_ref: '0xdeadbeef'},
|
| documentLoaderURL: 'http://example.com'
|
| });
|
| - rendererThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| rendererThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| cat: 'loading,rail,devtools.timeline',
|
| title: 'firstContentfulPaint',
|
| @@ -792,175 +715,5 @@
|
| [netEvent1, netEvent2],
|
| partialNetworkEvents);
|
| });
|
| -
|
| - test('MainFrameHelper_isMainFrame_inLiveRange', function() {
|
| - // The FrameLoader loads a frame 0xdeadbeef at 300ms.
|
| - // The frame 0xdeadbeef is marked as the main frame at 300ms.
|
| - // The isMainFrame('0xdeadbeef', 300) check is expected to succeed.
|
| - const model = tr.c.TestUtils.newModel(function(model) {
|
| - const process = model.getOrCreateProcess(1);
|
| - const rendererThread = process.getOrCreateThread(2);
|
| - rendererThread.name = 'CrRendererMain';
|
| - process.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
|
| - {
|
| - isLoadingMainFrame: true,
|
| - frame: {id_ref: '0xdeadbeef'},
|
| - documentLoaderURL: 'http://example.com'
|
| - });
|
| - rendererThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - });
|
| - const rendererHelper = model.getOrCreateHelper(
|
| - tr.model.helpers.ChromeModelHelper).rendererHelpers[1];
|
| - const mainFrameHelper = new tr.metrics.sh.MainFrameHelper(rendererHelper);
|
| - assert(mainFrameHelper.isMainFrame('0xdeadbeef', 300));
|
| - });
|
| -
|
| - test('MainFrameHelper_isMainFrame_outsideLiveRange', function() {
|
| - // The FrameLoader loads a frame 0xdeadbeef at 300ms.
|
| - // The frame 0xdeadbeef is marked as the main frame at 300ms.
|
| - // The isMainFrame('0xdeadbeef', 500) check is expected to fail.
|
| - const model = tr.c.TestUtils.newModel(function(model) {
|
| - const process = model.getOrCreateProcess(1);
|
| - const rendererThread = process.getOrCreateThread(2);
|
| - rendererThread.name = 'CrRendererMain';
|
| - process.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
|
| - {
|
| - isLoadingMainFrame: true,
|
| - frame: {id_ref: '0xdeadbeef'},
|
| - documentLoaderURL: 'http://example.com'
|
| - });
|
| - rendererThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - });
|
| - const rendererHelper = model.getOrCreateHelper(
|
| - tr.model.helpers.ChromeModelHelper).rendererHelpers[1];
|
| - const mainFrameHelper = new tr.metrics.sh.MainFrameHelper(rendererHelper);
|
| - assert.isFalse(mainFrameHelper.isMainFrame('0xdeadbeef', 500));
|
| - });
|
| -
|
| - test('MainFrameHelper_isMainFrame_pluginFrame', function() {
|
| - // The FrameLoader loads a plugin frame 0xdeadbeef at 300ms.
|
| - // The frame 0xdeadbeef is marked as the main frame at 300ms.
|
| - // The isMainFrame('0xdeadbeef', 300) check is expected to fail because the
|
| - // frame is a plugin frame.
|
| - const model = tr.c.TestUtils.newModel(function(model) {
|
| - const process = model.getOrCreateProcess(1);
|
| - const rendererThread = process.getOrCreateThread(2);
|
| - rendererThread.name = 'CrRendererMain';
|
| - process.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
|
| - {
|
| - isLoadingMainFrame: true,
|
| - frame: {id_ref: '0xdeadbeef'},
|
| - documentLoaderURL: 'data:text/html,pluginplaceholderdata'
|
| - });
|
| - rendererThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - });
|
| - const rendererHelper = model.getOrCreateHelper(
|
| - tr.model.helpers.ChromeModelHelper).rendererHelpers[1];
|
| - const mainFrameHelper = new tr.metrics.sh.MainFrameHelper(rendererHelper);
|
| - assert.isFalse(mainFrameHelper.isMainFrame('0xdeadbeef', 300));
|
| - });
|
| -
|
| - test('MainFrameHelper_isMainFrame_unmarked', function() {
|
| - // The FrameLoader loads a frame 0xdeadbeef at 300ms.
|
| - // A frame 0x00000000 is marked as the main frame at 300ms.
|
| - // The isMainFrame('0xdeadbeef', 300) check is expected to fail.
|
| - const model = tr.c.TestUtils.newModel(function(model) {
|
| - const process = model.getOrCreateProcess(1);
|
| - const rendererThread = process.getOrCreateThread(2);
|
| - rendererThread.name = 'CrRendererMain';
|
| - process.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
|
| - {
|
| - isLoadingMainFrame: true,
|
| - frame: {id_ref: '0xdeadbeef'},
|
| - documentLoaderURL: 'http://example.com'
|
| - });
|
| - rendererThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0x00000000'}
|
| - }));
|
| - });
|
| - const rendererHelper = model.getOrCreateHelper(
|
| - tr.model.helpers.ChromeModelHelper).rendererHelpers[1];
|
| - const mainFrameHelper = new tr.metrics.sh.MainFrameHelper(rendererHelper);
|
| - assert.isFalse(mainFrameHelper.isMainFrame('0xdeadbeef', 300));
|
| - });
|
| -
|
| - test('MainFrameHelper_getURL', function() {
|
| - // The FrameLoader loads http://example.com to frame 0xdeadbeef at 300ms.
|
| - // The frame 0xdeadbeef is marked as the main frame at 300ms.
|
| - // getURL('0xdeadbeef', 300) is expected to return http://example.com.
|
| - const model = tr.c.TestUtils.newModel(function(model) {
|
| - const process = model.getOrCreateProcess(1);
|
| - const rendererThread = process.getOrCreateThread(2);
|
| - rendererThread.name = 'CrRendererMain';
|
| - process.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
|
| - {
|
| - isLoadingMainFrame: true,
|
| - frame: {id_ref: '0xdeadbeef'},
|
| - documentLoaderURL: 'http://example.com'
|
| - });
|
| - rendererThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - });
|
| - const rendererHelper = model.getOrCreateHelper(
|
| - tr.model.helpers.ChromeModelHelper).rendererHelpers[1];
|
| - const mainFrameHelper = new tr.metrics.sh.MainFrameHelper(rendererHelper);
|
| - assert.strictEqual(mainFrameHelper.getURL('0xdeadbeef', 300),
|
| - 'http://example.com');
|
| - });
|
| -
|
| - test('MainFrameHelper_getURL_undefined', function() {
|
| - // The FrameLoader loads http://example.com to frame 0xdeadbeef at 300ms.
|
| - // The frame 0xdeadbeef is marked as the main frame at 300ms.
|
| - // getURL('0x00000000', 300) is expected to return the undefined value.
|
| - const model = tr.c.TestUtils.newModel(function(model) {
|
| - const process = model.getOrCreateProcess(1);
|
| - const rendererThread = process.getOrCreateThread(2);
|
| - rendererThread.name = 'CrRendererMain';
|
| - process.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
|
| - {
|
| - isLoadingMainFrame: true,
|
| - frame: {id_ref: '0xdeadbeef'},
|
| - documentLoaderURL: 'http://example.com'
|
| - });
|
| - rendererThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
|
| - cat: 'loading',
|
| - title: 'markAsMainFrame',
|
| - start: 300,
|
| - duration: 0.0,
|
| - args: {frame: '0xdeadbeef'}
|
| - }));
|
| - });
|
| - const rendererHelper = model.getOrCreateHelper(
|
| - tr.model.helpers.ChromeModelHelper).rendererHelpers[1];
|
| - const mainFrameHelper = new tr.metrics.sh.MainFrameHelper(rendererHelper);
|
| - assert.strictEqual(mainFrameHelper.getURL('0x00000000', 300), undefined);
|
| - });
|
| });
|
| </script>
|
|
|