From c207ef8ea6232da7a2b09be1ab1d4f5774288959 Mon Sep 17 00:00:00 2001 From: "John W. Bruce" Date: Mon, 7 Jan 2019 18:11:42 -0800 Subject: [PATCH] Re-enable Binary Provisioning Test (This is a merge of http://go/wvgerrit/69843) It turns out the reason the binary provisioning unit test was failing is because the test base class was setting the property to turn on binary provisioning before calling Init(), however all current Init() implementations overwrite the value of that field. As such, the tests weren't actually using binary provisioning. With that fixed, everything passes; the binary provisioning flow doesn't appear to actually be broken. Bug: 112046733 Test: CE CDM Unit Tests Test: Android Unit Tests Change-Id: I7413f7fb2227e596fb610d6ddc5b95cda2f406b8 --- libwvdrmengine/cdm/core/test/cdm_engine_test.cpp | 3 +-- libwvdrmengine/cdm/core/test/test_base.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp b/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp index f0476ce3..010b98a8 100644 --- a/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp +++ b/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp @@ -315,8 +315,7 @@ TEST_F(WvCdmEnginePreProvTestUat, ProvisioningServiceCertificateInvalidTest) { TEST_F(WvCdmEnginePreProvTestStaging, ProvisioningTest) { Provision(); } -// TODO(b/112046733): This test is broken. It should be fixed. -TEST_F(WvCdmEnginePreProvTestUatBinary, DISABLED_ProvisioningTest) { +TEST_F(WvCdmEnginePreProvTestUatBinary, ProvisioningTest) { Provision(); } diff --git a/libwvdrmengine/cdm/core/test/test_base.cpp b/libwvdrmengine/cdm/core/test/test_base.cpp index 349cec5c..83a2daac 100644 --- a/libwvdrmengine/cdm/core/test/test_base.cpp +++ b/libwvdrmengine/cdm/core/test/test_base.cpp @@ -203,8 +203,8 @@ class TestCryptoSessionFactory : public CryptoSessionFactory { void WvCdmTestBase::SetUp() { ::testing::Test::SetUp(); - Properties::set_provisioning_messages_are_binary(binary_provisioning_); Properties::Init(); + Properties::set_provisioning_messages_are_binary(binary_provisioning_); // Log the current test name, to help with debugging when the log and stdout // are not the same. const ::testing::TestInfo* const test_info =