Commit 9e3166ff authored by Tim van der Lippe's avatar Tim van der Lippe Committed by Commit Bot

Prepare test expectations for ProductRegistry removal

Bug: 1011466
Change-Id: I1187389e33f3bf97a51ed27f09d0e5a57b0f7831
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899504
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712629}
parent 2d1727f5
...@@ -3584,7 +3584,6 @@ crbug.com/420008 http/tests/devtools/tracing/timeline-js/timeline-js-line-level- ...@@ -3584,7 +3584,6 @@ crbug.com/420008 http/tests/devtools/tracing/timeline-js/timeline-js-line-level-
crbug.com/420008 http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile-no-url-end-to-end.js [ Crash ] crbug.com/420008 http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile-no-url-end-to-end.js [ Crash ]
crbug.com/420008 http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile.js [ Crash ] crbug.com/420008 http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile.js [ Crash ]
crbug.com/420008 crbug.com/916975 http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Crash Failure Pass Timeout ] crbug.com/420008 crbug.com/916975 http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Crash Failure Pass Timeout ]
crbug.com/420008 http/tests/devtools/tracing/timeline-misc/timeline-event-details.js [ Crash ]
crbug.com/420008 http/tests/devtools/tracing/timeline-misc/timeline-event-dispatch.js [ Timeout ] crbug.com/420008 http/tests/devtools/tracing/timeline-misc/timeline-event-dispatch.js [ Timeout ]
crbug.com/420008 http/tests/devtools/tracing/timeline-time/timeline-usertiming.js [ Crash ] crbug.com/420008 http/tests/devtools/tracing/timeline-time/timeline-usertiming.js [ Crash ]
crbug.com/982194 http/tests/devtools/unit/datagrid-editable-longtext.js [ Crash ] crbug.com/982194 http/tests/devtools/unit/datagrid-editable-longtext.js [ Crash ]
...@@ -6107,7 +6106,6 @@ crbug.com/420008 virtual/threaded/http/tests/devtools/tracing/hit-test.js [ Fail ...@@ -6107,7 +6106,6 @@ crbug.com/420008 virtual/threaded/http/tests/devtools/tracing/hit-test.js [ Fail
crbug.com/420008 virtual/threaded/http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile-end-to-end.js [ Crash Pass ] crbug.com/420008 virtual/threaded/http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile-end-to-end.js [ Crash Pass ]
crbug.com/982194 virtual/threaded/http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile.js [ Crash Pass ] crbug.com/982194 virtual/threaded/http/tests/devtools/tracing/timeline-js/timeline-js-line-level-profile.js [ Crash Pass ]
crbug.com/982194 virtual/threaded/http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Crash Failure ] crbug.com/982194 virtual/threaded/http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Crash Failure ]
crbug.com/420008 virtual/threaded/http/tests/devtools/tracing/timeline-misc/timeline-event-details.js [ Crash Pass ]
crbug.com/420008 virtual/threaded/http/tests/devtools/tracing/timeline-misc/timeline-event-dispatch.js [ Timeout ] crbug.com/420008 virtual/threaded/http/tests/devtools/tracing/timeline-misc/timeline-event-dispatch.js [ Timeout ]
crbug.com/982194 virtual/threaded/http/tests/devtools/tracing/timeline-paint/paint-profiler-update.js [ Crash ] crbug.com/982194 virtual/threaded/http/tests/devtools/tracing/timeline-paint/paint-profiler-update.js [ Crash ]
crbug.com/982194 virtual/threaded/http/tests/devtools/tracing/timeline-time/timeline-usertiming.js [ Crash Pass ] crbug.com/982194 virtual/threaded/http/tests/devtools/tracing/timeline-time/timeline-usertiming.js [ Crash Pass ]
......
...@@ -5745,6 +5745,14 @@ crbug.com/963183 http/tests/devtools/network/preview-searchable.js [ Pass Failur ...@@ -5745,6 +5745,14 @@ crbug.com/963183 http/tests/devtools/network/preview-searchable.js [ Pass Failur
crbug.com/963183 http/tests/devtools/network/waterfall-header-height-updates.js [ Pass Failure ] crbug.com/963183 http/tests/devtools/network/waterfall-header-height-updates.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/network/network-search.js [ Pass Timeout Failure ] crbug.com/963183 http/tests/devtools/network/network-search.js [ Pass Timeout Failure ]
# Temporarily disabled for landing productregistry removal in devtools
crbug.com/1011466 http/tests/devtools/console/console-format-classes.js [ Pass Failure ]
crbug.com/1011466 http/tests/devtools/modules-load-initial.js [ Pass Failure ]
crbug.com/1011466 http/tests/devtools/tracing/timeline-misc/timeline-aggregated-details.js [ Pass Failure ]
crbug.com/1011466 http/tests/devtools/tracing/timeline-network/timeline-network-resource-details.js [ Pass Failure ]
crbug.com/1011466 virtual/threaded/http/tests/devtools/tracing/timeline-misc/timeline-aggregated-details.js [ Pass Failure ]
crbug.com/1011466 virtual/threaded/http/tests/devtools/tracing/timeline-network/timeline-network-resource-details.js [ Pass Failure ]
# Sheriff 2019-11-04 # Sheriff 2019-11-04
crbug.com/1021407 [ Retina Release ] virtual/audio-service/media/video-controls-rendering.html [ Pass Failure ] crbug.com/1021407 [ Retina Release ] virtual/audio-service/media/video-controls-rendering.html [ Pass Failure ]
crbug.com/1021407 [ Mac10.11 ] virtual/audio-service/media/controls/video-overlay-cast-dark-rendering.html [ Pass Failure ] crbug.com/1021407 [ Mac10.11 ] virtual/audio-service/media/controls/video-overlay-cast-dark-rendering.html [ Pass Failure ]
......
...@@ -6,8 +6,6 @@ console-format-classes.js:30 Error: custom error with link www.chromium.org ...@@ -6,8 +6,6 @@ console-format-classes.js:30 Error: custom error with link www.chromium.org
source-code source-code
console-message-anchor console-message-anchor
devtools-link devtools-link
hidden console-message-badge
hide-badge-title
console-message-text console-message-text
object-value-error source-code object-value-error source-code
devtools-link devtools-link
...@@ -17,8 +15,6 @@ console-format-classes.js:30 (6) [1, empty × 2, 2, (...), empty] ...@@ -17,8 +15,6 @@ console-format-classes.js:30 (6) [1, empty × 2, 2, (...), empty]
source-code source-code
console-message-anchor console-message-anchor
devtools-link devtools-link
hidden console-message-badge
hide-badge-title
console-message-text console-message-text
console-view-object-properties-section object-value-array source-code console-view-object-properties-section object-value-array source-code
tree-outline-disclosure tree-outline-disclosure-hide-overflow tree-outline-disclosure tree-outline-disclosure-hide-overflow
...@@ -40,8 +36,6 @@ console-format-classes.js:30 {a: 1} ...@@ -40,8 +36,6 @@ console-format-classes.js:30 {a: 1}
source-code source-code
console-message-anchor console-message-anchor
devtools-link devtools-link
hidden console-message-badge
hide-badge-title
console-message-text console-message-text
console-view-object-properties-section object-value-object source-code console-view-object-properties-section object-value-object source-code
tree-outline-disclosure tree-outline-disclosure-hide-overflow tree-outline-disclosure tree-outline-disclosure-hide-overflow
...@@ -59,8 +53,6 @@ console-format-classes.js:30 {str: "", nan: NaN, posInf: Infinity, negInf: -Infi ...@@ -59,8 +53,6 @@ console-format-classes.js:30 {str: "", nan: NaN, posInf: Infinity, negInf: -Infi
source-code source-code
console-message-anchor console-message-anchor
devtools-link devtools-link
hidden console-message-badge
hide-badge-title
console-message-text console-message-text
console-view-object-properties-section object-value-object source-code console-view-object-properties-section object-value-object source-code
tree-outline-disclosure tree-outline-disclosure-hide-overflow tree-outline-disclosure tree-outline-disclosure-hide-overflow
...@@ -86,8 +78,6 @@ console-format-classes.js:30 {null: null, undef: undefined, regexp: /^[regexp]$/ ...@@ -86,8 +78,6 @@ console-format-classes.js:30 {null: null, undef: undefined, regexp: /^[regexp]$/
source-code source-code
console-message-anchor console-message-anchor
devtools-link devtools-link
hidden console-message-badge
hide-badge-title
console-message-text console-message-text
console-view-object-properties-section object-value-object source-code console-view-object-properties-section object-value-object source-code
tree-outline-disclosure tree-outline-disclosure-hide-overflow tree-outline-disclosure tree-outline-disclosure-hide-overflow
...@@ -111,8 +101,6 @@ console-format-classes.js:30 Proxy {a: 1} ...@@ -111,8 +101,6 @@ console-format-classes.js:30 Proxy {a: 1}
source-code source-code
console-message-anchor console-message-anchor
devtools-link devtools-link
hidden console-message-badge
hide-badge-title
console-message-text console-message-text
console-view-object-properties-section object-value-proxy source-code console-view-object-properties-section object-value-proxy source-code
tree-outline-disclosure tree-outline-disclosure-hide-overflow tree-outline-disclosure tree-outline-disclosure-hide-overflow
...@@ -131,8 +119,6 @@ console-format-classes.js:30 HTMLAllCollection(4) [html, head, base, body] ...@@ -131,8 +119,6 @@ console-format-classes.js:30 HTMLAllCollection(4) [html, head, base, body]
source-code source-code
console-message-anchor console-message-anchor
devtools-link devtools-link
hidden console-message-badge
hide-badge-title
console-message-text console-message-text
console-view-object-properties-section object-value-array source-code console-view-object-properties-section object-value-array source-code
tree-outline-disclosure tree-outline-disclosure-hide-overflow tree-outline-disclosure tree-outline-disclosure-hide-overflow
...@@ -158,8 +144,6 @@ console-format-classes.js:34 (7) [Error: custom error with link www.chromium.or ...@@ -158,8 +144,6 @@ console-format-classes.js:34 (7) [Error: custom error with link www.chromium.or
source-code source-code
console-message-anchor console-message-anchor
devtools-link devtools-link
hidden console-message-badge
hide-badge-title
console-message-text console-message-text
console-view-object-properties-section object-value-array source-code console-view-object-properties-section object-value-array source-code
tree-outline-disclosure tree-outline-disclosure-hide-overflow tree-outline-disclosure tree-outline-disclosure-hide-overflow
......
...@@ -15,7 +15,6 @@ Loaded modules: ...@@ -15,7 +15,6 @@ Loaded modules:
mobile_throttling mobile_throttling
persistence persistence
platform platform
product_registry
protocol protocol
sdk sdk
services services
......
Tests SHA-1 hashes.
foobar : 8843d7f92416211de9ebb963ff4ce28125932878
hello : aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
abcdefghijklmnopqrstuvwxyz : 32d10c7b8cf96570ca04ce37f2a19d84240d3a89
ABCDEFGHIJKLMNOPQRSTUVWXYZ : 80256f39a9d308650ac90d9be9a72a9562454574
a : 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8
A : 6dcd4ce23d88e2ee9568ba546c007c63d9131c1b
A1 : 1ffd4ba3eb9ffadf4db3c3ff4c1bbcf94a64cc59
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Tests SHA-1 hashes.\n`);
await TestRunner.loadModule('product_registry_impl');
TestRunner.addResult('foobar : ' + ProductRegistryImpl.sha1('foobar'));
TestRunner.addResult('hello : ' + ProductRegistryImpl.sha1('hello'));
TestRunner.addResult('abcdefghijklmnopqrstuvwxyz : ' + ProductRegistryImpl.sha1('abcdefghijklmnopqrstuvwxyz'));
TestRunner.addResult('ABCDEFGHIJKLMNOPQRSTUVWXYZ : ' + ProductRegistryImpl.sha1('ABCDEFGHIJKLMNOPQRSTUVWXYZ'));
TestRunner.addResult('a : ' + ProductRegistryImpl.sha1('a'));
TestRunner.addResult('A : ' + ProductRegistryImpl.sha1('A'));
TestRunner.addResult('A1 : ' + ProductRegistryImpl.sha1('A1'));
TestRunner.completeTest();
})();
Test timeline aggregated details. Test timeline aggregated details.
Cleared ProductRegistryImpl
Adding entry: *.google.com
CallTree Group by: None CallTree Group by: None
...@@ -371,7 +369,7 @@ BottomUp Group by: Domain ...@@ -371,7 +369,7 @@ BottomUp Group by: Domain
Function Call: 0.600 1.000 Function Call: 0.600 1.000
Other: 0.600 1.000 Other: 0.600 1.000
Other: 260.000 300.000 Other: 260.000 300.000
google.com — Google: 0.215 0.215 google.com: 0.215 0.215
recursive_b: 0.110 0.114 recursive_b: 0.110 0.114
recursive_a: 0.110 0.114 recursive_a: 0.110 0.114
recursive_b: 0.008 0.008 recursive_b: 0.008 0.008
...@@ -467,103 +465,7 @@ BottomUp Group by: Subdomain ...@@ -467,103 +465,7 @@ BottomUp Group by: Subdomain
Function Call: 0.600 1.000 Function Call: 0.600 1.000
Other: 0.600 1.000 Other: 0.600 1.000
Other: 260.000 300.000 Other: 260.000 300.000
www.google.com — Google: 0.215 0.215 www.google.com: 0.215 0.215
recursive_b: 0.110 0.114
recursive_a: 0.110 0.114
recursive_b: 0.008 0.008
recursive_a: 0.008 0.008
Function Call: 0.008 0.008
Other: 0.008 0.008
Function Call: 0.102 0.106
Other: 0.102 0.114
recursive_a: 0.105 0.215
recursive_b: 0.004 0.012
recursive_a: 0.004 0.012
Function Call: 0.004 0.012
Other: 0.004 0.012
Function Call: 0.101 0.203
Other: 0.101 0.215
CallTree Group by: Product
[unattributed]: 260.000 300.000
Other: 260.000 300.000
Function Call: 17.660 40.000
a: 0.000 11.125
b: 0.000 11.125
c: 8.250 8.250
e: 0.000 2.875
g: 2.875 2.875
f: 0.000 0.125
l: 0.000 0.125
a: 0.025 0.125
Layout: 0.100 0.100
sin: 0.000 9.875
f: 0.000 9.875
l: 0.000 9.875
a: 9.875 9.875
Function Call: 0.000 1.000
x: 0.000 1.000
y: 0.600 1.000
z: 0.000 0.200
w: 0.200 0.200
w: 0.200 0.200
recursive_a: 0.101 0.215
recursive_b: 0.102 0.114
recursive_a: 0.004 0.012
recursive_b: 0.008 0.008
BottomUp Group by: Product
[unattributed]: 299.785 299.785
c: 8.250 8.250
b: 8.250 8.250
a: 8.250 8.250
Function Call: 8.250 8.250
Other: 8.250 8.250
a: 9.900 21.125
Function Call: 0.000 11.125
Other: 0.000 11.125
l: 9.900 10.000
f: 9.900 10.000
Function Call: 0.025 0.125
Other: 0.025 0.125
sin: 9.875 9.875
Function Call: 9.875 9.875
Other: 9.875 9.875
g: 2.875 2.875
e: 2.875 2.875
b: 2.875 2.875
a: 2.875 2.875
Function Call: 2.875 2.875
Other: 2.875 2.875
Layout: 0.100 0.100
a: 0.100 0.100
l: 0.100 0.100
f: 0.100 0.100
Function Call: 0.100 0.100
Other: 0.100 0.100
Function Call: 17.660 40.000
Other: 17.660 38.000
Function Call: 0.000 1.000
Other: 0.000 1.000
w: 0.400 0.400
z: 0.200 0.200
y: 0.200 0.200
x: 0.200 0.200
Function Call: 0.200 0.200
Function Call: 0.200 0.200
Other: 0.200 0.200
y: 0.200 0.200
x: 0.200 0.200
Function Call: 0.200 0.200
Function Call: 0.200 0.200
Other: 0.200 0.200
y: 0.600 1.000
x: 0.600 1.000
Function Call: 0.600 1.000
Function Call: 0.600 1.000
Other: 0.600 1.000
Other: 260.000 300.000
Google: 0.215 0.215
recursive_b: 0.110 0.114 recursive_b: 0.110 0.114
recursive_a: 0.110 0.114 recursive_a: 0.110 0.114
recursive_b: 0.008 0.008 recursive_b: 0.008 0.008
......
...@@ -8,9 +8,6 @@ ...@@ -8,9 +8,6 @@
await TestRunner.loadModule('network_test_runner'); await TestRunner.loadModule('network_test_runner');
await TestRunner.showPanel('timeline'); await TestRunner.showPanel('timeline');
await ProductRegistry.instance();
NetworkTestRunner.resetProductRegistry();
NetworkTestRunner.addProductRegistryEntry('*.google.com', 'Google');
TestRunner.addResult(''); TestRunner.addResult('');
var sessionId = '6.23'; var sessionId = '6.23';
...@@ -565,7 +562,6 @@ ...@@ -565,7 +562,6 @@
var timeline = UI.panels.timeline; var timeline = UI.panels.timeline;
timeline._setModel(PerformanceTestRunner.createPerformanceModelWithEvents(rawTraceEvents)); timeline._setModel(PerformanceTestRunner.createPerformanceModelWithEvents(rawTraceEvents));
await ProductRegistry.instance();
var groupByEnum = Timeline.AggregatedTimelineTreeView.GroupBy; var groupByEnum = Timeline.AggregatedTimelineTreeView.GroupBy;
for (var grouping of Object.values(groupByEnum)) { for (var grouping of Object.values(groupByEnum)) {
testEventTree('CallTree', grouping); testEventTree('CallTree', grouping);
......
Checks the Product property in details pane for a node with URL.
Cleared ProductRegistryImpl
Adding entry: *.google.com
Script: www.google.com:1337
: Google
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Checks the Product property in details pane for a node with URL.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.loadModule('network_test_runner');
await TestRunner.showPanel('timeline');
await ProductRegistry.instance();
NetworkTestRunner.resetProductRegistry();
NetworkTestRunner.addProductRegistryEntry('*.google.com', 'Google');
TestRunner.addResult('');
var sessionId = '6.23';
var rawTraceEvents = [
{
'args': {'name': 'Renderer'},
'cat': '__metadata',
'name': 'process_name',
'ph': 'M',
'pid': 17851,
'tid': 23,
'ts': 0
},
{
'args': {'name': 'CrRendererMain'},
'cat': '__metadata',
'name': 'thread_name',
'ph': 'M',
'pid': 17851,
'tid': 23,
'ts': 0
},
{
'args': {'data': {'sessionId': sessionId, 'frames': [
{'frame': 'frame1', 'url': 'frameurl', 'name': 'frame-name'}
]}},
'cat': 'disabled-by-default-devtools.timeline',
'name': 'TracingStartedInPage',
'ph': 'I',
'pid': 17851,
'tid': 23,
'ts': 100000,
'tts': 606543
},
{
'cat': 'disabled-by-default-devtools.timeline',
'name': 'EvaluateScript',
'ph': 'X',
'pid': 17851,
'tid': 23,
'ts': 101000,
'dur': 10000,
'args': {'data': {'url': 'https://www.google.com', 'lineNumber': 1337}}
}
];
var badgeRendered = Promise.resolve();
TestRunner.addSniffer(
ProductRegistry.BadgePool.prototype, '_renderBadge', (arg, result) => badgeRendered = result, true);
Common.settings.moduleSetting('product_registry.badges-visible').set(true);
var model = PerformanceTestRunner.createPerformanceModelWithEvents(rawTraceEvents).timelineModel();
var linkifier = new Components.Linkifier();
var badgePool = new ProductRegistry.BadgePool();
for (var event of PerformanceTestRunner.mainTrackEvents()) {
var node = await Timeline.TimelineUIUtils.buildTraceEventDetails(event, model, linkifier, badgePool);
await badgeRendered;
for (var child of node.querySelectorAll('.timeline-details-view-row'))
TestRunner.addResult(
TestRunner.deepTextContent(child.firstChild) + ': ' + TestRunner.deepTextContent(child.lastChild));
}
TestRunner.completeTest();
})();
...@@ -27,10 +27,9 @@ ...@@ -27,10 +27,9 @@
var model = PerformanceTestRunner.timelineModel(); var model = PerformanceTestRunner.timelineModel();
var linkifier = new Components.Linkifier(); var linkifier = new Components.Linkifier();
var badgePool = new ProductRegistry.BadgePool();
for (var request of model.networkRequests()) { for (var request of model.networkRequests()) {
var element = await Timeline.TimelineUIUtils.buildNetworkRequestDetails(request, model, linkifier, badgePool); var element = await Timeline.TimelineUIUtils.buildNetworkRequestDetails(request, model, linkifier);
printElement(element); printElement(element);
} }
TestRunner.completeTest(); TestRunner.completeTest();
......
This tests product registry impl's register function.
Cleared ProductRegistryImpl
Testing: example.com -> example.(com|org)
Testing: wild.example.com -> *.example.com
Testing: test-1.example.com -> test-*.example.com
Testing: subdomain.example.com -> subdomain.example.com
Testing: example.org -> example.(com|org)
Testing: chromium.org -> null
(async function(){
await TestRunner.loadModule('product_registry_impl');
TestRunner.addResult("This tests product registry impl's register function.");
resetProductRegistry();
ProductRegistryImpl.register([
"example.(com|org)",
"*.example.com",
"test-*.example.com",
"subdomain.example.com"
], [
{
hash: "0caaf24ab1a0c334", // Result of: sha1('example.com').substr(0, 16).
prefixes: {
"": {
product: 0 // Reference to index of first argument of ProductRegistryImpl.register.
},
"*": {
product: 1
},
"test-": {
product: 2
}
}
},
{
hash: "20116dfd6774a9e7", // Result of: sha1('example.org').substr(0, 16).
prefixes: {
"": {
product: 0
}
}
},
{
hash: "e3d90251f85e2064", // Result of: sha1('subdomain.example.com').substr(0, 16).
prefixes: {
"": {
product: 3
}
}
}
]);
var instance = new ProductRegistryImpl.Registry();
logDomainEntry('example.com');
logDomainEntry('wild.example.com');
logDomainEntry('test-1.example.com');
logDomainEntry('subdomain.example.com');
logDomainEntry('example.org');
logDomainEntry('chromium.org');
TestRunner.completeTest();
function logDomainEntry(domainStr) {
TestRunner.addResult("Testing: " + domainStr + " -> " + instance.nameForUrl(('http://' + domainStr).asParsedURL()));
}
function resetProductRegistry() {
TestRunner.addResult("Cleared ProductRegistryImpl");
ProductRegistryImpl._productsByDomainHash.clear();
}
})();
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