Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255

This commit is contained in:
James Graham 2015-03-27 09:15:38 +00:00
parent b2a5225831
commit 1a81b18b9f
12321 changed files with 544385 additions and 6 deletions

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<title>document: fg/bg/link/vlink/alink-color</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-fgcolor">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-body-text">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
document.documentElement.removeChild(document.body);
assert_equals(document.fgColor, "");
assert_equals(document.bgColor, "");
assert_equals(document.linkColor, "");
assert_equals(document.vlinkColor, "");
assert_equals(document.alinkColor, "");
})
</script>

View file

@ -0,0 +1,47 @@
<!DOCTYPE html>
<title>document: fg/bg/link/vlink/alink-color</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-fgcolor">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-body-text">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
assert_equals(document.fgColor, document.body.text);
assert_equals(document.bgColor, document.body.bgColor);
assert_equals(document.linkColor, document.body.link);
assert_equals(document.vlinkColor, document.body.vLink);
assert_equals(document.alinkColor, document.body.aLink);
})
test(function() {
document.fgColor = "blue";
assert_equals(document.fgColor, "blue");
assert_equals(document.body.text, "blue");
assert_equals(document.body.getAttribute("text"), "blue");
})
test(function() {
document.bgColor = "green";
assert_equals(document.bgColor, "green");
assert_equals(document.body.bgColor, "green");
assert_equals(document.body.getAttribute("bgcolor"), "green");
})
test(function() {
document.linkColor = "red";
assert_equals(document.linkColor, "red");
assert_equals(document.body.link, "red");
assert_equals(document.body.getAttribute("link"), "red");
})
test(function() {
document.vlinkColor = "yellow";
assert_equals(document.vlinkColor, "yellow");
assert_equals(document.body.vLink, "yellow");
assert_equals(document.body.getAttribute("vlink"), "yellow");
})
test(function() {
document.alinkColor = "silver";
assert_equals(document.alinkColor, "silver");
assert_equals(document.body.aLink, "silver");
assert_equals(document.body.getAttribute("alink"), "silver");
})
</script>

View file

@ -0,0 +1,47 @@
<!DOCTYPE html>
<title>document: fg/bg/link/vlink/alink-color</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-fgcolor">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-body-text">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
assert_equals(document.fgColor, document.body.text);
assert_equals(document.bgColor, document.body.bgColor);
assert_equals(document.linkColor, document.body.link);
assert_equals(document.vlinkColor, document.body.vLink);
assert_equals(document.alinkColor, document.body.aLink);
})
test(function() {
document.body.text = "blue";
assert_equals(document.fgColor, "blue");
assert_equals(document.body.text, "blue");
assert_equals(document.body.getAttribute("text"), "blue");
})
test(function() {
document.body.bgColor = "green";
assert_equals(document.bgColor, "green");
assert_equals(document.body.bgColor, "green");
assert_equals(document.body.getAttribute("bgcolor"), "green");
})
test(function() {
document.body.link = "red";
assert_equals(document.linkColor, "red");
assert_equals(document.body.link, "red");
assert_equals(document.body.getAttribute("link"), "red");
})
test(function() {
document.body.vLink = "yellow";
assert_equals(document.vlinkColor, "yellow");
assert_equals(document.body.vLink, "yellow");
assert_equals(document.body.getAttribute("vlink"), "yellow");
})
test(function() {
document.body.aLink = "silver";
assert_equals(document.alinkColor, "silver");
assert_equals(document.body.aLink, "silver");
assert_equals(document.body.getAttribute("alink"), "silver");
})
</script>

View file

