guard xml-using tests with SK_XML

I think this will fix the Google3 roll.

Unclear to me if we actually want this to work there.
I guess it comes down to the expat dependency?

Change-Id: I5f8a6263aeae29e338a13207845fbe51ac9acc18
Reviewed-on: https://skia-review.googlesource.com/104562
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Mike Klein 2018-02-06 19:06:11 -05:00 committed by Skia Commit-Bot
parent b975ef8c66
commit 9ca602ae04

View File

@ -8,9 +8,7 @@
#include "SkCanvas.h"
#include "SkData.h"
#include "SkDocument.h"
#include "SkSVGCanvas.h"
#include "SkStream.h"
#include "SkXMLWriter.h"
#include "Test.h"
/** Returns true if data (may contain null characters) contains needle (null
@ -78,6 +76,10 @@ DEF_TEST(Annotation_PdfDefineNamedDestination, reporter) {
ContainsString(rawOutput, out->size(), "/example "));
}
#if defined(SK_XML)
#include "SkSVGCanvas.h"
#include "SkXMLWriter.h"
DEF_TEST(Annotation_SvgLink, reporter) {
SkDynamicMemoryWStream outStream;
std::unique_ptr<SkXMLWriter> xmlWriter(new SkXMLStreamWriter(&outStream));
@ -116,3 +118,4 @@ DEF_TEST(Annotation_SvgLinkNamedDestination, reporter) {
ContainsString(rawOutput, out->size(),
"a xlink:href=\"http://www.gooogle.com/#NamedDestination\""));
}
#endif