Skip to content

Commit

Permalink
Merge pull request #79 from X1011/submission/X1011
Browse files Browse the repository at this point in the history
Tests for the progress element, from Dan Smith of TestTWF Seattle 2013.
  • Loading branch information
odinho committed Apr 14, 2013
2 parents 4990e54 + edfd8f3 commit 569f176
Showing 1 changed file with 31 additions and 0 deletions.
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>

0 comments on commit 569f176

Please sign in to comment.