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

add_cleanup not defined in single page test #41286

Open
mbrodesser-Igalia opened this issue Aug 2, 2023 · 0 comments
Open

add_cleanup not defined in single page test #41286

mbrodesser-Igalia opened this issue Aug 2, 2023 · 0 comments
Labels

Comments

@mbrodesser-Igalia
Copy link
Contributor

<!DOCTYPE html>
<html>
<title>Primary test context</title>
<head>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
</head>
<body>
  <script>
    test(function() {
      assert_true(true, "x");

      this.add_cleanup(() => {});
    }, "XX");
  </script>
</body>
</html>

works.

<!DOCTYPE html>
<html>
<title>Primary test context</title>
<head>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
</head>
<body>
  <script>
    setup({ single_test: true });

    assert_true(true, "x");

    this.add_cleanup(() => {});

    done();

  </script>
</body>
</html>

doesn't:

line 14: TypeError: this.add_cleanup is not a function
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

2 participants