| Index: third_party/WebKit/LayoutTests/external/wpt/dom/nodes/ParentNode-querySelector-All.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/ParentNode-querySelector-All.html b/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/ParentNode-querySelector-All.html
|
| index 159b0b967a84e6d365d0e3731645c42f5b80219a..a1793df4e8c866b1c83a75eaf087fe6219525124 100644
|
| --- a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/ParentNode-querySelector-All.html
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/ParentNode-querySelector-All.html
|
| @@ -12,12 +12,18 @@
|
| <script>
|
| async_test(function() {
|
| var frame = document.createElement("iframe");
|
| - frame.onload = this.step_func_done(init);
|
| + var self = this;
|
| + frame.onload = function() {
|
| + // :target doesn't work before a page rendering on some browsers. We run
|
| + // tests after an animation frame because it may be later than the first
|
| + // page rendering.
|
| + requestAnimationFrame(self.step_func_done(init.bind(self, frame)));
|
| + };
|
| frame.src = "ParentNode-querySelector-All-content.html#target";
|
| document.body.appendChild(frame);
|
| });
|
|
|
| -function init(e) {
|
| +function init(target) {
|
| /*
|
| * This test suite tests Selectors API methods in 4 different contexts:
|
| * 1. Document node
|
| @@ -56,7 +62,7 @@ function init(e) {
|
| var docType = "html"; // Only run tests suitable for HTML
|
|
|
| // Prepare the nodes for testing
|
| - var doc = e.target.contentDocument; // Document Node tests
|
| + var doc = target.contentDocument; // Document Node tests
|
|
|
| var element = doc.getElementById("root"); // In-document Element Node tests
|
|
|
|
|