webrtc_m130/webrtc/test/ios/test_support.h
Kári Tristan Helgason e2baffb055 Create a UIApplication when running tests on iOS.
Fix issue where running tests on iOS would get killed after a certain
time had passed. This seems to be due to springboard killing apps
that don't have a GUI running. Creating a UIApplication to wrap
the test suite seems to solve this problem in chromium.

This CL adds a class for this purpose. Most of the code was copied
from chromium with bits taken out.

Bug: webrtc:7161, webrtc:7758
Change-Id: I10f9bc8914e73f2870a9b0a2703cde496af8db2f
Reviewed-on: https://chromium-review.googlesource.com/528173
Reviewed-by: Henrik Andreasson <henrika@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Kári Tristan Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18509}
2017-06-09 10:24:33 +00:00

26 lines
876 B
C++

/*
* Copyright 2017 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.
*/
#ifndef WEBRTC_TEST_IOS_TEST_SUPPORT_H_
#define WEBRTC_TEST_IOS_TEST_SUPPORT_H_
namespace rtc {
namespace test {
// Launches an iOS app that serves as a host for a test suite.
// This is necessary as iOS doesn't like processes without a gui
// running for longer than a few seconds.
void RunTestsFromIOSApp();
void InitTestSuite(int (*test_suite)(void), int argc, char* argv[]);
} // namespace test
} // namespace rtc
#endif // WEBRTC_TEST_IOS_TEST_SUPPORT_H_