Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions fixtures/attribute-behavior/AttributeTableSnapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -3348,6 +3348,81 @@
| `externalResourcesRequired=(null)`| (initial)| `<null>` |
| `externalResourcesRequired=(undefined)`| (initial)| `<null>` |

## `fetchPriority` (on `<img>` inside `<div>`)
| Test Case | Flags | Result |
| --- | --- | --- |
| `fetchPriority=(string)`| (changed)| `"high"` |
| `fetchPriority=(empty string)`| (initial)| `"auto"` |
| `fetchPriority=(array with string)`| (changed)| `"high"` |
| `fetchPriority=(empty array)`| (initial)| `"auto"` |
| `fetchPriority=(object)`| (initial)| `"auto"` |
| `fetchPriority=(numeric string)`| (initial)| `"auto"` |
| `fetchPriority=(-1)`| (initial)| `"auto"` |
| `fetchPriority=(0)`| (initial)| `"auto"` |
| `fetchPriority=(integer)`| (initial)| `"auto"` |
| `fetchPriority=(NaN)`| (initial, warning)| `"auto"` |
| `fetchPriority=(float)`| (initial)| `"auto"` |
| `fetchPriority=(true)`| (initial, warning)| `"auto"` |
| `fetchPriority=(false)`| (initial, warning)| `"auto"` |
| `fetchPriority=(string 'true')`| (initial)| `"auto"` |
| `fetchPriority=(string 'false')`| (initial)| `"auto"` |
| `fetchPriority=(string 'on')`| (initial)| `"auto"` |
| `fetchPriority=(string 'off')`| (initial)| `"auto"` |
| `fetchPriority=(symbol)`| (initial, warning)| `"auto"` |
| `fetchPriority=(function)`| (initial, warning)| `"auto"` |
| `fetchPriority=(null)`| (initial)| `"auto"` |
| `fetchPriority=(undefined)`| (initial)| `"auto"` |

## `fetchpriority` (on `<img>` inside `<div>`)
| Test Case | Flags | Result |
| --- | --- | --- |
| `fetchpriority=(string)`| (changed, warning)| `"high"` |
| `fetchpriority=(empty string)`| (initial, warning)| `"auto"` |
| `fetchpriority=(array with string)`| (changed, warning)| `"high"` |
| `fetchpriority=(empty array)`| (initial, warning)| `"auto"` |
| `fetchpriority=(object)`| (initial, warning)| `"auto"` |
| `fetchpriority=(numeric string)`| (initial, warning)| `"auto"` |
| `fetchpriority=(-1)`| (initial, warning)| `"auto"` |
| `fetchpriority=(0)`| (initial, warning)| `"auto"` |
| `fetchpriority=(integer)`| (initial, warning)| `"auto"` |
| `fetchpriority=(NaN)`| (initial, warning)| `"auto"` |
| `fetchpriority=(float)`| (initial, warning)| `"auto"` |
| `fetchpriority=(true)`| (initial, warning)| `"auto"` |
| `fetchpriority=(false)`| (initial, warning)| `"auto"` |
| `fetchpriority=(string 'true')`| (initial, warning)| `"auto"` |
| `fetchpriority=(string 'false')`| (initial, warning)| `"auto"` |
| `fetchpriority=(string 'on')`| (initial, warning)| `"auto"` |
| `fetchpriority=(string 'off')`| (initial, warning)| `"auto"` |
| `fetchpriority=(symbol)`| (initial, warning)| `"auto"` |
| `fetchpriority=(function)`| (initial, warning)| `"auto"` |
| `fetchpriority=(null)`| (initial, warning)| `"auto"` |
| `fetchpriority=(undefined)`| (initial, warning)| `"auto"` |

## `fetchPriority` (on `<link>` inside `<div>`)
| Test Case | Flags | Result |
| --- | --- | --- |
| `fetchPriority=(string)`| (changed)| `"high"` |
| `fetchPriority=(empty string)`| (initial)| `"auto"` |
| `fetchPriority=(array with string)`| (changed)| `"high"` |
| `fetchPriority=(empty array)`| (initial)| `"auto"` |
| `fetchPriority=(object)`| (initial)| `"auto"` |
| `fetchPriority=(numeric string)`| (initial)| `"auto"` |
| `fetchPriority=(-1)`| (initial)| `"auto"` |
| `fetchPriority=(0)`| (initial)| `"auto"` |
| `fetchPriority=(integer)`| (initial)| `"auto"` |
| `fetchPriority=(NaN)`| (initial, warning)| `"auto"` |
| `fetchPriority=(float)`| (initial)| `"auto"` |
| `fetchPriority=(true)`| (initial, warning)| `"auto"` |
| `fetchPriority=(false)`| (initial, warning)| `"auto"` |
| `fetchPriority=(string 'true')`| (initial)| `"auto"` |
| `fetchPriority=(string 'false')`| (initial)| `"auto"` |
| `fetchPriority=(string 'on')`| (initial)| `"auto"` |
| `fetchPriority=(string 'off')`| (initial)| `"auto"` |
| `fetchPriority=(symbol)`| (initial, warning)| `"auto"` |
| `fetchPriority=(function)`| (initial, warning)| `"auto"` |
| `fetchPriority=(null)`| (initial)| `"auto"` |
| `fetchPriority=(undefined)`| (initial)| `"auto"` |

## `fill` (on `<path>` inside `<svg>`)
| Test Case | Flags | Result |
| --- | --- | --- |
Expand Down
18 changes: 18 additions & 0 deletions fixtures/attribute-behavior/src/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,24 @@ const attributes = [
tagName: 'path',
read: getSVGAttribute('externalResourcesRequired'),
},
{
name: 'fetchPriority',
overrideStringValue: 'high',
Copy link
Contributor Author

@styfle styfle Dec 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eps1lon Why would this override? I'm not sure I understand the purpose of overrideStringValue 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so that we test with a valid value instead of an arbitrary one that you'd never use in a real application

tagName: 'img',
read: getProperty('fetchPriority'),
},
{
name: 'fetchpriority',
overrideStringValue: 'high',
tagName: 'img',
read: getProperty('fetchPriority'),
},
{
name: 'fetchPriority',
overrideStringValue: 'high',
tagName: 'link',
read: getProperty('fetchPriority'),
},
{
name: 'fill',
containerTagName: 'svg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const possibleStandardNames = {
draggable: 'draggable',
enctype: 'encType',
enterkeyhint: 'enterKeyHint',
fetchpriority: 'fetchPriority',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
Expand Down