Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/dom/nodes/ParentNode-querySelector-All.html

Issue 2821243002: [dom] Fix flakiness of ParentNode-querySelector-All*.*. (Closed)
Patch Set: rebaseline of ParentNode-querySelector-All-xht.xht Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/dom/nodes/ParentNode-querySelector-All-xht.xht » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/dom/nodes/ParentNode-querySelector-All-xht.xht » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698