Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <title>Document#fullscreenEnabled</title> | |
| 3 <script src="/resources/testharness.js"></script> | |
| 4 <script src="/resources/testharnessreport.js"></script> | |
| 5 <div id="log"></div> | |
| 6 <iframe src="resources/report-fullscreen-enabled.html" name="same-origin-default "></iframe> | |
| 7 <iframe src="resources/report-fullscreen-enabled.html" allowfullscreen name="sam e-origin-allow"></iframe> | |
| 8 <iframe src="http://{{domains[www1]}}:{{ports[http][0]}}/fullscreen/api/resource s/report-fullscreen-enabled.html" name="cross-origin-default"></iframe> | |
| 9 <iframe src="http://{{domains[www1]}}:{{ports[http][0]}}/fullscreen/api/resource s/report-fullscreen-enabled.html" allowfullscreen name="cross-origin-allow"></if rame> | |
| 10 <script> | |
| 11 // Fullscreen is enabled in same-origin frames regardless of allowfullscreen, | |
| 12 // but must be explicitly enabled in cross-origin frames. | |
| 13 var expectations = { | |
| 14 "same-origin-default": true, | |
| 15 "same-origin-allow": true, | |
| 16 "cross-origin-default": false, | |
| 17 "cross-origin-allow": true | |
| 18 }; | |
| 19 | |
| 20 async_test((t) => { | |
|
foolip
2017/08/16 21:43:15
Because there's just one async_test, there's just
iclelland
2017/08/17 20:01:56
Done.
| |
| 21 // When a message is received from a child frame, ensure that the report | |
| 22 // matches the expectations. | |
| 23 window.addEventListener('message', t.step_func(e => { | |
| 24 if (e.data.report && e.data.report.api == "fullscreen") { | |
| 25 if (e.data.report.frame in expectations) { | |
| 26 assert_equals(e.data.report.enabled, | |
| 27 expectations[e.data.report.frame], | |
| 28 e.data.report.frame + " frame webkitFullscreenEnabled"); | |
|
foolip
2017/08/16 21:43:15
more webkit on the loose :)
iclelland
2017/08/17 20:01:56
Ack! Fixed, thanks :)
(Thankfully just in text out
| |
| 29 delete expectations[e.data.report.frame]; | |
| 30 // When all child frames have reported, the test is complete. | |
| 31 if (Object.keys(expectations).length == 0) | |
| 32 t.done(); | |
| 33 } | |
| 34 } | |
| 35 })); | |
| 36 }); | |
| 37 </script> | |
| OLD | NEW |