mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision c2e5b9fbaa17424f05ca2bb04609790a3b61d5c2
This commit is contained in:
parent
db7bb2a510
commit
f2c1b70e4a
138 changed files with 2799 additions and 851 deletions
|
@ -0,0 +1,59 @@
|
|||
function assert_barProps(barPropObjects, visible) {
|
||||
let lastBarProp = undefined;
|
||||
for (const currentBarProp of barPropObjects) {
|
||||
assert_not_equals(currentBarProp, lastBarProp, "BarBrop objects of different properties are identical");
|
||||
assert_equals(currentBarProp.visible, visible, "a BarProp's visible is wrong");
|
||||
lastBarProp = currentBarProp;
|
||||
}
|
||||
}
|
||||
|
||||
function assert_identical_barProps(barProps, w, oldBarPropObjects, visible) {
|
||||
barProps.map(val => w[val]).map((val, index) => {
|
||||
assert_equals(val, oldBarPropObjects[index], "BarProp identity not preserved");
|
||||
});
|
||||
assert_barProps(oldBarPropObjects, visible);
|
||||
}
|
||||
|
||||
async_test(t => {
|
||||
const frame = document.body.appendChild(document.createElement("iframe")),
|
||||
frameW = frame.contentWindow,
|
||||
barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"],
|
||||
barPropObjects = barProps.map(val => frameW[val]);
|
||||
|
||||
assert_barProps(barPropObjects, true);
|
||||
frame.remove();
|
||||
assert_identical_barProps(barProps, frameW, barPropObjects, false);
|
||||
t.step_timeout(() => {
|
||||
assert_identical_barProps(barProps, frameW, barPropObjects, false);
|
||||
t.done();
|
||||
}, 0);
|
||||
}, "BarBrop objects of a nested Window");
|
||||
|
||||
async_test(t => {
|
||||
const openee = window.open("/common/blank.html"),
|
||||
barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"],
|
||||
barPropObjects = barProps.map(val => openee[val]);
|
||||
|
||||
// This is used to demonstrate that the Document is replaced while the global object (not the
|
||||
// global this object) stays the same
|
||||
openee.tiedToGlobalObject = openee.document;
|
||||
|
||||
assert_barProps(barPropObjects, true);
|
||||
openee.onload = t.step_func(() => {
|
||||
assert_own_property(openee, "tiedToGlobalObject");
|
||||
assert_not_equals(openee.tiedToGlobalObject, openee.document);
|
||||
|
||||
assert_identical_barProps(barProps, openee, barPropObjects, true);
|
||||
|
||||
openee.onunload = t.step_func(() => {
|
||||
assert_identical_barProps(barProps, openee, barPropObjects, true);
|
||||
t.step_timeout(() => {
|
||||
assert_identical_barProps(barProps, openee, barPropObjects, false);
|
||||
t.done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
openee.close();
|
||||
assert_identical_barProps(barProps, openee, barPropObjects, true);
|
||||
});
|
||||
}, "BarProp objects of an auxiliary Window");
|
|
@ -1,29 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Window Proxy locationbar visible flag Test</title>
|
||||
<link rel="author" title='JuneyoungOh' href="juneyoung85@gmail.com">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
<p>WindowProxy.locationbar Test</p>
|
||||
|
||||
<h1>Manual Test Steps:</h1>
|
||||
<ol>
|
||||
<li>Make the locationbar visible in the user agent before executing this test.</li>
|
||||
<li>You may need to manually reload afterwards.</li>
|
||||
</ol>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
assert_not_equals(typeof window.locationbar, undefined, 'window.locationbar is undefined');
|
||||
assert_true(window.locationbar.visible)
|
||||
}, "window.locationbar.visible");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,29 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Window Proxy menubar visible flag Test</title>
|
||||
<link rel="author" title='JuneyoungOh' href="juneyoung85@gmail.com">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
<p>WindowProxy.menubar Test</p>
|
||||
|
||||
<h1>Manual Test Steps:</h1>
|
||||
<ol>
|
||||
<li>Make the menubar visible in the user agent before executing this test.</li>
|
||||
<li>You may need to manually reload afterwards.</li>
|
||||
</ol>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
assert_not_equals(typeof window.menubar, undefined, 'window.menubar is undefined');
|
||||
assert_true(window.menubar.visible);
|
||||
}, "window.menubar.visible");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,29 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Window Proxy personalbar visible flag Test</title>
|
||||
<link rel="author" title="vanessa" href="mailto:vanessaohsy@gmail.com">
|
||||
<script type="text/javascript" src="/resources/testharness.js"></script>
|
||||
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
<p>WindowProxy.personalbar Test</p>
|
||||
|
||||
<h1>Manual Test Steps:</h1>
|
||||
<ol>
|
||||
<li>Make the personalbar visible in the user agent before executing this test.</li>
|
||||
<li>You may need to manually reload afterwards.</li>
|
||||
</ol>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
test(function () {
|
||||
assert_not_equals(window.personalbar, undefined, "window.personalbar is undefined");
|
||||
assert_true(window.personalbar.visible, "window.personalbar.visible");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,29 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Window Proxy scrollbars visible flag Test</title>
|
||||
<link rel="author" title="vanessa" href="vanessaohsy@gmail.com">
|
||||
<script type="text/javascript" src="/resources/testharness.js"></script>
|
||||
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
<p>WindowProxy.scrollbars Test</p>
|
||||
|
||||
<h1>Manual Test Steps:</h1>
|
||||
<ol>
|
||||
<li>Make the scrollbars visible in the user agent before executing this test.</li>
|
||||
<li>You may need to manually reload afterwards.</li>
|
||||
</ol>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
test(function () {
|
||||
assert_not_equals(window.scrollbars, undefined, "window.scrollbars is undefined");
|
||||
assert_true(window.scrollbars.visible, "window.scrollbars.visible");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,29 +0,0 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>WindowProxy statusbar visible flag Test</title>
|
||||
<link rel="author" title="dokenzy" href="dokenzy@gmail.com">
|
||||
<script type="text/javascript" src="/resources/testharness.js"></script>
|
||||
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
<p>WindowProxy.statusbar Test</p>
|
||||
|
||||
<h1>Manual Test Steps:</h1>
|
||||
<ol>
|
||||
<li>Make the statusbar visible in the user agent before executing this test.</li>
|
||||
<li>You may need to manually reload afterwards.</li>
|
||||
</ol>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
test(function () {
|
||||
assert_not_equals(typeof window.statusbar.visible, undefined, 'window.statusbar.visible');
|
||||
assert_true(window.statusbar.visible, 'window.statusbar.visible');
|
||||
}, "BarProp attribute: window.statusbar.visible");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,29 +0,0 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>WindowProxy toolbar visible flag Test</title>
|
||||
<link rel="author" title="dokenzy" href="dokenzy@gmail.com">
|
||||
<script type="text/javascript" src="/resources/testharness.js"></script>
|
||||
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
<p>WindowProxy.toolbar Test</p>
|
||||
|
||||
<h1>Manual Test Steps:</h1>
|
||||
<ol>
|
||||
<li>Make the toolbar visible in the user agent before executing this test.</li>
|
||||
<li>You may need to manually reload afterwards.</li>
|
||||
</ol>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
test(function () {
|
||||
assert_not_equals(typeof window.toolbar.visible, undefined, 'window.toolbar.visible');
|
||||
assert_true(window.toolbar.visible, 'window.toolbar.visible');
|
||||
}, "BarProp attribute: window.toolbar.visible");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue