Index: content/browser/site_per_process_browsertest.cc |
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc |
index 72a0993ac650b43371969a814e44bbe16431bd8e..ebd71b1b1ab3ce4dbb2352f1ed6936ded68f501a 100644 |
--- a/content/browser/site_per_process_browsertest.cc |
+++ b/content/browser/site_per_process_browsertest.cc |
@@ -49,6 +49,10 @@ namespace { |
void PostMessageAndWaitForReply(FrameTreeNode* sender_ftn, |
const std::string& post_message_script, |
const std::string& reply_status) { |
+ // Subtle: msg_queue needs to be declared before the ExecuteScript below. |
Charlie Reis
2015/08/14 22:54:13
..., or else it might miss the message of interest
alexmos
2015/08/14 23:51:32
Done.
|
+ // See https://crbug.com/518729. |
Charlie Reis
2015/08/14 22:54:13
Looks like WebUIMojoTest.ConnectToApplication migh
alexmos
2015/08/14 23:51:32
That one actually seems fine to me - it's using DO
Charlie Reis
2015/08/15 00:09:50
I'm not 100% sure, but that test doesn't do anythi
alexmos
2015/08/15 00:57:24
Ah, yes, it may be possible that the message could
|
+ content::DOMMessageQueue msg_queue; |
nasko
2015/08/14 23:21:13
nit: no need for content:: prefix, as it is alread
alexmos
2015/08/14 23:51:32
Done. Thanks for noticing!
|
+ |
bool success = false; |
EXPECT_TRUE(ExecuteScriptAndExtractBool( |
sender_ftn->current_frame_host(), |
@@ -56,7 +60,6 @@ void PostMessageAndWaitForReply(FrameTreeNode* sender_ftn, |
&success)); |
EXPECT_TRUE(success); |
- content::DOMMessageQueue msg_queue; |
std::string status; |
while (msg_queue.WaitForMessage(&status)) { |
if (status == reply_status) |