@ -0,0 +1,47 @@
<!DOCTYPE html>
<title>document: fg/bg/link/vlink/alink-color</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-fgcolor">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-body-text">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
assert_equals(document.fgColor, document.body.text);
assert_equals(document.bgColor, document.body.bgColor);
assert_equals(document.linkColor, document.body.link);
assert_equals(document.vlinkColor, document.body.vLink);
assert_equals(document.alinkColor, document.body.aLink);
})
test(function() {
document.body.setAttribute("text", "blue");
assert_equals(document.fgColor, "blue");
assert_equals(document.body.text, "blue");
assert_equals(document.body.getAttribute("text"), "blue");
})
test(function() {
document.body.setAttribute("bgcolor", "green");
assert_equals(document.bgColor, "green");
assert_equals(document.body.bgColor, "green");
assert_equals(document.body.getAttribute("bgcolor"), "green");
})
test(function() {
document.body.setAttribute("link", "red");
assert_equals(document.linkColor, "red");
assert_equals(document.body.link, "red");
assert_equals(document.body.getAttribute("link"), "red");
})
test(function() {
document.body.setAttribute("vlink", "yellow");
assert_equals(document.vlinkColor, "yellow");
assert_equals(document.body.vLink, "yellow");
assert_equals(document.body.getAttribute("vlink"), "yellow");
})
test(function() {
document.body.setAttribute("alink", "silver");
assert_equals(document.alinkColor, "silver");
assert_equals(document.body.aLink, "silver");
assert_equals(document.body.getAttribute("alink"), "silver");
})
</script>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<title>HTMLHeadingElement: obsolete attribute reflecting</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-hx-align">
<link rel="help" href="https://heycam.github.io/webidl/#es-DOMString">
<link rel="help" href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf#page=57">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
var el = document.createElement("h7");
el.align = "left";
assert_equals(el.align, "left");
assert_false(el.hasAttribute("align"));
assert_equals(el.getAttribute("align"), null);
}, "IDL attributes for HTMLHeadingElement should not apply to h7.")
</script>

View file

@ -0,0 +1,27 @@
<!doctype html>
<meta charset=utf-8>
<title>Methods that must do nothing: clear(), captureEvents(), and releaseEvents()</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
assert_equals(document.clear(), undefined);
}, "document.clear");
test(function() {
assert_equals(document.captureEvents(), undefined);
}, "document.captureEvents");
test(function() {
assert_equals(document.releaseEvents(), undefined);
}, "document.releaseEvents");
test(function() {
assert_equals(window.captureEvents(), undefined);
}, "window.captureEvents");
test(function() {
assert_equals(window.releaseEvents(), undefined);
}, "window.releaseEvents");
</script>

View file

@ -0,0 +1 @@
{"original_id":"other-elements,-attributes-and-apis"}

View file

@ -0,0 +1,57 @@
<!DOCTYPE html>
<title>event and htmlFor IDL attributes of HTMLScriptElement</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-script-event">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-script-htmlfor">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
var script = document.createElement("script");
assert_equals(script.event, "");
assert_equals(script.htmlFor, "");
})
test(function() {
var script = document.createElement("script");
script.setAttribute("event", "blah");
script.setAttribute("for", "blah");
assert_equals(script.event, "");
assert_equals(script.htmlFor, "");
assert_equals(script.getAttribute("event"), "blah");
assert_equals(script.getAttribute("for"), "blah");
})
test(function() {
var script = document.createElement("script");
script.setAttribute("event", "blah");
script.setAttribute("for", "blah");
script.event = "foo";
script.htmlFor = "foo";
assert_equals(script.event, "");
assert_equals(script.htmlFor, "");
assert_equals(script.getAttribute("event"), "blah");
assert_equals(script.getAttribute("for"), "blah");
})
test(function() {
var script = document.createElement("script");
script.setAttribute("event", "blah");
script.setAttribute("for", "blah");
script.event = null;
script.htmlFor = null;
assert_equals(script.event, "");
assert_equals(script.htmlFor, "");
assert_equals(script.getAttribute("event"), "blah");
assert_equals(script.getAttribute("for"), "blah");
})
test(function() {
var script = document.createElement("script");
script.setAttribute("event", "blah");
script.setAttribute("for", "blah");
script.event = undefined;
script.htmlFor = undefined;
assert_equals(script.event, "");
assert_equals(script.htmlFor, "");
assert_equals(script.getAttribute("event"), "blah");
assert_equals(script.getAttribute("for"), "blah");
})
</script>

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-direction-down</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<meta name="assert" content="Check if the marquee direction is from top to bottom">
<p>Test passes if the text "Test Marquee" moves from top to bottom.</p>
<marquee direction="down">Test Marquee</marquee>

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-direction-left</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<meta name="assert" content="Check if the marquee direction is from right to left">
<p>Test passes if the text "Test Marquee" moves from right to left.</p>
<marquee direction="left">Test Marquee</marquee>

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-direction-right</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<meta name="assert" content="Check if the marquee direction is from left to right">
<p>Test passes if the text "Test Marquee" moves from left to right.</p>
<marquee direction="right">Test Marquee</marquee>

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-direction-up</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<meta name="assert" content="Check if the marquee direction is from bottom to top">
<p>Test passes if the text "Test Marquee" moves from bottom to top.</p>
<marquee direction="up">Test Marquee</marquee>

