webrtc/test/run_loop.cc
Danail Kirov 6fcf6ca710 Modified PressEnterToContinue() to actualy check if Enter is pressed
Modified PressEnterToContinue() to run the Windows message loop in the
context of the SingleThreadedTaskQueueForTesting thread. The previous
PressEnterToContinue() was running the message loop in the context of
the main thread, but the "Local Preview" and "Loopback Video #0" are
created in the context of the SingleThreadedTaskQueueForTesting thread
and the message loop must be executed in the context of the thread that
created these windows in order for these windows to respond to any
event.

BUG=webrtc:9123

Change-Id: I2ec19f2569a940a510d3b2bd3881a89032d70332
Reviewed-on: https://webrtc-review.googlesource.com/c/67520
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25408}
2018-10-29 10:21:24 +00:00

23 lines
701 B
C++

/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/run_loop.h"
#include <stdio.h>
namespace webrtc {
namespace test {
void PressEnterToContinue(SingleThreadedTaskQueueForTesting&) {
puts(">> Press ENTER to continue...");
while (getc(stdin) != '\n' && !feof(stdin))
;
}
} // namespace test
} // namespace webrtc