summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-progress-element/progress.window.js
blob: 37526053de7c92f909a052151b012f24f49f51c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
test(() => {
  const pr = document.createElement("progress");
  assert_equals(pr.value, 0);
  assert_equals(pr.position, -1);
  pr.value = 2;
  assert_equals(pr.value, 1);
  assert_equals(pr.position, 1);
}, "If value > max, then current value = max");

test(() => {
  const pr = document.createElement("progress");
  pr.value = 2;
  assert_equals(pr.value, 1);
  assert_equals(pr.position, 1);
  pr.max = 4;
  assert_equals(pr.value, 2);
  assert_equals(pr.position, 0.5);
}, "If value < max, then current value = value");