Commit e4b54059 authored by Harley Li's avatar Harley Li Committed by Commit Bot

[DevTools] SW registration section shows port number

The 'title' for each SW section at Application>Service Worker is the
scope URL, and scopes are sensitive to port numbers.

Bug: 601286
Change-Id: Ib718652a9132dc17ef5adfc4828f0c43e439d1c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1595124Reviewed-by: default avatarErik Luo <luoe@chromium.org>
Commit-Queue: Haihong Li (Harley) <hhli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657594}
parent e5151405
......@@ -42,7 +42,7 @@ Resources.ServiceWorkersView = class extends UI.VBox {
this._toggleFilter();
});
const filterLabel = this._otherSWFilter.createChild('label', 'service-worker-filter-label');
filterLabel.textContent = Common.UIString('Service workers from other domains');
filterLabel.textContent = Common.UIString('Service workers from other origins');
filterLabel.addEventListener('click', () => this._toggleFilter());
const toolbar = new UI.Toolbar('service-worker-filter-toolbar', this._otherSWFilter);
......@@ -302,7 +302,7 @@ Resources.ServiceWorkersView = class extends UI.VBox {
let path = parsedURL.path;
if (path.endsWith('/'))
path = path.substring(0, path.length - 1);
return parsedURL.host + path;
return parsedURL.domain() + path;
}
_updateListVisibility() {
......
......@@ -2,7 +2,7 @@ ServiceWorkers must be shown correctly even if there is a redundant worker.
The first ServiceWorker is activated.
==== ServiceWorkersView ====
127.0.0.1/devtools/service-workers/resources/service-worker-redundant-scope
127.0.0.1:8000/devtools/service-workers/resources/service-worker-redundant-scope
Update
Unregister
Source
......@@ -19,7 +19,7 @@ Sync
============================
The second Serviceworker is installed.
==== ServiceWorkersView ====
127.0.0.1/devtools/service-workers/resources/service-worker-redundant-scope
127.0.0.1:8000/devtools/service-workers/resources/service-worker-redundant-scope
Update
Unregister
Source
......@@ -41,7 +41,7 @@ Sync
============================
The first ServiceWorker worker became redundant and stopped.
==== ServiceWorkersView ====
127.0.0.1/devtools/service-workers/resources/service-worker-redundant-scope
127.0.0.1:8000/devtools/service-workers/resources/service-worker-redundant-scope
Update
Unregister
Source
......
......@@ -2,7 +2,7 @@ Tests ServiceWorkersView on resources panel.
Select ServiceWorkers tree element.
Register ServiceWorker for scope1
127.0.0.1/devtools/service-workers/resources/scope1
127.0.0.1:8000/devtools/service-workers/resources/scope1
Update
Unregister
Source
......@@ -17,7 +17,7 @@ Push
Sync
Sync
Register ServiceWorker for scope2
127.0.0.1/devtools/service-workers/resources/scope2
127.0.0.1:8000/devtools/service-workers/resources/scope2
Update
Unregister
Source
......@@ -31,7 +31,7 @@ Push
Push
Sync
Sync
127.0.0.1/devtools/service-workers/resources/scope1
127.0.0.1:8000/devtools/service-workers/resources/scope1
Update
Unregister
Source
......@@ -46,7 +46,7 @@ Push
Sync
Sync
Unregister ServiceWorker for scope1
127.0.0.1/devtools/service-workers/resources/scope2
127.0.0.1:8000/devtools/service-workers/resources/scope2
Update
Unregister
Source
......@@ -60,7 +60,7 @@ Push
Push
Sync
Sync
127.0.0.1/devtools/service-workers/resources/scope1 - deleted
127.0.0.1:8000/devtools/service-workers/resources/scope1 - deleted
Update
Unregister
Source
......
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