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

img.complete test has bogus loop thing #4195

Closed
bzbarsky opened this issue Nov 10, 2016 · 5 comments
Closed

img.complete test has bogus loop thing #4195

bzbarsky opened this issue Nov 10, 2016 · 5 comments
Assignees
Labels

Comments

@bzbarsky
Copy link
Contributor

bzbarsky commented Nov 10, 2016

The test at html/semantics/embedded-content/the-img-element/img.complete.html does this:

async_test(function(t) {
  assert_false(imageInstance.complete, "imageInstance.complete should be false");
  var startTime = Date.now();
  while (true) {
    if (Date.now() - startTime > 2000)
      assert_unreached('.complete didn\'t change to true');
    if (imageInstance.complete === true) break;
  }
  t.done();

This can't possibly pass, because the value of "complete" cannot change while in a busy-loop in JS. I'm not sure what this test is trying to test, but it's bogus.

@bzbarsky
Copy link
Contributor Author

Looks like @deniak committed this as part of "move TTWF tests". No useful info on where it was moved from and why the test is trying to do this... :(

@jdm
Copy link
Contributor

jdm commented Nov 10, 2016

The spec claims that complete should reflect whether a particular task has been queued, which is how this is intended to pass: https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-complete

@bzbarsky
Copy link
Contributor Author

That's ... not OK. That information is not generally available and shouldn't be. Filed whatwg/html#2038

@zcorpan zcorpan self-assigned this Dec 2, 2016
@annevk annevk added the html label Mar 6, 2017
@foolip
Copy link
Member

foolip commented Oct 13, 2018

Spec bug is now whatwg/html#1055.

@annevk
Copy link
Member

annevk commented Sep 25, 2019

Fixed by dc2e245.

@annevk annevk closed this as completed Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants