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

Unified Diff: content/public/test/browser_test_utils.cc

Issue 1297713004: Fix flakiness in postMessage-related SitePerProcessBrowserTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
Index: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 60423961dd6d2b7f4ad41539431a0318f92d0157..214b2fd61d678cca452e21f5e3fcde487f0bc5a8 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -75,9 +75,11 @@ class DOMOperationObserver : public NotificationObserver,
const NotificationDetails& details) override {
DCHECK(type == NOTIFICATION_DOM_OPERATION_RESPONSE);
Details<DomOperationNotificationDetails> dom_op_details(details);
- response_ = dom_op_details->json;
- did_respond_ = true;
- message_loop_runner_->Quit();
+ if (!did_respond_) {
Charlie Reis 2015/08/14 22:54:13 I'm a bit concerned about this one, but partly bec
alexmos 2015/08/14 23:51:32 Yes, it definitely continues to process any messag
Charlie Reis 2015/08/15 00:09:50 Ok, sounds good.
+ response_ = dom_op_details->json;
+ did_respond_ = true;
+ message_loop_runner_->Quit();
+ }
}
// Overridden from WebContentsObserver:

Powered by Google App Engine
This is Rietveld 408576698