Commit 7fa8f03f authored by Eugene But's avatar Eugene But Committed by Commit Bot

Added WARN_UNUSED_RESULT annotation to WaitUntilConditionOrTimeout.

Ignoring the result of WaitUntilConditionOrTimeout call is incorrect in
many cases. CL adds WARN_UNUSED_RESULT annotation to
WaitUntilConditionOrTimeout to force callers to do the checks.

Bug: 780062
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I96daa8dfc6ec280d7f622a91f474714fe48fe3bf
Reviewed-on: https://chromium-review.googlesource.com/748108Reviewed-by: default avatarMike Baxley <baxley@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513277}
parent 4646c300
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#include "base/compiler_specific.h"
#import "base/ios/block_types.h" #import "base/ios/block_types.h"
namespace testing { namespace testing {
...@@ -29,7 +30,7 @@ extern const NSTimeInterval kWaitForPageLoadTimeout; ...@@ -29,7 +30,7 @@ extern const NSTimeInterval kWaitForPageLoadTimeout;
// Returns true when condition() becomes true, otherwise returns false after // Returns true when condition() becomes true, otherwise returns false after
// |timeout|. // |timeout|.
bool WaitUntilConditionOrTimeout(NSTimeInterval timeout, bool WaitUntilConditionOrTimeout(NSTimeInterval timeout,
ConditionBlock condition); ConditionBlock condition) WARN_UNUSED_RESULT;
} // namespace testing } // namespace testing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment