Skip to content

Commit 7550879

Browse files
committed
Add (failing) tests for amp-mega-menu reference points
1 parent 196a084 commit 7550879

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

tests/php/test-tag-and-attribute-sanitizer.php

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,6 +2516,65 @@ class="gallery"
25162516
[ AMP_Tag_And_Attribute_Sanitizer::DISALLOWED_CHILD_TAG ],
25172517
],
25182518

2519+
'amp-mega-menu-invalid-grandchild' => [
2520+
'
2521+
<amp-mega-menu height="30" layout="fixed-height">
2522+
<nav>
2523+
<div>
2524+
Not allowed
2525+
</div>
2526+
</nav>
2527+
</amp-mega-menu>
2528+
',
2529+
'',
2530+
[],
2531+
[ AMP_Tag_And_Attribute_Sanitizer::DISALLOWED_CHILD_TAG ],
2532+
],
2533+
2534+
'amp-mega-menu-missing-grandchild' => [
2535+
'
2536+
<amp-mega-menu height="30" layout="fixed-height">
2537+
<nav></nav>
2538+
</amp-mega-menu>
2539+
',
2540+
'',
2541+
[],
2542+
[ AMP_Tag_And_Attribute_Sanitizer::DISALLOWED_CHILD_TAG ],
2543+
],
2544+
2545+
'amp-mega-menu-missing-great-grandchild' => [
2546+
'
2547+
<amp-mega-menu height="30" layout="fixed-height">
2548+
<nav><ul></ul></nav>
2549+
</amp-mega-menu>
2550+
',
2551+
'',
2552+
[],
2553+
[ AMP_Tag_And_Attribute_Sanitizer::DISALLOWED_CHILD_TAG ],
2554+
],
2555+
2556+
'amp-mega-menu-missing-great-great-grandchild' => [
2557+
'
2558+
<amp-mega-menu height="30" layout="fixed-height">
2559+
<nav><ul><li></li></ul></nav>
2560+
</amp-mega-menu>
2561+
',
2562+
'',
2563+
[],
2564+
[ AMP_Tag_And_Attribute_Sanitizer::DISALLOWED_CHILD_TAG ],
2565+
],
2566+
2567+
'amp-mega-menu-invalid-great-great-grandchild' => [
2568+
'
2569+
<amp-mega-menu height="30" layout="fixed-height">
2570+
<nav><ul><li><section></section></li></ul></nav>
2571+
</amp-mega-menu>
2572+
',
2573+
'',
2574+
[],
2575+
[ AMP_Tag_And_Attribute_Sanitizer::DISALLOWED_CHILD_TAG ],
2576+
],
2577+
25192578
'amp-nested-menu' => [
25202579
'
25212580
<button on="tap:sidebar1">Open Sidebar</button>

0 commit comments

Comments
 (0)