[libgdata/wip/rishi/drive: 5/8] tests: ODTs are represented by GDataDocumentsDocument in Drive v2
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/wip/rishi/drive: 5/8] tests: ODTs are represented by GDataDocumentsDocument in Drive v2
- Date: Wed, 9 Aug 2017 10:00:28 +0000 (UTC)
commit 5cf3996b33ceccfef4b1d3b4ef524cc8d567bf11
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Sep 21 19:41:34 2016 +0200
tests: ODTs are represented by GDataDocumentsDocument in Drive v2
We are uploading the ODT as a GDataDocumentsDocument, but somehow
expect it to become a GDataDocumentsText when downloading. That's a
bit bizarre. More importantly, in Drive v2, only PDFs and
Drive-specific content types are supposed to be represented by the
GDataDocumentsDocument sub-classes. Therefore, it is wrong to expect
an ODT to somehow become a GDataDocumentsText.
https://bugzilla.gnome.org/show_bug.cgi?id=684920
gdata/tests/documents.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gdata/tests/documents.c b/gdata/tests/documents.c
index bcaa62c..155a99f 100644
--- a/gdata/tests/documents.c
+++ b/gdata/tests/documents.c
@@ -1443,6 +1443,11 @@ _test_download_document (GDataDocumentsDocument *document, GDataService *service
destination_file_extension = "odt";
download_stream = gdata_documents_document_download (document, GDATA_DOCUMENTS_SERVICE
(service),
GDATA_DOCUMENTS_TEXT_ODT, NULL, &error);
+ } else if (GDATA_IS_DOCUMENTS_DOCUMENT (document)) {
+ /* Text document */
+ destination_file_extension = "odt";
+ download_stream = gdata_documents_document_download (document, GDATA_DOCUMENTS_SERVICE
(service),
+ GDATA_DOCUMENTS_TEXT_ODT, NULL, &error);
} else {
/* Error! */
g_assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]