Bug 1545226 - Enable gtests r=valentin

This patch fixes some build issues on Android and also enables some gtests.

Differential Revision: https://phabricator.services.mozilla.com/D30386

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kershaw Chang 2019-05-08 20:56:51 +00:00
Родитель 44c83c7596
Коммит 0b4a4597ab
3 изменённых файлов: 13 добавлений и 6 удалений

Просмотреть файл

@ -3,10 +3,14 @@
#include <regex>
#include "json/json.h"
#include "json/reader.h"
#include "mozilla/net/MozURL.h"
#include "nsCOMPtr.h"
#include "nsDirectoryServiceDefs.h"
#include "nsNetUtil.h"
#include "nsIFile.h"
#include "nsIURI.h"
#include "nsStreamUtils.h"
using namespace mozilla;
using namespace mozilla::net;

Просмотреть файл

@ -5,6 +5,9 @@
#include <string>
#include <vector>
using namespace mozilla;
using namespace mozilla::net;
void testServerTimingHeader(
const char* headerValue,
std::vector<std::vector<std::string>> expectedResults) {

Просмотреть файл

@ -10,8 +10,10 @@ UNIFIED_SOURCES += [
'TestHttpAuthUtils.cpp',
'TestIsValidIp.cpp',
'TestMIMEInputStream.cpp',
'TestMozURL.cpp',
'TestProtocolProxyService.cpp',
'TestReadStreamToString.cpp',
'TestServerTimingHeader.cpp',
'TestStandardURL.cpp',
]
@ -23,16 +25,14 @@ if not(CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CPU_ARCH'] == 'aarch64'):
'TestURIMutator.cpp',
]
if CONFIG['OS_TARGET'] != 'Android':
UNIFIED_SOURCES += [
'TestMozURL.cpp',
'TestServerTimingHeader.cpp',
]
TEST_HARNESS_FILES.gtest += [
'urltestdata.json',
]
USE_LIBS += [
'jsoncpp',
]
TEST_DIRS += [
'parse-ftp',
]