기여 목록 / 8483194
[DevTools] Remove mixed-content-active-and-passive-reload test after crrev.com/c/8467003
DevToolstestMerged
CL 8467003에서 unit test로 옮긴 기존 mixed-content-active-and-passive-reload 웹 테스트를 제거했습니다.
문제 설명
unit test로 옮긴 뒤에도 기존 Chromium 웹 테스트가 남아 있었습니다.
해결 내용
mixed-content-active-and-passive-reload.js와
mixed-content-active-and-passive-reload-expected.txt를 제거했습니다.
전체 코드 diff는 다음과 같습니다.
diff --git a/third_party/blink/web_tests/http/tests/devtools/security/mixed-content-active-and-passive-reload-expected.txt b/third_party/blink/web_tests/http/tests/devtools/security/mixed-content-active-and-passive-reload-expected.txt
deleted file mode 100644
index f50901b..0000000
--- a/third_party/blink/web_tests/http/tests/devtools/security/mixed-content-active-and-passive-reload-expected.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-Tests that the active and passive mixed content explanations prompt the user to refresh when there are no recorded requests, and link to the network panel when there are recorded requests.
-
-
-Before Refresh --------------
-<DIV class=security-explanation security-explanation-insecure >
- <DEVTOOLS-ICON role=presentation name=warning class=security-property security-property-insecure >
- <#document-fragment >
- <STYLE >
- </STYLE>
- <SPAN style=--icon-url: var(--image-file-warning); >
- </SPAN>
- </#document-fragment>
- </DEVTOOLS-ICON>
- <DIV class=security-explanation-text >
- <DIV class=security-explanation-title >
- <SPAN >
-Resources -
- </SPAN>
- <SPAN class=security-explanation-title-insecure >
-active mixed content
- </SPAN>
- </DIV>
- <DIV >
-You have recently allowed non-secure content (such as scripts or iframes) to run on this site.
- </DIV>
- <DIV class=security-mixed-content >
-Reload the page to record requests for HTTP resources.
- </DIV>
- </DIV>
-</DIV>
-<DIV class=security-explanation security-explanation-neutral >
- <DEVTOOLS-ICON role=presentation name=warning class=security-property security-property-neutral >
- <#document-fragment >
- <STYLE >
- </STYLE>
- <SPAN style=--icon-url: var(--image-file-warning); >
- </SPAN>
- </#document-fragment>
- </DEVTOOLS-ICON>
- <DIV class=security-explanation-text >
- <DIV class=security-explanation-title >
- <SPAN >
-Resources -
- </SPAN>
- <SPAN class=security-explanation-title-neutral >
-mixed content
- </SPAN>
- </DIV>
- <DIV >
-This page includes HTTP resources.
- </DIV>
- <DIV class=security-mixed-content >
-Reload the page to record requests for HTTP resources.
- </DIV>
- </DIV>
-</DIV>
-
-Refresh --------------
-<DIV class=security-explanation security-explanation-insecure >
- <DEVTOOLS-ICON role=presentation name=warning class=security-property security-property-insecure >
- <#document-fragment >
- <STYLE >
- </STYLE>
- <SPAN style=--icon-url: var(--image-file-warning); >
- </SPAN>
- </#document-fragment>
- </DEVTOOLS-ICON>
- <DIV class=security-explanation-text >
- <DIV class=security-explanation-title >
- <SPAN >
-Resources -
- </SPAN>
- <SPAN class=security-explanation-title-insecure >
-active mixed content
- </SPAN>
- </DIV>
- <DIV >
-You have recently allowed non-secure content (such as scripts or iframes) to run on this site.
- </DIV>
- <BUTTON class=security-mixed-content devtools-link text-button link-style role=link tabindex=0 >
-View 1 request in Network panel
- </BUTTON>
- </DIV>
-</DIV>
-<DIV class=security-explanation security-explanation-neutral >
- <DEVTOOLS-ICON role=presentation name=warning class=security-property security-property-neutral >
- <#document-fragment >
- <STYLE >
- </STYLE>
- <SPAN style=--icon-url: var(--image-file-warning); >
- </SPAN>
- </#document-fragment>
- </DEVTOOLS-ICON>
- <DIV class=security-explanation-text >
- <DIV class=security-explanation-title >
- <SPAN >
-Resources -
- </SPAN>
- <SPAN class=security-explanation-title-neutral >
-mixed content
- </SPAN>
- </DIV>
- <DIV >
-This page includes HTTP resources.
- </DIV>
- <BUTTON class=security-mixed-content devtools-link text-button link-style role=link tabindex=0 >
-View 1 request in Network panel
- </BUTTON>
- </DIV>
-</DIV>
-
diff --git a/third_party/blink/web_tests/http/tests/devtools/security/mixed-content-active-and-passive-reload.js b/third_party/blink/web_tests/http/tests/devtools/security/mixed-content-active-and-passive-reload.js
deleted file mode 100644
index d559eca..0000000
--- a/third_party/blink/web_tests/http/tests/devtools/security/mixed-content-active-and-passive-reload.js
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2017 The Chromium Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import {TestRunner} from 'test_runner';
-import {SecurityTestRunner} from 'security_test_runner';
-
-import * as SDK from 'devtools/core/sdk/sdk.js';
-import * as Security from 'devtools/panels/security/security.js';
-
-(async function() {
- TestRunner.addResult(
- `Tests that the active and passive mixed content explanations prompt the user to refresh when there are no recorded requests, and link to the network panel when there are recorded requests.\n`);
- await TestRunner.showPanel('security');
-
- TestRunner.addResult('\nBefore Refresh --------------');
-
- const pageVisibleSecurityState = new Security.SecurityModel.PageVisibleSecurityState(
- Protocol.Security.SecurityState.Neutral, null, null,
- ['displayed-mixed-content', 'ran-mixed-content']);
- TestRunner.mainTarget.model(Security.SecurityModel.SecurityModel)
- .dispatchEventToListeners(
- Security.SecurityModel.Events.VisibleSecurityStateChanged,
- pageVisibleSecurityState);
-
- // At this point, the page has mixed content but no mixed requests have been recorded, so the user should be prompted to refresh.
- var explanations =
- Security.SecurityPanel.SecurityPanel.instance().mainView.contentElement.getElementsByClassName('security-explanation');
- for (var i = 0; i < explanations.length; i++)
- TestRunner.dumpDeepInnerHTML(explanations[i]);
-
- TestRunner.addResult('\nRefresh --------------');
-
- // Now simulate a refresh.
- TestRunner.mainTarget.model(Security.SecurityModel.SecurityModel)
- .dispatchEventToListeners(
- Security.SecurityModel.Events.VisibleSecurityStateChanged,
- pageVisibleSecurityState);
-
- var passive = SDK.NetworkRequest.NetworkRequest.create(
- 0, 'http://foo.test', 'https://foo.test', 0, 0, null);
- passive.mixedContentType = 'optionally-blockable';
- SecurityTestRunner.dispatchRequestFinished(passive);
-
- var active = SDK.NetworkRequest.NetworkRequest.create(
- 0, 'http://foo.test', 'https://foo.test', 0, 0, null);
- active.mixedContentType = 'blockable';
- SecurityTestRunner.dispatchRequestFinished(active);
-
- var explanations =
- Security.SecurityPanel.SecurityPanel.instance().mainView.contentElement.getElementsByClassName('security-explanation');
- for (var i = 0; i < explanations.length; i++)
- TestRunner.dumpDeepInnerHTML(explanations[i]);
- TestRunner.completeTest();
-})();테스트 방법
CQ를 통해 2026년 9월 30일(한국 시간) Chromium main에 병합되었습니다.
배운 점
테스트 migration 후에는 기존 테스트와 기대 결과 파일도 함께 정리해야 합니다.