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

Side by Side Diff: third_party/WebKit/LayoutTests/html/details_summary/summary-invisible-click.html

Issue 2670273002: Move tests for DETAILS and SUMMARY elements to html/details_summary/. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 4
5 <details style="display:none"> 5 <details style="display:none">
6 <summary>Click me</summary> 6 <summary>Click me</summary>
7 Blah, blah, ... 7 Blah, blah, ...
8 </detail> 8 </detail>
9 9
10 <script> 10 <script>
11 test(() => { 11 test(() => {
12 const summary = document.querySelector('summary'); 12 const summary = document.querySelector('summary');
13 const details = document.querySelector('details'); 13 const details = document.querySelector('details');
14 assert_false(details.open); 14 assert_false(details.open);
15 summary.click(); 15 summary.click();
16 assert_true(details.open); 16 assert_true(details.open);
17 summary.click(); 17 summary.click();
18 assert_false(details.open); 18 assert_false(details.open);
19 }, 'click() on hidden SUMMARY should toggle DETAILS.'); 19 }, 'click() on hidden SUMMARY should toggle DETAILS.');
20 </script> 20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698