Commit 9abefd14 authored by Yuri Wiitala's avatar Yuri Wiitala Committed by Commit Bot

performance_browser_tests: Stabilize around AV-sync, run with AudioService.

Ensures that the separate, sandboxed Audio Service process is being used
when the tests are run. Also, prevents tests from failing due to recent
breakage of AV-sync measurement methodology (fix is being researched).

Bug: 940087
Change-Id: I0d7189ba9ce0d03bc8401a636085b4cc0f779920
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1555713
Auto-Submit: Yuri Wiitala <miu@chromium.org>
Commit-Queue: Caleb Rouleau <crouleau@chromium.org>
Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#648503}
parent 153dc4e3
......@@ -67,13 +67,13 @@ constexpr int kMinDataPointsForQuickRun = 3;
// long enough to collect sufficient tracing data; and, unfortunately, there's
// nothing we can do about that.
#define EXPECT_FOR_PERFORMANCE_RUN(expr) \
do { \
if (!(expr)) { \
if (is_full_performance_run()) { \
EXPECT_TRUE(expr); \
} else if (!(expr)) { \
LOG(ERROR) << "Failure: " << #expr; \
} else { \
LOG(WARNING) << "Allowing failure: " << #expr; \
} \
} while (false)
}
enum TestFlags {
kSmallWindow = 1 << 2, // Window size: 1 = 800x600, 0 = 2000x1000
......@@ -168,7 +168,7 @@ class MeanAndError {
const std::string& modifier,
const std::string& trace,
const std::string& unit) {
if (num_values_ >= 20) {
if (num_values_ > 0) {
perf_test::PrintResultMeanAndError(measurement,
modifier,
trace,
......@@ -176,8 +176,7 @@ class MeanAndError {
unit,
true);
} else {
LOG(ERROR) << "Not enough events (" << num_values_ << ") for "
<< measurement << modifier << " " << trace;
LOG(ERROR) << "No events for " << measurement << modifier << " " << trace;
}
}
......
......@@ -22,6 +22,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/tracing.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
......@@ -32,6 +33,7 @@
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "services/service_manager/sandbox/features.h"
#include "third_party/zlib/google/compression_utils.h"
#include "ui/gl/gl_switches.h"
......@@ -47,6 +49,15 @@ void TabCapturePerformanceTestBase::SetUp() {
// Because screen capture is involved, require pixel output.
EnablePixelOutput();
feature_list_.InitWithFeatures(
{
service_manager::features::kAudioServiceSandbox,
features::kAudioServiceAudioStreams,
features::kAudioServiceLaunchOnStartup,
features::kAudioServiceOutOfProcess,
},
{});
InProcessBrowserTest::SetUp();
}
......
......@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/strings/string_piece.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/trace_event_analyzer.h"
#include "chrome/test/base/in_process_browser_test.h"
......@@ -135,6 +136,9 @@ class TabCapturePerformanceTestBase : public InProcessBrowserTest {
const extensions::Extension* extension_ = nullptr;
// Manages the Audio Service feature set, enabled for these performance tests.
base::test::ScopedFeatureList feature_list_;
DISALLOW_COPY_AND_ASSIGN(TabCapturePerformanceTestBase);
};
......
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