Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests for the progress element #79

Merged
merged 5 commits into from
Apr 14, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions html/semantics/forms/the-progress-element/progress.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!doctype html>
<title>The progress element</title>
<link rel="author" title="dan smith" href="mailto:XX1011@gmail.com">
<link rel="help" href="http://www.w3.org/TR/html5/forms.html#the-progress-element">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>

<progress id=indeterminate></progress>
<progress id=quarter value=1 max=4></progress>

<script>

test(function() {
assert_equals(indeterminate.position, -1);
}, "indeterminate progress bar should have position -1");

test(function() {
assert_equals(quarter.position, 0.25);
}, "determinate progress bar should have fractional position");

test(function() {
assert_equals(indeterminate.value, 0);
}, "indeterminate progress bar should have value 0");

test(function() {
assert_equals(indeterminate.max, 1);
}, "max should be 1 by default");

</script>