WebKit Bugzilla
Attachment 341562 Details for
Bug 186045
: webkit-test-runner: Add support for the reftest-wait class name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (proof of concept)
0001-bug-186045.patch (text/plain), 2.14 KB, created by
Frédéric Wang (:fredw)
on 2018-05-30 05:02:41 PDT
(
hide
)
Description:
Patch (proof of concept)
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-05-30 05:02:41 PDT
Size:
2.14 KB
patch
obsolete
>From c7a65f75ca48885a9668495a88a0e98dcf8284a7 Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Wed, 30 May 2018 14:00:01 +0200 >Subject: [PATCH xserver] bug 186045 > >--- > LayoutTests/reftest-wait-expected-mismatch.html | 3 +++ > LayoutTests/reftest-wait.html | 12 ++++++++++++ > LayoutTests/resources/reftest.js | 15 +++++++++++++++ > 3 files changed, 30 insertions(+) > create mode 100644 LayoutTests/reftest-wait-expected-mismatch.html > create mode 100644 LayoutTests/reftest-wait.html > create mode 100644 LayoutTests/resources/reftest.js > >diff --git a/LayoutTests/reftest-wait-expected-mismatch.html b/LayoutTests/reftest-wait-expected-mismatch.html >new file mode 100644 >index 00000000000..2b677e00634 >--- /dev/null >+++ b/LayoutTests/reftest-wait-expected-mismatch.html >@@ -0,0 +1,3 @@ >+<style> >+:root {background-color:red} >+</style> >\ No newline at end of file >diff --git a/LayoutTests/reftest-wait.html b/LayoutTests/reftest-wait.html >new file mode 100644 >index 00000000000..c42ac507cd3 >--- /dev/null >+++ b/LayoutTests/reftest-wait.html >@@ -0,0 +1,12 @@ >+<html class="reftest-wait"> >+<script src="resources/reftest.js"></script> >+<style> >+:root {background-color:red} >+</style> >+<script> >+setTimeout(function() { >+ document.documentElement.style.backgroundColor = "green"; >+ document.documentElement.className = ""; >+}, 2000); >+</script> >+</html> >diff --git a/LayoutTests/resources/reftest.js b/LayoutTests/resources/reftest.js >new file mode 100644 >index 00000000000..dbd6dce7d91 >--- /dev/null >+++ b/LayoutTests/resources/reftest.js >@@ -0,0 +1,15 @@ >+// Helper script to handle class='reftest-wait'. >+// See https://web-platform-tests.org/writing-tests/reftests.html#controlling-when-comparison-occurs >+if (self.testRunner) { >+ function checkReftestWait() >+ { >+ if (document.documentElement.className === "reftest-wait") >+ testRunner.waitUntilDone(); >+ else >+ testRunner.notifyDone(); >+ } >+ window.addEventListener("load", () => { >+ checkReftestWait(); >+ (new MutationObserver(checkReftestWait)).observe(document.documentElement, { attributes: true }); >+ }); >+} >-- >2.17.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186045
:
341479
|
341562
|
342053
|
342129
|
342130
|
342134
|
342135
|
342137
|
342140
|
342141
|
342142
|
342143
|
342144
|
342145
|
342146
|
342154
|
342158
|
342193
|
408200
|
408201
|
408361
|
408385