View file

@ -0,0 +1,71 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-events</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<marquee id="test1" loop="2" width="1" behavior="alternate">&nbsp;</marquee>
<marquee id="test2" loop="2" width="1">&nbsp;</marquee>
<script>
var mq;
var t_start = async_test("marquee_events_start");
var t_finish = async_test("marquee_events_finish");
var t_bounce = async_test("marquee_events_bounce");
var t_bounce2 = async_test("marquee_events_bounce2");
var timeStamp = [];
var bounced = false;
setup(function() {
mq = document.getElementById("test1");
mq2 = document.getElementById("test2");
});
mq.addEventListener("start", function(evt) {
t_start.step(function() {
timeStamp.push(evt.timeStamp);
assert_true(evt.isTrusted, "The onstart event is created by UA, it must be trusted.");
assert_equals(timeStamp.length, 1, "The onstart event should be fired firstly.");
assert_false(evt.bubbles, "The bubbles property of onstart event should be false.");
assert_false(evt.cancelable, "The cancelable property of onstart event should be false.");
assert_true(evt instanceof Event, "The onstart event must be the instance of Event interface.");
});
t_start.done();
});
mq.addEventListener("finish", function(evt) {
t_finish.step(function() {
timeStamp.push(evt.timeStamp);
assert_true(evt.isTrusted, "The onfinish event is created by UA, it must be trusted.");
assert_equals(timeStamp.length, 3, "The onfinish event should be fired lastly.");
assert_false(evt.bubbles, "The bubbles property of onfinish event should be false.");
assert_false(evt.cancelable, "The cancelable property of onfinish event should be false.");
assert_true(evt instanceof Event, "The onfinish event must be the instance of Event interface.");
});
t_finish.done();
});
mq.addEventListener("bounce", function(evt) {
t_bounce.step(function() {
timeStamp.push(evt.timeStamp);
assert_true(evt.isTrusted, "The onbounce event is created by UA, it must be trusted.");
assert_equals(timeStamp.length, 2, "The onbounce event should be fired secondly.");
assert_false(evt.bubbles, "The bubbles property of onbounce event should be false.");
assert_false(evt.cancelable, "The cancelable property of onbounce event should be false.");
assert_true(evt instanceof Event, "The onbounce event must be the instance of Event interface.");
});
t_bounce.done();
});
mq2.addEventListener("bounce", function(evt) {
bounced = true;
});
mq2.addEventListener("finish", function(evt) {
t_bounce2.step(function () {
assert_false(bounced, "The onbounce event should not be fired.");
});
t_bounce2.done();
});
</script>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-loop</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<marquee id="test1" loop="a">Test1</marquee>
<marquee id="test2" loop="-2">Test2</marquee>
<marquee id="test3" loop="2">Test3</marquee>
<script>
test(function() {
var mq = document.getElementById("test1");
assert_equals(mq.loop, -1, "The value of loop should be -1.");
}, "marquee_loop_string");
test(function() {
var mq = document.getElementById("test2");
assert_equals(mq.loop, -1, "The value of loop should be -1.");
}, "marquee_loop_less_than_1");
test(function() {
var mq = document.getElementById("test3");
assert_equals(mq.loop, 2, "The value of loop should be 2.");
}, "marquee_loop_normal");
</script>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-scrollamount-effect</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<meta name="assert" content="Check the effect of scrollamount attribute">
<p>Test passes if the text "Test2" moves faster than the text "Test1".</p>
<marquee id="test1">Test1</marquee>
<marquee scrollamount="10" id="test2">Test2</marquee>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-scrollamount</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<marquee id="test1" scrollamount="aa">Test1</marquee>
<marquee id="test2" scrollamount="-1">Test2</marquee>
<marquee id="test3" scrollamount="10">Test3</marquee>
<script>
test(function() {
var mq = document.getElementById("test1");
assert_equals(mq.scrollAmount, 6, "The value of scrollamount should be 6.");
}, "The scrollamount is a string");
test(function() {
var mq = document.getElementById("test2");
assert_equals(mq.scrollAmount, 6, "The value of scrollamount should be 6.");
}, "The scrollamount is a negative");
test(function() {
var mq = document.getElementById("test3");
assert_equals(mq.scrollAmount, 10, "The value of scrollamount should be 10.");
}, "The scrollamount is a normal value");
</script>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-scrolldelay</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<marquee id="test1" scrolldelay="aa">Test1</marquee>
<marquee id="test2" scrolldelay="-1">Test2</marquee>
<marquee id="test3" scrolldelay="1">Test3</marquee>
<marquee id="test4" scrolldelay="100">Test4</marquee>
<script>
test(function() {
var mq = document.getElementById("test1");
assert_equals(mq.scrollDelay, 85, "The delay time should be 85ms.");
}, "The scrolldelay attribute is a string");
test(function() {
var mq = document.getElementById("test2");
assert_equals(mq.scrollDelay, 85, "The delay time should be 85ms.");
}, "The scrolldelay attribute is a negative");
test(function() {
var mq = document.getElementById("test3");
assert_equals(mq.scrollDelay, 60, "The delay time should be 60ms.");
}, "The scrolldelay attribute is less than 60");
test(function() {
var mq = document.getElementById("test4");
assert_equals(mq.scrollDelay, 100, "The delay time should be 100ms.");
}, "The scrolldelay attribute is greater than 60");
</script>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-start</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<meta name="flags" content="interact">
<meta name="assert" content="Check the start operation of HTMLMarqueeElement interface">
<h2>Steps:</h2>
<ol>
<li>Click the 'Start' button to start the marquee element.</li>
</ol>
<h2>Expected result:</h2>
<ul>
<li>The text "Test Marquee" start to move when the 'Start' button is clicked.</li>
</ul>
<input type="button" id="start" value="Start" />
<marquee id="test">Test Marquee</marquee>
<script>
document.getElementById("test").stop();
document.getElementById("start").addEventListener("click", function(evt) {
document.getElementById("test").start();
}, false);
</script>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: marquee-stop</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/multipage/obsolete.html#the-marquee-element">
<meta name="flags" content="interact">
<meta name="assert" content="Check the stop operation of HTMLMarqueeElement interface">
<h2>Steps:</h2>
<ol>
<li>Click the 'Start' button to start the marquee element.</li>
</ol>
<h2>Expected result:</h2>
<ul>
<li>The text "Test Marquee" stop moving when the 'Stop' button is clicked.</li>
</ul>
<input type="button" id="stop" value="Stop" />
<marquee id="test">Test Marquee</marquee>
<script>
document.getElementById("stop").addEventListener("click", function(evt) {
document.getElementById("test").stop();
}, false);
</script>