summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2015-07-10 12:19:59 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-07-10 12:22:19 +0100
commitbcdf3c9f4dc59774f733c1cdcb7ca30d465bc1b9 (patch)
treee115aed5e8b4fb64481dd13ff37e0655a00544dc
parent383af36165d0454de695f1b8cce6feccb3432353 (diff)
downloadlibgdata-bcdf3c9f4dc59774f733c1cdcb7ca30d465bc1b9.tar.gz
tests: Port and re-enable YouTube upload tests
-rw-r--r--gdata/tests/traces/youtube/teardown-upload39
-rw-r--r--gdata/tests/traces/youtube/upload-async91
-rw-r--r--gdata/tests/traces/youtube/upload-async-cancellation92
-rw-r--r--gdata/tests/traces/youtube/upload-simple92
-rw-r--r--gdata/tests/youtube.c5
5 files changed, 225 insertions, 94 deletions
diff --git a/gdata/tests/traces/youtube/teardown-upload b/gdata/tests/traces/youtube/teardown-upload
index 0b96c52d..bae5edb3 100644
--- a/gdata/tests/traces/youtube/teardown-upload
+++ b/gdata/tests/traces/youtube/teardown-upload
@@ -1,26 +1,25 @@
-> DELETE /feeds/api/users/gdatatest/uploads/-1OFaq-ITPk HTTP/1.1
-> Soup-Debug-Timestamp: 1372769338
-> Soup-Debug: SoupSessionSync 1 (0x646230), SoupMessage 33 (0x8c28d0), SoupSocket 18 (0x84d6a0)
-> Host: gdata.youtube.com
-> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw
-> Authorization: GoogleLogin auth=DQAAAM4AAADqH8lo9PPwuw0698JF76xDlWmWyEsyRRNN8S5ISwYu47Iok-qgJi7fAtOFsBYoKc-Ayt58aGeAvydDLedsmABUfgRDW1YKfY1ZzQvFclwhXQ3HlYMQ04AU7CXDF_3BBZNR_hUhyHRvM7Jqiyn7qHddBEjnp-XTzch5ImTCbPXawpNKZeRg1nySsOHhIXxTlLOWsPYiTdAuD5Z28sfTtXJTdT8XmZ-IwKG2nuF2ptMnH2wMokEQ7PB2lEeiZKOZ59VWKjx43fVidQExxB1PhHXN
+> DELETE /youtube/v3/videos?id=fcDgG9SYgWo HTTP/1.1
+> Soup-Debug-Timestamp: 1436526042
+> Soup-Debug: SoupSession 1 (0x697270), SoupMessage 4 (0x6f3380), SoupSocket 2 (0x7fffe4002d90)
+> Host: www.googleapis.com
+> Authorization: Bearer ya29.rAEcpg9Gg0tTwYPS1C3GGnpc00A7XjAUKJe_wWmIkt-XPaMeOcWW6v3yMlgAkNlrwAM1
> GData-Version: 2
-> If-Match: W/"A0QHRH47eCp7I2A9WhFRF0s."
+> If-Match: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw"
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
> Connection: Keep-Alive
-< HTTP/1.1 412 Precondition Failed
-< Soup-Debug-Timestamp: 1372769338
-< Soup-Debug: SoupMessage 33 (0x8c28d0)
-< X-GData-User-Country: GB
-< Content-Type: application/vnd.google.gdata.error+xml
-< Transfer-Encoding: chunked
-< Date: Tue, 02 Jul 2013 12:48:58 GMT
-< Expires: Tue, 02 Jul 2013 12:48:58 GMT
-< Cache-control: private, max-age=0
-< X-Content-Type-Options: nosniff
-< X-Frame-Options: SAMEORIGIN
-< X-XSS-Protection: 1; mode=block
+< HTTP/1.1 204 No Content
+< Soup-Debug-Timestamp: 1436526043
+< Soup-Debug: SoupMessage 4 (0x6f3380)
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 11:00:43 GMT
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/qR2rMcvcJrXM7gQXiqj7Fw2GLY4"
+< Vary: Origin
+< Vary: X-Origin
< Server: GSE
+< Alternate-Protocol: 443:quic,p=1
<
-< <errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>etagsUnsupported</code><internalReason>Resource does not support Etags</internalReason></error></errors>
diff --git a/gdata/tests/traces/youtube/upload-async b/gdata/tests/traces/youtube/upload-async
index 41be94e5..38590af7 100644
--- a/gdata/tests/traces/youtube/upload-async
+++ b/gdata/tests/traces/youtube/upload-async
@@ -1,32 +1,77 @@
-> POST /feeds/api/users/default/uploads HTTP/1.1
-> Soup-Debug-Timestamp: 1375261730
-> Soup-Debug: SoupSession 1 (0x6672e0), SoupMessage 41 (0x7051a0), SoupSocket 15 (0x7fffe001a220)
-> Host: uploads.gdata.youtube.com
+> POST /upload/youtube/v3/videos?part=snippet,status,recordingDetails HTTP/1.1
+> Soup-Debug-Timestamp: 1436526040
+> Soup-Debug: SoupSession 1 (0x697270), SoupMessage 3 (0x6f3560), SoupSocket 2 (0x7fffe4002d90)
+> Host: www.googleapis.com
> Slug: sample.ogg
> Transfer-Encoding: chunked
> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
-> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw
-> Authorization: GoogleLogin auth=DQAAANUAAAAj0lyBVn5HRMO8MireVevpcnuJ7Tb1FvqlWCHKzZkJrotWdrgDLpKIA8C8H9lX_xdQ2SJhyPAPkn2Fw4Jmjjn2QpvJ0YRkCyrbJff9PPd7YP9_90MKRkDwLbHmgIT6VderIU_2yMCqC0qKFrVm47f3YRbpeoJ_r8dkTAKO_femOVMZrzVuYg51SbEfYrgypCQy_n3Fh2L7X0jk2B0-qX5yXNK0XHc1eZVsHAPqxpCa_YyIpuOAq6QPDibCHnwY3jHCdGhdgZMff9bzyFnvJ1s2GAjqMi1KAotFcWZyshDang
+> Authorization: Bearer ya29.rAEcpg9Gg0tTwYPS1C3GGnpc00A7XjAUKJe_wWmIkt-XPaMeOcWW6v3yMlgAkNlrwAM1
> GData-Version: 2
> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
> Connection: Keep-Alive
-< HTTP/1.1 201 Created
-< Soup-Debug-Timestamp: 1375261733
-< Soup-Debug: SoupMessage 41 (0x7051a0)
-< X-GData-User-Country: CZ
-< Content-Type: application/atom+xml; charset=UTF-8; type=entry
-< Expires: Wed, 31 Jul 2013 09:08:52 GMT
-< Date: Wed, 31 Jul 2013 09:08:52 GMT
-< Cache-control: private, max-age=0, must-revalidate, no-transform
-< Vary: Accept, X-GData-Authorization, GData-Version
-< GData-Version: 2.1
-< ETag: W/"C0AHQH47eCp7I2A9WhFWEks."
-< Location: https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/4yuFzWwgG9A
-< Content-Location: https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/4yuFzWwgG9A
-< X-GUploader-UploadID: AEnB2UqPEcQ1Mc7LotkbrXSyhai-RkjfTjKyMoAAHcvhqCm_5GzFezGsk9s8OMe9eLmjCbcKxbZgE0ZnfFjrGfl67eR_5wO2qg
-< Content-Length: 5400
-< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436526042
+< Soup-Debug: SoupMessage 3 (0x6f3560)
+< X-GUploader-UploadID: AEnB2UrP1nVummI_mjw0-oeSWd0KgqKHwrDUynBgbS_6ovyio8OY6A0FMhCPVyXKYQYjBFA7XF4JFHb91ybBVTUuMnJ3dCf7UQ
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw"
+< Vary: Origin
+< Vary: X-Origin
+< X-Goog-Correlation-Id: fcDgG9SYgWo
+< Content-Type: application/json; charset=UTF-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 11:00:42 GMT
+< Content-Length: 1100
+< Server: UploadServer
+< Alternate-Protocol: 443:quic,p=1
<
-< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;C0AHQH47eCp7I2A9WhFWEks.&quot;'><id>tag:youtube.com,2008:video:4yuFzWwgG9A</id><published>2013-07-31T09:08:51.000Z</published><updated>2013-07-31T09:08:51.000Z</updated><app:edited>2013-07-31T09:08:51.000Z</app:edited><app:control><app:draft>yes</app:draft><yt:state name='processing'/></app:control><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People &amp; Blogs'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='toast'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='wedding'/><title>Bad Wedding Toast</title><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=4yuFzWwgG9A&amp;feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/4yuFzWwgG9A/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/4yuFzWwgG9A/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/4yuFzWwgG9A/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/4yuFzWwgG9A/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/4yuFzWwgG9A/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILNHl1RnpXd2dHOUE&amp;sig=MC4CFQCa8y4xBOjbbt0bQkMTuk6lGfWlJAIVAJ4YHuRmfVoW5pU4TKjxcJAm11fW&amp;user_starttime=1374537600000&amp;user_endtime=1375142400000&amp;exp=1375265332093&amp;devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/4yuFzWwgG9A'/><link rel='edit' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/4yuFzWwgG9A'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/4yuFzWwgG9A/comments' countHint='0'/></gd:comments><media:group><media:category label='People &amp; Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/4yuFzWwgG9A?version=3&amp;f=user_uploads&amp;d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&amp;app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='0' yt:format='5'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'>I gave a bad toast at my friend's wedding.</media:description><media:keywords>toast, wedding</media:keywords><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=4yuFzWwgG9A&amp;feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/4yuFzWwgG9A/default.jpg' height='90' width='120' time='00:00:00' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/4yuFzWwgG9A/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/4yuFzWwgG9A/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/4yuFzWwgG9A/1.jpg' height='90' width='120' time='00:00:00' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/4yuFzWwgG9A/2.jpg' height='90' width='120' time='00:00:00' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/4yuFzWwgG9A/3.jpg' height='90' width='120' time='00:00:00' yt:name='end'/><media:title type='plain'>Bad Wedding Toast</media:title><yt:duration seconds='0'/><yt:uploaded>2013-07-31T09:08:51.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>4yuFzWwgG9A</yt:videoid></media:group></entry>
+< {
+< "kind": "youtube#video",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw\"",
+< "id": "fcDgG9SYgWo",
+< "snippet": {
+< "publishedAt": "2015-07-10T11:00:41.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "tags": [
+< "toast",
+< "wedding"
+< ],
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding."
+< }
+< },
+< "status": {
+< "uploadStatus": "uploaded",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< }
+< }
diff --git a/gdata/tests/traces/youtube/upload-async-cancellation b/gdata/tests/traces/youtube/upload-async-cancellation
index 4af235bf..219067ca 100644
--- a/gdata/tests/traces/youtube/upload-async-cancellation
+++ b/gdata/tests/traces/youtube/upload-async-cancellation
@@ -1,32 +1,76 @@
-> POST /feeds/api/users/default/uploads HTTP/1.1
-> Soup-Debug-Timestamp: 1375261737
-> Soup-Debug: SoupSession 1 (0x6672e0), SoupMessage 46 (0x705380), SoupSocket 19 (0x7fffe001a520)
-> Host: uploads.gdata.youtube.com
+> POST /upload/youtube/v3/videos?part=snippet,status,recordingDetails HTTP/1.1
+> Soup-Debug-Timestamp: 1436526040
+> Soup-Debug: SoupSession 1 (0x697270), SoupMessage 3 (0x6f3560), SoupSocket 2 (0x7fffe4002d90)
+> Host: www.googleapis.com
> Slug: sample.ogg
> Transfer-Encoding: chunked
> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
-> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw
-> Authorization: GoogleLogin auth=DQAAANUAAAAj0lyBVn5HRMO8MireVevpcnuJ7Tb1FvqlWCHKzZkJrotWdrgDLpKIA8C8H9lX_xdQ2SJhyPAPkn2Fw4Jmjjn2QpvJ0YRkCyrbJff9PPd7YP9_90MKRkDwLbHmgIT6VderIU_2yMCqC0qKFrVm47f3YRbpeoJ_r8dkTAKO_femOVMZrzVuYg51SbEfYrgypCQy_n3Fh2L7X0jk2B0-qX5yXNK0XHc1eZVsHAPqxpCa_YyIpuOAq6QPDibCHnwY3jHCdGhdgZMff9bzyFnvJ1s2GAjqMi1KAotFcWZyshDang
+> Authorization: Bearer ya29.rAEcpg9Gg0tTwYPS1C3GGnpc00A7XjAUKJe_wWmIkt-XPaMeOcWW6v3yMlgAkNlrwAM1
> GData-Version: 2
> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
> Connection: Keep-Alive
-< HTTP/1.1 201 Created
-< Soup-Debug-Timestamp: 1375261740
-< Soup-Debug: SoupMessage 46 (0x705380)
-< X-GData-User-Country: CZ
-< Content-Type: application/atom+xml; charset=UTF-8; type=entry
-< Expires: Wed, 31 Jul 2013 09:08:58 GMT
-< Date: Wed, 31 Jul 2013 09:08:58 GMT
-< Cache-control: private, max-age=0, must-revalidate, no-transform
-< Vary: Accept, X-GData-Authorization, GData-Version
-< GData-Version: 2.1
-< ETag: W/"C0AHSX47eCp7I2A9WhFWEks."
-< Location: https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/DfjAGaWDgTc
-< Content-Location: https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/DfjAGaWDgTc
-< X-GUploader-UploadID: AEnB2Uo7GOikIL_47iEhmbfhOdofRRpegG72DaNAxppnCRb16UczG2mM2nOtoNMDkjrItaHSs1WK9yjpu0AkZH0tAjqT1358OA
-< Content-Length: 5400
-< Server: HTTP Upload Server Built on Jul 21 2013 19:20:38 (1374459638)
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436526042
+< Soup-Debug: SoupMessage 3 (0x6f3560)
+< X-GUploader-UploadID: AEnB2UrP1nVummI_mjw0-oeSWd0KgqKHwrDUynBgbS_6ovyio8OY6A0FMhCPVyXKYQYjBFA7XF4JFHb91ybBVTUuMnJ3dCf7UQ
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw"
+< Vary: Origin
+< Vary: X-Origin
+< X-Goog-Correlation-Id: fcDgG9SYgWo
+< Content-Type: application/json; charset=UTF-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 11:00:42 GMT
+< Content-Length: 1100
+< Server: UploadServer
+< Alternate-Protocol: 443:quic,p=1
<
-< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;C0AHSX47eCp7I2A9WhFWEks.&quot;'><id>tag:youtube.com,2008:video:DfjAGaWDgTc</id><published>2013-07-31T09:08:58.000Z</published><updated>2013-07-31T09:08:58.000Z</updated><app:edited>2013-07-31T09:08:58.000Z</app:edited><app:control><app:draft>yes</app:draft><yt:state name='processing'/></app:control><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People &amp; Blogs'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='toast'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='wedding'/><title>Bad Wedding Toast</title><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=DfjAGaWDgTc&amp;feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/DfjAGaWDgTc/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/DfjAGaWDgTc/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/DfjAGaWDgTc/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/DfjAGaWDgTc/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/DfjAGaWDgTc/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILRGZqQUdhV0RnVGM&amp;sig=MC4CFQDWZd35B1MgYOUyfrJdVX7uNs8rpgIVALITXb98lQQb88MB1pCjKLa0HgZA&amp;user_starttime=1374537600000&amp;user_endtime=1375142400000&amp;exp=1375265338710&amp;devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/DfjAGaWDgTc'/><link rel='edit' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/DfjAGaWDgTc'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/DfjAGaWDgTc/comments' countHint='0'/></gd:comments><media:group><media:category label='People &amp; Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/DfjAGaWDgTc?version=3&amp;f=user_uploads&amp;d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&amp;app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='0' yt:format='5'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'>I gave a bad toast at my friend's wedding.</media:description><media:keywords>toast, wedding</media:keywords><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=DfjAGaWDgTc&amp;feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/DfjAGaWDgTc/default.jpg' height='90' width='120' time='00:00:00' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/DfjAGaWDgTc/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/DfjAGaWDgTc/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/DfjAGaWDgTc/1.jpg' height='90' width='120' time='00:00:00' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/DfjAGaWDgTc/2.jpg' height='90' width='120' time='00:00:00' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/DfjAGaWDgTc/3.jpg' height='90' width='120' time='00:00:00' yt:name='end'/><media:title type='plain'>Bad Wedding Toast</media:title><yt:duration seconds='0'/><yt:uploaded>2013-07-31T09:08:58.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>DfjAGaWDgTc</yt:videoid></media:group></entry>
-
+< {
+< "kind": "youtube#video",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/Lk_Eo1hcMJhjOQ3HB3tayaqGYfw\"",
+< "id": "fcDgG9SYgWo",
+< "snippet": {
+< "publishedAt": "2015-07-10T11:00:41.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/fcDgG9SYgWo/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "tags": [
+< "toast",
+< "wedding"
+< ],
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding."
+< }
+< },
+< "status": {
+< "uploadStatus": "uploaded",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< }
+< }
diff --git a/gdata/tests/traces/youtube/upload-simple b/gdata/tests/traces/youtube/upload-simple
index 8827c495..293b66f0 100644
--- a/gdata/tests/traces/youtube/upload-simple
+++ b/gdata/tests/traces/youtube/upload-simple
@@ -1,31 +1,77 @@
-> POST /feeds/api/users/default/uploads HTTP/1.1
-> Soup-Debug-Timestamp: 1372714751
-> Soup-Debug: SoupSessionSync 1 (0x646230), SoupMessage 26 (0x8c28d0), SoupSocket 12 (0x7fffe0008e20)
-> Host: uploads.gdata.youtube.com
+> POST /upload/youtube/v3/videos?part=snippet,status,recordingDetails HTTP/1.1
+> Soup-Debug-Timestamp: 1436526039
+> Soup-Debug: SoupSession 1 (0x697270), SoupMessage 1 (0x6f3290), SoupSocket 1 (0x7fffe4002b20)
+> Host: www.googleapis.com
> Slug: sample.ogg
> Transfer-Encoding: chunked
> Content-Type: multipart/related; boundary=0003Z5W789deadbeefRTE456KlemsnoZV
-> X-GData-Key: key=AI39si7Me3Q7zYs6hmkFvpRBD2nrkVjYYsUO5lh_3HdOkGRc9g6Z4nzxZatk_aAo2EsA21k7vrda0OO6oFg2rnhMedZXPyXoEw
-> Authorization: GoogleLogin auth=DQAAAM8AAAAYmh7xKlPw2OKEqyYGQmZfH5SXnGS-doCmhs_CNPp2cmIz2jPqMQZP3hgvCmKdtyHuvgGzg8qllkFDu8k5mDUc_u-yrOfCSUzP9S3LhgE7xUn1P-FQxtkHV9vSNsEFRvXk3zQfriVwv2HZLtn44SX-32BY4qF7xJKMznoP8c-ysiRZOduun0Jd9xVq7pQbD42NiNyCT-zJQGWDnIvDkiAbwKx9cwdefdoyKi7TmM60-g49t-1AyuSeQ3cg5wVztlAgK6UP0L7k_GMf7yiSINe8
+> Authorization: Bearer ya29.rAEcpg9Gg0tTwYPS1C3GGnpc00A7XjAUKJe_wWmIkt-XPaMeOcWW6v3yMlgAkNlrwAM1
> GData-Version: 2
+> Accept-Encoding: gzip, deflate
+> User-Agent: libgdata/0.17.2 - gzip
> Connection: Keep-Alive
-< HTTP/1.1 201 Created
-< Soup-Debug-Timestamp: 1372714755
-< Soup-Debug: SoupMessage 26 (0x8c28d0)
-< X-GData-User-Country: GB
-< Content-Type: application/atom+xml; charset=UTF-8; type=entry
-< Expires: Mon, 01 Jul 2013 21:39:12 GMT
-< Date: Mon, 01 Jul 2013 21:39:12 GMT
-< Cache-control: private, max-age=0, must-revalidate, no-transform
-< Vary: Accept, X-GData-Authorization, GData-Version
-< GData-Version: 2.1
-< ETag: W/"DkABQ347eCp7I2A9WhFRF0w."
-< Location: https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/Enl9pv5Dq6M
-< Content-Location: https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/Enl9pv5Dq6M
-< X-GUploader-UploadID: AEnB2Uq_LG-qvKEi1Y3i25fE--fbX-gmX5S605gvEsV53XO081ZS_BSK7zjPBBNJowVGQPYK3DGfo_-Bd0Ii9nVHkd_j8I5koQ
-< Content-Length: 5398
-< Server: HTTP Upload Server Built on Jun 25 2013 11:32:14 (1372185134)
+< HTTP/1.1 200 OK
+< Soup-Debug-Timestamp: 1436526040
+< Soup-Debug: SoupMessage 1 (0x6f3290)
+< X-GUploader-UploadID: AEnB2UquPIlzOSMOLUP40ys4YjTFLblJOaLnJFDsGmGmGoG6oTUD9fITUlDZKdU4pTCnlE1H2YIc2T1cms3s4l_iNdIH4TYvlQ
+< ETag: "iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/875j3xkJJ94CehJxw6Z0gpGzIcs"
+< Vary: Origin
+< Vary: X-Origin
+< X-Goog-Correlation-Id: Qtr-lqf5shw
+< Content-Type: application/json; charset=UTF-8
+< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+< Pragma: no-cache
+< Expires: Fri, 01 Jan 1990 00:00:00 GMT
+< Date: Fri, 10 Jul 2015 11:00:40 GMT
+< Content-Length: 1100
+< Server: UploadServer
+< Alternate-Protocol: 443:quic,p=1
<
-< <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;DkABQ347eCp7I2A9WhFRF0w.&quot;'><id>tag:youtube.com,2008:video:Enl9pv5Dq6M</id><published>2013-07-01T21:39:12.000Z</published><updated>2013-07-01T21:39:12.000Z</updated><app:edited>2013-07-01T21:39:12.000Z</app:edited><app:control><app:draft>yes</app:draft><yt:state name='processing'/></app:control><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People &amp; Blogs'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='toast'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='wedding'/><title>Bad Wedding Toast</title><link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=Enl9pv5Dq6M&amp;feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/Enl9pv5Dq6M/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/Enl9pv5Dq6M/ratings'/><link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/Enl9pv5Dq6M/complaints'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/Enl9pv5Dq6M/related'/><link rel='http://gdata.youtube.com/schemas/2007#video.captionTracks' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/Enl9pv5Dq6M/captions' yt:hasEntries='false'/><link rel='http://gdata.youtube.com/schemas/2007#uploader' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/Hdu7S-LbC8V98jsR_tu6GA'/><link rel='http://gdata.youtube.com/schemas/2007#insight.views' type='text/html' href='https://insight.youtube.com/video-analytics-partner/gwt/csv-zip?token=ChUKAggEEg8IABILRW5sOXB2NURxNk0&amp;sig=MCwCFA2XHTL7StaDxBIrqm_QH8jqHJ0MAhQYMzlR5bS-FSSBwenD8q35DMS1_w&amp;user_starttime=1371945600000&amp;user_endtime=1372550400000&amp;exp=1372718352614&amp;devKey=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm'/><link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/Enl9pv5Dq6M'/><link rel='edit' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/users/gdatatest/uploads/Enl9pv5Dq6M'/><author><name>GDataTest</name><uri>https://gdata.youtube.com/feeds/api/users/GDataTest</uri><yt:userId>Hdu7S-LbC8V98jsR_tu6GA</yt:userId></author><yt:accessControl action='comment' permission='allowed'/><yt:accessControl action='commentVote' permission='allowed'/><yt:accessControl action='videoRespond' permission='moderated'/><yt:accessControl action='rate' permission='allowed'/><yt:accessControl action='embed' permission='allowed'/><yt:accessControl action='list' permission='allowed'/><yt:accessControl action='autoPlay' permission='allowed'/><yt:accessControl action='syndicate' permission='allowed'/><gd:comments><gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/Enl9pv5Dq6M/comments' countHint='0'/></gd:comments><media:group><media:category label='People &amp; Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People</media:category><media:content url='https://www.youtube.com/v/Enl9pv5Dq6M?version=3&amp;f=user_uploads&amp;d=ARK7_SyB_5iKQvGvwsk-0D4O88HsQjpE1a8d1GxQnGDm&amp;app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='0' yt:format='5'/><media:credit role='uploader' scheme='urn:youtube' yt:display='GDataTest'>gdatatest</media:credit><media:description type='plain'>I gave a bad toast at my friend's wedding.</media:description><media:keywords>toast, wedding</media:keywords><media:license type='text/html' href='http://www.youtube.com/t/terms'>youtube</media:license><media:player url='https://www.youtube.com/watch?v=Enl9pv5Dq6M&amp;feature=youtube_gdata_player'/><media:thumbnail url='https://i1.ytimg.com/vi/Enl9pv5Dq6M/default.jpg' height='90' width='120' time='00:00:00' yt:name='default'/><media:thumbnail url='https://i1.ytimg.com/vi/Enl9pv5Dq6M/mqdefault.jpg' height='180' width='320' yt:name='mqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/Enl9pv5Dq6M/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/><media:thumbnail url='https://i1.ytimg.com/vi/Enl9pv5Dq6M/1.jpg' height='90' width='120' time='00:00:00' yt:name='start'/><media:thumbnail url='https://i1.ytimg.com/vi/Enl9pv5Dq6M/2.jpg' height='90' width='120' time='00:00:00' yt:name='middle'/><media:thumbnail url='https://i1.ytimg.com/vi/Enl9pv5Dq6M/3.jpg' height='90' width='120' time='00:00:00' yt:name='end'/><media:title type='plain'>Bad Wedding Toast</media:title><yt:duration seconds='0'/><yt:uploaded>2013-07-01T21:39:12.000Z</yt:uploaded><yt:uploaderId>UCHdu7S-LbC8V98jsR_tu6GA</yt:uploaderId><yt:videoid>Enl9pv5Dq6M</yt:videoid></media:group></entry>
+< {
+< "kind": "youtube#video",
+< "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/875j3xkJJ94CehJxw6Z0gpGzIcs\"",
+< "id": "Qtr-lqf5shw",
+< "snippet": {
+< "publishedAt": "2015-07-10T11:00:39.000Z",
+< "channelId": "UCHdu7S-LbC8V98jsR_tu6GA",
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding.",
+< "thumbnails": {
+< "default": {
+< "url": "https://i.ytimg.com/vi/Qtr-lqf5shw/default.jpg",
+< "width": 120,
+< "height": 90
+< },
+< "medium": {
+< "url": "https://i.ytimg.com/vi/Qtr-lqf5shw/mqdefault.jpg",
+< "width": 320,
+< "height": 180
+< },
+< "high": {
+< "url": "https://i.ytimg.com/vi/Qtr-lqf5shw/hqdefault.jpg",
+< "width": 480,
+< "height": 360
+< }
+< },
+< "channelTitle": "GDataTest",
+< "tags": [
+< "toast",
+< "wedding"
+< ],
+< "categoryId": "22",
+< "liveBroadcastContent": "none",
+< "localized": {
+< "title": "Bad Wedding Toast",
+< "description": "I gave a bad toast at my friend's wedding."
+< }
+< },
+< "status": {
+< "uploadStatus": "uploaded",
+< "privacyStatus": "public",
+< "license": "youtube",
+< "embeddable": true,
+< "publicStatsViewable": true
+< }
+< }
diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c
index 7ba238cb..e1731294 100644
--- a/gdata/tests/youtube.c
+++ b/gdata/tests/youtube.c
@@ -753,7 +753,7 @@ set_up_upload (UploadData *data, gconstpointer service)
gdata_entry_set_title (GDATA_ENTRY (data->video), "Bad Wedding Toast");
gdata_youtube_video_set_description (data->video, "I gave a bad toast at my friend's wedding.");
- category = gdata_media_category_new ("People", "http://gdata.youtube.com/schemas/2007/categories.cat", NULL);
+ category = gdata_media_category_new ("22", NULL, NULL);
gdata_youtube_video_set_category (data->video, category);
g_object_unref (category);
gdata_youtube_video_set_keywords (data->video, tags);
@@ -2625,13 +2625,10 @@ main (int argc, char *argv[])
g_test_add ("/youtube/query/related/async/cancellation", GDataAsyncTestData, service, gdata_set_up_async_test_data,
test_query_related_async_cancellation, gdata_tear_down_async_test_data);
-/* FIXME: Port and re-enable these tests */
-#if 0
g_test_add ("/youtube/upload/simple", UploadData, service, set_up_upload, test_upload_simple, tear_down_upload);
g_test_add ("/youtube/upload/async", GDataAsyncTestData, service, set_up_upload_async, test_upload_async, tear_down_upload_async);
g_test_add ("/youtube/upload/async/cancellation", GDataAsyncTestData, service, set_up_upload_async, test_upload_async_cancellation,
tear_down_upload_async);
-#endif
g_test_add_data_func ("/youtube/query/single", service, test_query_single);
g_test_add ("/youtube/query/single/async", GDataAsyncTestData, service, gdata_set_up_async_test_data, test_query_single_async,