#include <limits>
#include "base/base_paths.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/callback_helpers.h"
#include "base/path_service.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "content/public/browser/service_process_host.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/data_decoder/public/cpp/data_decoder.h"
#include "services/data_decoder/public/cpp/decode_image.h"
#include "services/data_decoder/public/mojom/data_decoder_service.mojom.h"
#include "services/data_decoder/public/mojom/image_decoder.mojom.h"
#include "services/data_decoder/public/mojom/json_parser.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
Pair;
UnorderedElementsAre;
namespace content {
namespace {
bool ReadTestFile(const base::FilePath& relative_path,
std::vector<uint8_t>& output) { … }
bool GetSingleMeasurement(const base::HistogramTester& histograms,
const char* metric_name,
base::TimeDelta& out_measurement_value) { … }
}
DataDecoderBrowserTest;
class ServiceProcessObserver : public ServiceProcessHost::Observer { … };
IN_PROC_BROWSER_TEST_F(DataDecoderBrowserTest, Launch) { … }
IN_PROC_BROWSER_TEST_F(DataDecoderBrowserTest, LaunchIsolated) { … }
IN_PROC_BROWSER_TEST_F(DataDecoderBrowserTest, DecodeImageIsolated) { … }
IN_PROC_BROWSER_TEST_F(DataDecoderBrowserTest, DecodeImage) { … }
IN_PROC_BROWSER_TEST_F(DataDecoderBrowserTest,
NoCallbackAfterDestruction_Json) { … }
IN_PROC_BROWSER_TEST_F(DataDecoderBrowserTest, NoCallbackAfterDestruction_Xml) { … }
IN_PROC_BROWSER_TEST_F(DataDecoderBrowserTest,
NoCallbackAfterDestruction_Gzip) { … }
}