mirror of
https://github.com/servo/servo.git
synced 2025-08-24 22:58:21 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSSOM MediaQueryList Test: Properties and Functions</title>
|
||||
<link rel="author" title="Joe Balancio" href="mailto:jlbalancio@gmail.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface" />
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface" />
|
||||
<meta name="flags" content="dom" />
|
||||
<meta name="assert" content="All properties exist and are readonly. All functions exist and are instances of Function" />
|
||||
<script src="/resources/testharness.js" type="text/javascript" />
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
<div id="log" />
|
||||
<script type="text/javascript"><![CDATA[
|
||||
var mediaQueryList;
|
||||
test(
|
||||
function(){
|
||||
assert_inherits(window, "matchMedia");
|
||||
mediaQueryList = window.matchMedia('foo');
|
||||
}, 'window_inherits_matchmedia', {
|
||||
assert: ['window.matchMedia is inherited. If this fails, the rest of the test fails.']
|
||||
}
|
||||
);
|
||||
/*
|
||||
MediaQueryList Functions
|
||||
*/
|
||||
test(
|
||||
function(){
|
||||
assert_inherits(mediaQueryList, "addListener");
|
||||
assert_inherits(mediaQueryList, "removeListener");
|
||||
}, 'mediaquerylist_inherited_functions', {
|
||||
assert: ['MediaQueryList functions are inherited']
|
||||
}
|
||||
);
|
||||
|
||||
test(
|
||||
function(){
|
||||
assert_true(mediaQueryList.addListener instanceof Function);
|
||||
assert_true(mediaQueryList.removeListener instanceof Function);
|
||||
}, 'mediaquerylist_functions', {
|
||||
assert: ['MediaQueryList functions are instances of Function']
|
||||
}
|
||||
);
|
||||
|
||||
/*
|
||||
MediaQueryList Properties
|
||||
*/
|
||||
test(
|
||||
function() {
|
||||
assert_own_property(mediaQueryList, 'media');
|
||||
assert_own_property(mediaQueryList, 'matches');
|
||||
}, 'mediaquerylist_properties', {
|
||||
assert: ['MediaQueryList properties are owned by window']
|
||||
}
|
||||
);
|
||||
test(
|
||||
function() {
|
||||
assert_readonly(mediaQueryList, 'media');
|
||||
assert_readonly(mediaQueryList, 'matches');
|
||||
}, 'mediaquerylist_properties_readonly', {
|
||||
assert: ['MediaQueryList properties are readonly']
|
||||
}
|
||||
);
|
||||
]]>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSSOM Window Test: Properties and Functions</title>
|
||||
<link rel="author" title="Joe Balancio" href="mailto:jlbalancio@gmail.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface" />
|
||||
<meta name="flags" content="dom" />
|
||||
<meta name="assert" content="All properties exist and are readonly. All functions exist and are instances of Function" />
|
||||
<script src="/resources/testharness.js" type="text/javascript" />
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
<div id="log" />
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"window_inherited_functions": {
|
||||
"assert": ["window functions are inherited"]
|
||||
},
|
||||
"window_functions": {
|
||||
"assert": ["window functions are instances of Function"]
|
||||
},
|
||||
"window_properties": {
|
||||
"assert": ["window properties are owned by window"]
|
||||
},
|
||||
"window_properties_readonly": {
|
||||
"assert": ["window properties are readonly"]
|
||||
}
|
||||
}
|
||||
*/</script>
|
||||
<script type="text/javascript"><![CDATA[
|
||||
/*
|
||||
Window Functions
|
||||
*/
|
||||
test(
|
||||
function(){
|
||||
assert_inherits(window, "matchMedia");
|
||||
assert_inherits(window, "scroll");
|
||||
assert_inherits(window, "scrollTo");
|
||||
assert_inherits(window, "scrollBy");
|
||||
}, 'window_inherited_functions', {
|
||||
assert: ['window functions are inherited']
|
||||
}
|
||||
);
|
||||
|
||||
test(
|
||||
function(){
|
||||
assert_true(window.matchMedia instanceof Function);
|
||||
assert_true(window.scroll instanceof Function);
|
||||
assert_true(window.scrollTo instanceof Function);
|
||||
assert_true(window.scrollBy instanceof Function);
|
||||
}, 'window_functions', {
|
||||
assert: ['window functions are instances of Function']
|
||||
}
|
||||
);
|
||||
|
||||
/*
|
||||
Window Properties
|
||||
*/
|
||||
test(
|
||||
function() {
|
||||
assert_own_property(window, 'screen');
|
||||
assert_own_property(window, 'innerWidth');
|
||||
assert_own_property(window, 'innerHeight');
|
||||
assert_own_property(window, 'scrollX');
|
||||
assert_own_property(window, 'pageXOffset');
|
||||
assert_own_property(window, 'scrollY');
|
||||
assert_own_property(window, 'pageYOffset');
|
||||
assert_own_property(window, 'screenX');
|
||||
assert_own_property(window, 'screenY');
|
||||
assert_own_property(window, 'outerWidth');
|
||||
assert_own_property(window, 'outerHeight');
|
||||
}, 'window_properties', {
|
||||
assert: ['window properties are owned by window']
|
||||
}
|
||||
);
|
||||
test(
|
||||
function() {
|
||||
assert_readonly(window, 'screen');
|
||||
assert_readonly(window, 'innerWidth');
|
||||
assert_readonly(window, 'innerHeight');
|
||||
assert_readonly(window, 'scrollX');
|
||||
assert_readonly(window, 'pageXOffset');
|
||||
assert_readonly(window, 'scrollY');
|
||||
assert_readonly(window, 'pageYOffset');
|
||||
assert_readonly(window, 'screenX');
|
||||
assert_readonly(window, 'screenY');
|
||||
assert_readonly(window, 'outerWidth');
|
||||
assert_readonly(window, 'outerHeight');
|
||||
}, 'window_properties_readonly', {
|
||||
assert: ['window properties are readonly']
|
||||
}
|
||||
);
|
||||
]]>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue