Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/html/menu_menuitem/menuitem-label.html |
| diff --git a/third_party/WebKit/LayoutTests/html/menu_menuitem/menuitem-label.html b/third_party/WebKit/LayoutTests/html/menu_menuitem/menuitem-label.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..437f58219d87013dfd4afcc4b54693c582219020 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/html/menu_menuitem/menuitem-label.html |
| @@ -0,0 +1,19 @@ |
| +<!DOCTYPE html> |
|
tkent
2017/04/25 23:24:59
This is a conformance test without any Blink-speci
yuzuchan
2017/04/26 08:54:56
Done.
|
| +<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> |
| + |
|
tkent
2017/04/25 23:24:59
We need test cases with
- leading/trailing whitesp
yuzuchan
2017/04/26 08:54:56
Done.
|
| +<script> |
| +test(() => { |
| + var item1 = document.getElementById('item1'); |
|
tkent
2017/04/25 23:24:59
Variable |item1| isn't so helpful. We can write si
yuzuchan
2017/04/26 08:54:56
Done.
|
| + var item2 = document.getElementById('item2'); |
| + assert_equals(item1.label, 'item1'); |
| + assert_equals(item2.label, 'item2'); |
| + assert_equals(item3.label, 'item 3'); |
| + assert_equals(item4.label, 'item4'); |
| +}, 'Menuitem.label should be the label attribute content or the result of ' |
| + + 'stripping and collapsing ASCII whitespace from the child text content.'); |
| +</script> |