display-override-member-media-feature-window-controls-overlay-overrides-browser-manual.tentative.html (1551B)
1 <!DOCTYPE html> 2 <title>Test "window-controls-overlay" in display-override member + "browser" in display member + media feature</title> 3 <link rel="help" href="https://w3c.github.io/manifest#display-member" /> 4 <link rel="help" href="https://w3c.github.io/manifest/#the-display-mode-media-feature" /> 5 <link rel="help" href="https://w3c.github.io/manifest/#dom-displaymodetype-browser" /> 6 <link rel="manifest" href="resources/display-override-member-media-feature-window-controls-overlay-overrides-browser.webmanifest" /> 7 <meta name="viewport" content="width=device-width, initial-scale=1"> 8 <script src="resources/display-override-member-media-feature-manual.js"></script> 9 <h1>Test "window-controls-overlay" in display-override member + "browser" in display member + media feature</h1> 10 <style> 11 .fail { 12 background-color: red; 13 } 14 15 @media all and (display-mode: standalone) { 16 body { 17 background-color: green; 18 } 19 } 20 </style> 21 <script> 22 const standalone = matchMedia("(display-mode: standalone)"); 23 24 standalone.onchange = () => { 25 if (standalone.matches) { 26 document.body.classList.remove("fail"); 27 } 28 } 29 30 if (!standalone.matches) { 31 document.body.classList.add("fail"); 32 } 33 </script> 34 35 <p>This test validates that the display-mode property is 'standalone' when the 36 installed app is running in "window-controls-overlay" mode.</p> 37 <h2>Manual Test Steps:</h2> 38 <p> 39 <ol> 40 <li>Install this app, and toggle into "window-controls-overlay" mode.</li> 41 <li>The background will be green if the test pases, otherwise red.</li> 42 </ol> 43 </p>