| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <!-- Generate token with the command: |
| generate_token.py http://127.0.0.1:8000 WindowPlacement --expire-timestamp=2000000000 --version 3 |
| --> |
| <meta http-equiv="origin-trial" content="A48lmPPh6S3kN4VWiZ7ePykrQfuJ/LoBkShMtn08/du8HZR25PgQ9JJ1Ofv9szEfoV/H1JaqRd8O/4mnY8fu7QAAAABXeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiV2luZG93UGxhY2VtZW50IiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9" /> |
| <title>Window Placement API - interfaces exposed by origin trial</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="/resources/origin-trials-helper.js"></script> |
| <script src="/serviceworker/resources/test-helpers.js"></script> |
| <script> |
| 'use strict' |
| |
| test(t => { |
| OriginTrialsHelper.check_properties_exist(this, { |
| 'global': ['getScreens', 'isMultiScreen', 'onscreenschange'], |
| }); |
| }, 'Window Placement API interfaces and properties in Origin-Trial enabled document.'); |
| |
| test(t => { |
| assert_true('getScreens' in window, 'getScreens function exists on window scope'); |
| assert_true('isMultiScreen' in window, 'isMultiScreen function exists on window scope'); |
| assert_true('onscreenschange' in window, 'onscreenschange EventHandler exists on window scope'); |
| assert_not_equals(window.getScreens, undefined, 'getScreens function can be accessed on window'); |
| assert_not_equals(window.isMultiScreen, undefined, 'isMultiScreen function can be accessed on window'); |
| assert_not_equals(window.onscreenschange, undefined, 'onscreenschange function can be accessed on window'); |
| }, 'Window Placement API entry point in Origin-Trial enabled document.'); |
| |
| </script> |