Backed out changeset 7f4c085cf228 (bug 1443505) for failing Gtests on Assertion failure TelemetryScalar.cpp:773
authorarthur.iakab <aiakab@mozilla.com>
Thu, 21 Jun 2018 06:20:36 +0300
changeset 479950 f6e0c19170833b17111a042e9a1fe89d4d97dbdc
parent 479949 a41bcbc841f9baf2eaf67f4c166331e618d21b66
child 479951 06f179ea49cfdde0bf9fe8b15adf94c75760c596
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1443505
milestone62.0a1
backs out7f4c085cf2287c65e3c9a8c7d43a1a904396e6ee
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 7f4c085cf228 (bug 1443505) for failing Gtests on Assertion failure TelemetryScalar.cpp:773
toolkit/components/telemetry/tests/gtest/TestScalars.cpp
--- a/toolkit/components/telemetry/tests/gtest/TestScalars.cpp
+++ b/toolkit/components/telemetry/tests/gtest/TestScalars.cpp
@@ -311,76 +311,8 @@ TEST_F(TelemetryTestFixture, ScalarEvent
   // Check the recorded value.
   JS::RootedValue scalarsSnapshot(cx.GetJSContext());
   GetScalarsSnapshot(true, cx.GetJSContext(), &scalarsSnapshot, ProcessID::Dynamic);
 
   // Recording in parent or content doesn't matter for dynamic scalars
   // which all end up in the same place.
   CheckKeyedUintScalar(kScalarName, kLongestEvent, cx.GetJSContext(), scalarsSnapshot, 2);
 }
-
-// Test that we can properly handle too long key.
-TEST_F(TelemetryTestFixture, TooLongKey) {
-  AutoJSContextWithGlobal cx(mCleanGlobal);
-
-  // Make sure we don't get scalars from other tests.
-  Unused << mTelemetry->ClearScalars();
-
-  const char* kScalarName = "telemetry.test.keyed_unsigned_int";
-  const uint32_t kKey1Value = 1172015;
-
-  Telemetry::ScalarSet(Telemetry::ScalarID::TELEMETRY_TEST_KEYED_UNSIGNED_INT,
-                       NS_LITERAL_STRING("1234567890123456789012345678901234567890123456789012345678901234567890morethanseventy"), kKey1Value);
-
-  // Check the recorded value
-  JS::RootedValue scalarsSnapshot(cx.GetJSContext());
-  GetScalarsSnapshot(true, cx.GetJSContext(), &scalarsSnapshot);
-
-  // Check the too long key is not present.
-  CheckNumberOfProperties(kScalarName, cx.GetJSContext(), scalarsSnapshot, 0);
-}
-
-// Test that we can properly handle empty key
-TEST_F(TelemetryTestFixture, EmptyKey) {
-  AutoJSContextWithGlobal cx(mCleanGlobal);
-
-  // Make sure we don't get scalars from other tests.
-  Unused << mTelemetry->ClearScalars();
-
-  const char* kScalarName = "telemetry.test.keyed_unsigned_int";
-  const uint32_t kKey1Value = 1172015;
-
-  Telemetry::ScalarSet(Telemetry::ScalarID::TELEMETRY_TEST_KEYED_UNSIGNED_INT,
-                       NS_LITERAL_STRING(""), kKey1Value);
-
-  // Check the recorded value
-  JS::RootedValue scalarsSnapshot(cx.GetJSContext());
-  GetScalarsSnapshot(true, cx.GetJSContext(), &scalarsSnapshot);
-
-  // Check the empty key is not present.
-  CheckNumberOfProperties(kScalarName, cx.GetJSContext(), scalarsSnapshot, 0);
-}
-
-// Test that we can properly handle too many keys
-TEST_F(TelemetryTestFixture, TooManyKeys) {
-  AutoJSContextWithGlobal cx(mCleanGlobal);
-
-  // Make sure we don't get scalars from other tests.
-  Unused << mTelemetry->ClearScalars();
-
-  const char* kScalarName = "telemetry.test.keyed_unsigned_int";
-  const uint32_t kKey1Value = 1172015;
-
-  for (int i = 0; i < 150; i++) {
-    std::u16string key = u"key";
-    char16_t n = i + '0';
-    key.push_back(n);
-    Telemetry::ScalarSet(Telemetry::ScalarID::TELEMETRY_TEST_KEYED_UNSIGNED_INT,
-                         nsString(key.c_str()), kKey1Value);
-  }
-
-  // Check the recorded value
-  JS::RootedValue scalarsSnapshot(cx.GetJSContext());
-  GetScalarsSnapshot(true, cx.GetJSContext(), &scalarsSnapshot);
-
-  // Check 100 keys are present.
-  CheckNumberOfProperties(kScalarName, cx.GetJSContext(), scalarsSnapshot, 100);
-}