Commit a2f43265 authored by Etienne Bergeron's avatar Etienne Bergeron Committed by Commit Bot

Re-enable browser tests TtsSsmlBrowserTest

The test TtsSsmlBrowserTest.TestStripSSML but it seems to work
fine. I suspect the memory leak got fixed by:
  https://bugs.chromium.org/p/chromium/issues/detail?id=961029#c6

Re-enabling the test. If this issue come back, please revert.

Bug: 961029
Change-Id: Ia896498bcab1298f8afaa6fceb090eabac42c890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432414
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811111}
parent 4a1fddeb
......@@ -4,18 +4,13 @@
#include "content/browser/speech/tts_controller_impl.h"
#include <memory>
#include "base/callback_helpers.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
// TODO(crbug.com/961029): Fix memory leaks in tests and re-enable on LSAN.
#ifdef LEAK_SANITIZER
#define MAYBE_TestStripSSML DISABLED_TestStripSSML
#else
#define MAYBE_TestStripSSML TestStripSSML
#endif
namespace content {
namespace {
......@@ -33,7 +28,8 @@ class TtsSsmlBrowserTest : public ContentBrowserTest {
void RunNoStripSSMLTest(std::string input) { RunSSMLStripTest(input, input); }
void RunSSMLStripTest(std::string input, std::string expected_string) {
MockTtsControllerImpl* controller = new MockTtsControllerImpl();
std::unique_ptr<MockTtsControllerImpl> controller =
std::make_unique<MockTtsControllerImpl>();
std::unique_ptr<TtsUtterance> utterance = TtsUtterance::Create(nullptr);
utterance->SetText(input);
......@@ -45,8 +41,6 @@ class TtsSsmlBrowserTest : public ContentBrowserTest {
base::Unretained(this), run_loop.QuitClosure(),
expected_string));
run_loop.Run();
delete controller;
}
// Passed as callback to StripSSML.
......@@ -60,7 +54,7 @@ class TtsSsmlBrowserTest : public ContentBrowserTest {
} // namespace
IN_PROC_BROWSER_TEST_F(TtsSsmlBrowserTest, MAYBE_TestStripSSML) {
IN_PROC_BROWSER_TEST_F(TtsSsmlBrowserTest, TestStripSSML) {
// No SSML should be stripped.
RunNoStripSSMLTest("");
RunNoStripSSMLTest("What if I told you that 5 < 4?");
......
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