WebKit Bugzilla
Attachment 339536 Details for
Bug 185297
: Improve test at media/modern-media-controls/airplay-button/airplay-button-on.html to not hardcode the -apple-wireless-playback-target-active color
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185297-20180504134858.patch (text/plain), 2.15 KB, created by
Antoine Quint
on 2018-05-04 04:49:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2018-05-04 04:49:00 PDT
Size:
2.15 KB
patch
obsolete
>Subversion Revision: 231348 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 0daaf86597dbe0d4f383a9b973b4de7ef63bb511..dff57da7e503d4fd67e9e05fc7f48ef8bf040685 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2018-05-04 Antoine Quint <graouts@apple.com> >+ >+ Improve test at media/modern-media-controls/airplay-button/airplay-button-on.html to not hardcode the -apple-wireless-playback-target-active color >+ https://bugs.webkit.org/show_bug.cgi?id=185297 >+ <rdar://problem/39737716> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Create an element and set its "color" property to "-apple-wireless-playback-target-active" so we can use >+ getComputedStyle() to query the applied value instead of hard-coding the expected color. >+ >+ * media/modern-media-controls/airplay-button/airplay-button-on.html: >+ > 2018-05-03 Ryosuke Niwa <rniwa@webkit.org> > > Revert the unitended changes in r231329. >diff --git a/LayoutTests/media/modern-media-controls/airplay-button/airplay-button-on.html b/LayoutTests/media/modern-media-controls/airplay-button/airplay-button-on.html >index 7467b37b584cb57b0577846315a2bb88dd0f99b6..2d2e319db9a96de7018318f91b1a331e994ac212 100644 >--- a/LayoutTests/media/modern-media-controls/airplay-button/airplay-button-on.html >+++ b/LayoutTests/media/modern-media-controls/airplay-button/airplay-button-on.html >@@ -13,7 +13,11 @@ airplayButton.on = true; > > document.body.appendChild(airplayButton.element); > >-const airplayColor = window.navigator.platform === "MacIntel" ? "rgb(27, 173, 248)" : "rgb(0, 122, 255)"; >+// Obtain the plaform-specific color by creating an element using -apple-wireless-playback-target-active. >+const airplayColorButton = document.body.appendChild(document.createElement("div")); >+airplayColorButton.style.color = "-apple-wireless-playback-target-active"; >+const airplayColor = getComputedStyle(airplayColorButton).color; >+airplayColorButton.remove(); > > shouldBecomeEqual('airplayButton.element.classList.contains("on")', "true", () => { > shouldBecomeEqualToString("window.getComputedStyle(airplayButton.element).backgroundColor", "rgba(0, 0, 0, 0)", () => {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185297
: 339536 |
339555