Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(902)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/interactive-elements/the-menu-element/menuitem-label.html

Issue 2841473002: Implement HTMLMenuItemElement.label (Closed)
Patch Set: Reflect review comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLMenuItemElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/html/semantics/interactive-elements/the-menu-element/menuitem-label.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/interactive-elements/the-menu-element/menuitem-label.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/interactive-elements/the-menu-element/menuitem-label.html
new file mode 100644
index 0000000000000000000000000000000000000000..3f0f9abf9db75d5a6e6ce3b3603a393bef807dbc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/interactive-elements/the-menu-element/menuitem-label.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<menuitem id='item1' label='item1'></menuitem>
+<menuitem id='item2'>item2</menuitem>
+<menuitem id='item3'> item 3 </menuitem>
+<menuitem id='item4' label=''>item4</menuitem>
+<menuitem id='item5' label=' item 5 '></menuitem>
+
+<script>
+test(() => {
+ assert_equals(document.querySelector('#item1').label, 'item1');
+ assert_equals(document.querySelector('#item2').label, 'item2');
+ assert_equals(document.querySelector('#item3').label, 'item 3');
+ assert_equals(document.querySelector('#item4').label, '');
+ assert_equals(document.querySelector('#item5').label, ' item 5 ');
+}, 'Menuitem.label should be the label attribute content or the result of '
+ + 'stripping and collapsing ASCII whitespace from the child text content.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLMenuItemElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698