Enable VideoProcessorIntegrationTest on devices.

These tests cannot run on simulators but should be enabled on real device
bots in order to catch regressions or crashes in the iOS codecs.

Bug: webrtc:8950
Change-Id: I8e877aa4368683073fdb4586cd6f4add4a1284ad
Reviewed-on: https://webrtc-review.googlesource.com/59040
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22283}
diff --git a/modules/video_coding/codecs/test/videoprocessor_integrationtest_videotoolbox.cc b/modules/video_coding/codecs/test/videoprocessor_integrationtest_videotoolbox.cc
index 2a86107..165573f 100644
--- a/modules/video_coding/codecs/test/videoprocessor_integrationtest_videotoolbox.cc
+++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest_videotoolbox.cc
@@ -35,27 +35,30 @@
   }
 };
 
-// Since we don't currently run the iOS tests on physical devices on the bots,
-// the tests are disabled.
+// HW codecs don't work on simulators. Only run these tests on device.
+#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
+#define MAYBE_TEST_F TEST_F
+#else
+#define MAYBE_TEST_F(s, name) TEST_F(s, DISABLED_##name)
+#endif
 
-TEST_F(VideoProcessorIntegrationTestVideoToolbox,
-       DISABLED_ForemanCif500kbpsH264CBP) {
+// TODO(kthelgason): Use RC Thresholds when the internal bitrateAdjuster is no
+// longer in use.
+MAYBE_TEST_F(VideoProcessorIntegrationTestVideoToolbox,
+       ForemanCif500kbpsH264CBP) {
   config_.SetCodecSettings(kVideoCodecH264, 1, 1, 1, false, false, false, false,
                            352, 288);
 
   std::vector<RateProfile> rate_profiles = {{500, 30, kForemanNumFrames}};
 
-  std::vector<RateControlThresholds> rc_thresholds = {
-      {5, 1, 0, 0.1, 0.2, 0.1, 0, 1}};
+  std::vector<QualityThresholds> quality_thresholds = {{33, 29, 0.9, 0.82}};
 
-  std::vector<QualityThresholds> quality_thresholds = {{37, 35, 0.93, 0.91}};
-
-  ProcessFramesAndMaybeVerify(rate_profiles, &rc_thresholds,
+  ProcessFramesAndMaybeVerify(rate_profiles, nullptr,
                               &quality_thresholds, nullptr, nullptr);
 }
 
-TEST_F(VideoProcessorIntegrationTestVideoToolbox,
-       DISABLED_ForemanCif500kbpsH264CHP) {
+MAYBE_TEST_F(VideoProcessorIntegrationTestVideoToolbox,
+       ForemanCif500kbpsH264CHP) {
   ScopedFieldTrials override_field_trials("WebRTC-H264HighProfile/Enabled/");
 
   config_.h264_codec_settings.profile = H264::kProfileConstrainedHigh;
@@ -64,12 +67,9 @@
 
   std::vector<RateProfile> rate_profiles = {{500, 30, kForemanNumFrames}};
 
-  std::vector<RateControlThresholds> rc_thresholds = {
-      {5, 1, 0, 0.1, 0.2, 0.1, 0, 1}};
+  std::vector<QualityThresholds> quality_thresholds = {{33, 30, 0.91, 0.83}};
 
-  std::vector<QualityThresholds> quality_thresholds = {{37, 35, 0.93, 0.91}};
-
-  ProcessFramesAndMaybeVerify(rate_profiles, &rc_thresholds,
+  ProcessFramesAndMaybeVerify(rate_profiles, nullptr,
                               &quality_thresholds, nullptr, nullptr);
 }