brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.84k stars 2.33k forks source link

Adapt to uBO's `scriptletGlobals` change from `Map` to object #35679

Closed antonok-edm closed 9 months ago

antonok-edm commented 9 months ago

In https://github.com/gorhill/uBlock/commit/869a653fdf2dd4e5b0151530bd58e1059d1318d2#diff-b006827b72fe768a6cb08f3123783752a4a23ccc95c55467f24b77addac88a29R282, scriptletGlobals was modified to become a plain JS object instead of a Map.

As mentioned here, we'll need to use a Proxy object to restore compatibility with the older Map methods to ensure that users can migrate gracefully to the newer resource versions when we release them.

kjozwiak commented 9 months ago

The above requires 1.62.159 or higher for 1.62.x verification(s) 👍

LaurenWags commented 9 months ago

Verified with

Brave | 1.62.161 Chromium: 121.0.6167.139 (Official Build) (x86_64)
-- | --
Revision | 9afaacd1500fdbd60ed4500b63b9ab85597ef933
OS | macOS Version 13.6.4 (Build 22G513)

YouTube.com homepage - PASSED

### Steps: 1. new profile 2. load `youtube.com` 3. stay logged out 4. click around 5. return to `youtube.com` #### Confirmed no visible ads when returning to `youtube.com` after navigating away `1.62.156` | `1.62.161` ----------|----------- 156 | 161

No pre-roll/skip-ad buttons (screencast) - PASSED

https://github.com/brave/brave-browser/assets/28145373/b5e8b95a-36e3-4e25-ac88-95904e0fd24c

Direct navigations (from URL) - PASSED

loaded `https://www.youtube.com/watch?v=uXrvgHwVKEo` ### Confirmed no pre-roll ads, or ads in-between seek positions `1.62.156` | `1.62.161` ----------|----------- 156 | 161

Searches - PASSED

### Steps: - searched for `lexus 500h f sport performance` (`https://www.youtube.com/results?search_query=lexus+500h+f+sport+performance`) - clicked on search results ### Confirmed no ads in or around the search results example | example ----------|---------- 1 | 2

Live - PASSED

### Steps: - clicked on `Live` (`https://www.youtube.com/channel/UC4R8DWoMoI7CAwX8_LjQHig`) - clicked on `WATCH LIVE Lexus Pipe Pro presented by YETI 2024 - Day 2` - `https://www.youtube.com/watch?v=eWKucDh3Z1k` ### Confirmed no pre-roll ads Screenshot 2024-02-06 at 3 00 29 PM

Movies & TV - PASSED

### Steps: - clicked on Movies & TV - clicked on `Little Giants` - `https://www.youtube.com/watch?v=9hK5KmLESd0` - clicked `Allow` to install `Widevine` ### Confirmed no pre-roll ads, or ads in-between seek positions (no screenshots due to widevine conent)

Toggle Shields off (and then back on, again) - PASSED

### Steps: 1. loaded `youtube.com` 2. disabled Shields by setting them to `Down` 3. clicked on random videos, from different locations 4. confirmed I saw various types of ads (pre-roll, interstitial, and non-video static ads on the homepage and search results) 5. renabled Shields by setting them to `Up` ### Confirmed no further ads seen after `Shields` were `Up` `Shields OFF`| `...` | `...` | `...` | `Shields ON` | `...` ----------|-----------|----------|-----------|----------|--------- 1 | 2 | 3 | 4 | 5 | 6
MadhaviSeelam commented 9 months ago

Verification PASSED using

Brave | 1.62.161 Chromium: 121.0.6167.139 (Official Build) (64-bit)
-- | --
Revision | 9afaacd1500fdbd60ed4500b63b9ab85597ef933
OS | Windows 11 Version 23H2 (Build 22631.3085)

Youtube.com home page - PASSED

- opened home page - Navigated away and came back to youtube without logged in - Navigated away and came back to youtube with logged in - no ads are shown 1.62.156 | 1.62.161 w/out login | 1.62.161 w login ----- | ----- | ---- ![image](https://github.com/brave/brave-browser/assets/98358127/cfaeac5b-8b0b-400f-8488-09f67c22747f)|![image](https://github.com/brave/brave-browser/assets/98358127/1b0f74b9-e060-4ceb-8cb5-292239aa3254)|![image](https://github.com/brave/brave-browser/assets/98358127/af7b31be-8476-4510-b4d5-f5baafb95bf4)

No pre-roll/skip-ad buttons - PASSED

- loaded https://www.youtube.com/watch?v=gfZWzD7COwo - confirmed no ads shown during starting of the video or in-between seek positions or Skip-ad buttons https://github.com/brave/brave-browser/assets/98358127/12df8480-f2ae-4beb-935a-40dfb20589a3

News sites search - PASSED

- Visited several news sites. No ads are shown CNN |BBC ---|---- ![image](https://github.com/brave/brave-browser/assets/98358127/2b1b32c3-b441-436e-b42f-0aef85073493)|![image](https://github.com/brave/brave-browser/assets/98358127/6ec4a240-ef79-4a6b-b80d-18b7c6ec8076)

Movies & TV - PASSED

- clicked on Movies & TV (https://www.youtube.com/feed/storefront) - Confirmed no pre-roll ads, or ads in-between seek positions example | example --- | ---- ![image](https://github.com/brave/brave-browser/assets/98358127/e9680366-9bd1-4ffa-a96e-fc6e16838f85)|![image](https://github.com/brave/brave-browser/assets/98358127/2d986cc5-ee81-41b6-83e3-9b2512f658e1)

Direct navigation (from URL) - PASSED

- loaded www.youtube.com/watch?v=-pHsFDiRqOM - confirmed no pre-roll ads, ads in-between seek positions 1.62.151 | 1.62.156 ----- | ------ ![image](https://github.com/brave/brave-browser/assets/98358127/9e47a296-e288-4fbb-9c18-7711271b7ef9)|![image](https://github.com/brave/brave-browser/assets/98358127/6bbd8278-b0f1-470a-ba7c-09947d6b03ac)

Live - PASSED

- clicked on `Live` (https://www.youtube.com/channel/UC4R8DWoMoI7CAwX8_LjQHig) - clicked on `LIVE - FC Porto v BG Gottingen | FIBA Europe Cup 2023-24` - `https://www.youtube.com/watch?v=NvfXwaNQ3d0` - confirmed no pre-roll ads ![image](https://github.com/brave/brave-browser/assets/98358127/070f98bf-0fe1-4b07-82c9-f950f3aba790)

Searches - PASSED

- searched for minecraft (https://www.youtube.com/results?search_query=minecraft+) - clicked on search results - confirmed no ads in or around the search results example | example ---- | ---- ![image](https://github.com/brave/brave-browser/assets/98358127/a61c2fc9-c718-4b0e-8c90-b00351b9e475)|![image](https://github.com/brave/brave-browser/assets/98358127/65269c77-2a3a-4811-99cd-ad83b8e099b3)

Shields Down/Up - PASSED

- loaded youtube.com - disabled Shields by setting them to Down - Home page shown ads - clicked on random videos, from different locations - confirmed I saw various types of ads (pre-roll, interstitial, and non-video static ads on the homepage and search results) - reenabled Shields by setting them to Up - Confirmed no further ads seen after Shields were Up - Ads are shown on the home page when shields are Down but no longer shown when Shields Up as expected Shields Down | Shields Up ----- | ----- ![image](https://github.com/brave/brave-browser/assets/98358127/e370c9d6-f961-40c0-a471-be5e55da0e50)|![image](https://github.com/brave/brave-browser/assets/98358127/6360a922-2f38-4678-8af2-86700d348ced)
MadhaviSeelam commented 9 months ago

Verification PASSED using

Brave   1.62.161 Chromium: 121.0.6167.139 (Official Build) (64-bit) 
Revision    9afaacd1500fdbd60ed4500b63b9ab85597ef933
OS  Linux

Youtube.com home page - PASSED

- opened YT home page - Navigated away and came back to youtube without logged in - Navigated away and came back to youtube with logged in - confirmed no ads are shown 1.62.156 | 1.62.161(w/out login) | 1.62.161(w/login) -------- | ------ | ----- ![image](https://github.com/brave/brave-browser/assets/98358127/4b06dee4-083f-4647-b5bb-1ad5f66065bd)|![image](https://github.com/brave/brave-browser/assets/98358127/71938b2a-1761-442f-9d4f-a819ac4fc25c)|![image](https://github.com/brave/brave-browser/assets/98358127/0f78727a-ae4d-4262-8d6f-f317465abe54)

No pre-roll/skip-ad buttons - PASSED

- Loaded https://www.youtube.com/watch?v=GcbaVGC7LWA - Confirmed no ads shown during starting of the video or in-between seek positions or Skip-ad buttons https://github.com/brave/brave-browser/assets/98358127/a8765ef2-735b-45d8-9649-f5e6073de2e7

News - PASSED

- clicked News (https://www.youtube.com/channel/UCYfdidRxbB8Qhf0Nx7ioOYw) - confirmed no ads are shown ![image](https://github.com/brave/brave-browser/assets/98358127/a1818a41-7225-41a5-a3c6-8b4843621e60)

Movies & TV - PASSED

- clicked on Movies & TV (https://www.youtube.com/feed/storefront?bp=ogUCKAY%3D) - loaded https://www.youtube.com/watch?v=DPsViT4MQn0 Confirmed no pre-roll ads, or ads in-between seek positions example | example ----- | ----- ![Screenshot from 2024-02-06 15-50-43](https://github.com/brave/brave-browser/assets/98358127/0e161229-53ef-4adc-847d-60c711d8f578)|![Screenshot from 2024-02-06 15-51-20](https://github.com/brave/brave-browser/assets/98358127/54f37acf-62ca-4b85-88f2-b6af102e3286)

Direct navigation (from URL) - PASSED

- loaded https://www.youtube.com/watch?v=-pHsFDiRqOM - confirmed no pre-roll ads, or ads in-between seek positions ![image](https://github.com/brave/brave-browser/assets/98358127/c0570106-d823-4fe7-ac65-2d9b044ae57d)

Live - PASSED

- clicked on `Live` (https://www.youtube.com/channel/UC4R8DWoMoI7CAwX8_LjQHig) - clicked on `LIVE - FC Porto v BG Gottingen | FIBA Europe Cup 2023-24` - `https://www.youtube.com/watch?v=NvfXwaNQ3d0` ### Confirmed no pre-roll ads example | example ----- | ----- ![image](https://github.com/brave/brave-browser/assets/98358127/6972ad70-4aeb-4aa6-81b6-3f12d71a70f8)|![image](https://github.com/brave/brave-browser/assets/98358127/432ef5b4-bb9f-4a7b-b225-85badbf96aba)

Searches - PASSED

- searched for minecraft (https://www.youtube.com/results?search_query=minecraft+) - clicked on search results - Confirmed no ads in or around the search results example | example ---- | ---- ![image](https://github.com/brave/brave-browser/assets/98358127/eb0489fc-f7f1-46d4-882d-e556dbbc6703)|![image](https://github.com/brave/brave-browser/assets/98358127/d9e5bacc-482d-4f82-b8ea-accae17a8619)

Shields Down/Up - PASSED

- loaded youtube.com - disabled Shields by setting them to Down - Home page shown ads - clicked on random videos, from different locations - confirmed I saw various types of ads (pre-roll, interstitial, and non-video static ads on the homepage and search results) - reenabled Shields by setting them to Up - Confirmed no further ads seen after Shields were Up **_Ads are shown on the home page when shields are Down but no longer shown when Shields Up as expected_** Shields Down | Shields Up ----- | ----- ![image](https://github.com/brave/brave-browser/assets/98358127/e370c9d6-f961-40c0-a471-be5e55da0e50)|![image](https://github.com/brave/brave-browser/assets/98358127/6360a922-2f38-4678-8af2-86700d348ced)
kjozwiak commented 9 months ago

Verification PASSED on Samsung Galaxy Tab S8 Ultra running Android 14 using the following build(s):

Brave | 1.62.162 Chromium: 121.0.6167.164 (Official Build) (64-bit)
--- | ---
Revision | c18c9cc62d2b4376a5ada5b98b673dfc7994f20d
OS | Android 14; Build/UP1A.231005.007; 34; REL

YouTube.com homepage - PASSED

### Steps: 1. new profile 2. load `youtube.com` 3. stay logged out 4. click around 5. return to `youtube.com` #### Confirmed no visible ads when returning to `youtube.com` after navigating away `1.62.156` | `1.62.161` ----------|----------- ![Screenshot_20240207_121805_Brave](https://github.com/brave/brave-browser/assets/2602313/eb0725df-86ab-4523-b678-dafbd6f90877) | ![Screenshot_20240207_121330_Brave](https://github.com/brave/brave-browser/assets/2602313/b7bcf0b8-d9ab-43f3-bab3-071430e35f3a)

No pre-roll/skip-ad buttons (screencast) - PASSED

https://github.com/brave/brave-browser/assets/2602313/d36107ea-fa69-413d-b06b-2e6e1154fe2f

Direct navigations (from URL) - PASSED

loaded `https://www.youtube.com/watch?v=dtp6b76pMak` ### Confirmed no pre-roll ads, or ads in-between seek positions `1.62.156` | `1.62.161` ----------|----------- ![Screenshot_20240207_123134_Brave](https://github.com/brave/brave-browser/assets/2602313/2c0e911f-e199-4d2b-8dca-cf9ce955b8f6) | ![Screenshot_20240207_123454_Brave](https://github.com/brave/brave-browser/assets/2602313/891913b4-1b7b-4412-a449-919b3ddf5d5a)

Searches - PASSED

### Steps: - searched for `stormgate builds` - `https://www.youtube.com/results?search_query=stormgate+builds` - clicked on search results ### Confirmed no ads in or around the search results **`Example`** | **`Example`** ----------------|--------------- ![Screenshot_20240207_124501_Brave](https://github.com/brave/brave-browser/assets/2602313/fccc5b1e-d35e-4506-a5cf-29a7fa404633) | ![Screenshot_20240207_124520_Brave](https://github.com/brave/brave-browser/assets/2602313/eee27cdd-88f8-4758-b903-38d34fcba437)

Live - PASSED

### Steps: - clicked on `Live` via `https://www.youtube.com/channel/UC4R8DWoMoI7CAwX8_LjQHig` - clicked on `[LIVE | AFC ASIAN CUP QATAR 2023™ | Semi Finals | Islamic Republic Of Iran vs Qatar]` - `https://www.youtube.com/watch?v=pUiAOS6xzs8` ### Confirmed no pre-roll ads **`Example`** | **`Example`** ----------------|-------------- ![Screenshot_20240207_125029_Brave](https://github.com/brave/brave-browser/assets/2602313/edb6d634-8ce7-443b-8b15-b8743d34360f) | ![Screenshot_20240207_125036_Brave](https://github.com/brave/brave-browser/assets/2602313/db94bec3-68c3-4f7f-8bec-dfb1d6d41388)

Movies & TV - PASSED

### Steps: - clicked on Movies & TV - clicked on `Happily N'ever After 2: Snow White` - `https://www.youtube.com/watch?v=y5dxhCxANgY` - clicked `Allow` to install `Widevine` ### Confirmed no pre-roll ads, or ads in-between seek positions **`Note:`** screenshots appear blank due to Widevine (can't take screenshots of media being played using Widevine) **`Example`** | **`Example`** | **`Example`** ----------------|---------------|---------------- ![Screenshot_20240207_125438_Brave](https://github.com/brave/brave-browser/assets/2602313/ec94fcc4-1fc7-4c80-88b7-9fcd3c8afe40) | ![Screenshot_20240207_125450_Brave](https://github.com/brave/brave-browser/assets/2602313/42dec0ce-0a2e-450b-bd1e-52cf774caf14) | ![Screenshot_20240207_125457_Brave](https://github.com/brave/brave-browser/assets/2602313/334f54e1-886a-42d0-8bb9-9f2543174f97)

Toggle Shields off (and then back on, again) - PASSED

### Steps: 1. loaded `youtube.com` 2. disabled Shields by setting them to `Down` 3. clicked on random videos, from different locations 4. confirmed I saw various types of ads (pre-roll, interstitial, and non-video static ads on the homepage and search results) 5. re-enabled Shields by setting them to `Up` ### Confirmed no further ads seen after `Shields` were `Up` **`Shields Disabled`** **`Example`** | **`Example`** ----------------|-------------- ![Screenshot_20240207_130105_Brave](https://github.com/brave/brave-browser/assets/2602313/fd7767b5-bc1f-4df8-89c7-71adbeac7bde) | ![Screenshot_20240207_130124_Brave](https://github.com/brave/brave-browser/assets/2602313/66459293-4d5d-430a-8e7c-2b1518472510) **`Shields Enabled`** **`Example`** | **`Example`** | **`Example`** ----------------|----------------|--------------- ![Screenshot_20240207_130432_Brave](https://github.com/brave/brave-browser/assets/2602313/56ae262b-80c8-499c-9c79-23766e876f27) | ![Screenshot_20240207_130439_Brave](https://github.com/brave/brave-browser/assets/2602313/6b01d898-0d2a-4443-a885-68dea642778b) ![Screenshot_20240207_130456_Brave](https://github.com/brave/brave-browser/assets/2602313/09f40d1b-eece-4cf8-a878-03d18440ff1c)
Uni-verse commented 9 months ago

Verified on Samsung Galaxy S21 using version:

Brave   1.62.162 Chromium: 121.0.6167.164 (Official Build) (64-bit) 
Revision    c18c9cc62d2b4376a5ada5b98b673dfc7994f20d
OS  Android 13; Build/TP1A.220624.014; 33; REL

YouTube.com homepage - PASSED

### Steps: 1. new profile 2. load `youtube.com` 3. stay logged out 4. click around 5. return to `youtube.com` #### Confirmed no visible ads when returning to `youtube.com` after navigating away Example | Example -|- ![Screenshot 2024-02-07 at 3 22 03 PM](https://github.com/brave/brave-browser/assets/17885425/49c04cf7-150a-445e-8c1a-d3b2e817daa6) | ![Screenshot 2024-02-07 at 3 22 29 PM](https://github.com/brave/brave-browser/assets/17885425/cc7f351c-afe6-4fa8-8556-0dc38c5da42f)

No pre-roll/skip-ad buttons (screencast) - PASSED

![Screenshot 2024-02-07 at 3 27 29 PM](https://github.com/brave/brave-browser/assets/17885425/42c25ccb-0285-43eb-859f-c8c11c01a943)

Direct navigations (from URL) - PASSED

loaded `https://www.youtube.com/watch?v=dtp6b76pMak` ### Confirmed no pre-roll ads, or ads in-between seek positions Example | Example -|- ![Screenshot 2024-02-07 at 3 31 54 PM](https://github.com/brave/brave-browser/assets/17885425/07da8392-e572-4590-86be-5e659e5ff016) | ![Screenshot 2024-02-07 at 3 32 14 PM](https://github.com/brave/brave-browser/assets/17885425/22a2cbc2-a047-43c2-aeec-37911cbc97e2)

Searches - PASSED

### Steps: - searched for `news` - clicked on search results ### Confirmed no ads in or around the search results Example | Example -|- ![Screenshot 2024-02-07 at 3 33 34 PM](https://github.com/brave/brave-browser/assets/17885425/fa159b13-a8d0-41a0-a719-1070f19eb3a7) | ![Screenshot 2024-02-07 at 3 33 48 PM](https://github.com/brave/brave-browser/assets/17885425/52a751a4-7d8e-4459-a8d6-77704480942a)

Live - PASSED

### Steps: - Clicked on `Live` video ### Confirmed no pre-roll ads ![Screenshot 2024-02-07 at 3 34 05 PM](https://github.com/brave/brave-browser/assets/17885425/1ad0dfa1-eef0-43ef-802e-7ae8fca1cf89)

Movies & TV - PASSED

### Steps: - Searched for `movies` - Played movie from search results ### Confirmed no pre-roll ads, or ads in-between seek positions Example | Example -|- ![Screenshot 2024-02-07 at 3 44 26 PM](https://github.com/brave/brave-browser/assets/17885425/5dc0fbab-7137-4d47-a23b-c861223bbf04) | ![Screenshot 2024-02-07 at 3 44 31 PM](https://github.com/brave/brave-browser/assets/17885425/4a27d55b-92b7-4672-8119-0ced852c5089)

Toggle Shields off (and then back on, again) - PASSED

### Steps: 1. loaded `youtube.com` 2. disabled Shields by setting them to `Down` 3. clicked on random videos, from different locations 4. confirmed I saw various types of ads (pre-roll, interstitial, and non-video static ads on the homepage and search results) 5. re-enabled Shields by setting them to `Up` ### Confirmed no further ads seen after `Shields` were `Up` **`Shields Disabled`** Example | Example -|- ![Screenshot 2024-02-07 at 3 28 04 PM](https://github.com/brave/brave-browser/assets/17885425/517443e3-d3eb-4c2e-bb2b-4396ac30bc8b) | ![Screenshot 2024-02-07 at 3 28 01 PM](https://github.com/brave/brave-browser/assets/17885425/5abeb8cb-e251-44af-83c5-80cd7a7ec1af) **`Shields Enabled`** Example | Example -|- ![Screenshot 2024-02-07 at 3 49 12 PM](https://github.com/brave/brave-browser/assets/17885425/6c8177dd-2cc4-44c9-a925-303f79726b3f) | ![Screenshot 2024-02-07 at 3 49 20 PM](https://github.com/brave/brave-browser/assets/17885425/1e46ee65-a187-4560-b779-4afd149d8e62)