webdav.client 5.20.5664
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.npmignore +2 -0
- package/Help/ClassReference/Create.html +3026 -0
- package/Help/ClassReference/ITHit.Environment.html +2961 -0
- package/Help/ClassReference/ITHit.LogLevel.html +3198 -0
- package/Help/ClassReference/ITHit.Logger.html +3381 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.AsyncResult.html +3096 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.BrowserExtension.html +3493 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.CancellableResult.html +3262 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.DavConstants.html +4368 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Depth.html +3035 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.DocManager.html +4756 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Encoder.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Error.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.BadRequestException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.ConflictException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.DependencyFailedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.ForbiddenException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.Error.html +2969 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.Multistatus.html +2920 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.MultistatusResponse.html +2920 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.PropertyMultistatus.html +2972 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.PropertyMultistatusResponse.html +2920 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.InsufficientStorageException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.IntegrationException.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.LockedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.MethodNotAllowedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.NotFoundException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.NotImplementedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Parsers.InsufficientStorage.html +3022 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PreconditionFailedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PropertyConflictException.html +3147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PropertyException.html +3147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PropertyForbiddenException.html +3147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PropertyNotFoundException.html +3147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.QuotaNotExceededException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.SufficientDiskSpaceException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.UnauthorizedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.WebDavException.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.WebDavHttpException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Features.html +3423 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.File.html +9512 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Folder.html +11207 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.HierarchyItem.html +8575 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.HttpStatus.html +4945 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.LockInfo.html +3141 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.LockScope.html +3020 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.LockUriTokenPair.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.CancelUpload.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.CopyMove.html +2967 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Delete.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.ErrorResponse.html +2968 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Get.GoAsync.html +3047 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Get.html +2921 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Head.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.HttpMethod.html +2982 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Lock.Go.html +3083 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Lock.GoAsync.html +3101 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Lock.html +2924 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.LockRefresh.Go.html +3083 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.LockRefresh.GoAsync.html +3101 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.LockRefresh.html +2924 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Mkcol.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.MultiResponse.html +2968 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Options.html +2965 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Propfind.html +2967 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Proppatch.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Propstat.html +2950 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Put.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Report.html +2978 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Response.html +2968 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.ResponseFactory.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Search.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.SingleResponse.html +2959 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Undelete.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Unlock.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.UpdateToVersion.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.VersionControl.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.MsOfficeEditExtensions.html +3289 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Multistatus.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.MultistatusResponse.html +3051 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.OptionsInfo.html +2961 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.OrderProperty.html +3172 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.PageResults.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Property.html +3229 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.PropertyList.html +3265 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.PropertyMultistatusResponse.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.PropertyName.html +3184 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Request.html +3818 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.RequestProgress.html +3186 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.ResourceType.html +2973 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.ResumableUpload.html +3482 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.SPSManager.html +3170 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.SearchQuery.html +3186 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Source.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.DocManager.MsOfficeEditExtensions.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.CopyMove.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.CreateFile.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.CreateFolder.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.Delete.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetFolderItems.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetHeadRequests.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemByFolder.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemBySession.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetParent.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.ItemExists.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.MicrosoftOfficeDiscovery.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.NameCheck.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.Progress.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.Refresh.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.Search.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.SupportedFeatures.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyProperties.GetProperties.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyProperties.UpdateProperties.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.CheckSupport.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.Etag.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.GetLocks.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.Lock.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.RefreshLock.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Versions.GetVersions.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Versions.ManageVersions.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Versions.PutUnderVersion.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Versions.ReadContent.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.WebDavSession.Events.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.AutoUploader.html +2970 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Collections.Map.html +3130 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Collections.Pair.html +3004 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.ContentWriter.html +3158 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Controls.DropZone.html +3012 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Controls.FSEntryFactory.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Controls.HtmlControl.html +3002 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Controls.Input.html +3012 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.DropZoneCollection.html +3354 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.AsyncEvent.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.BaseEvent.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.BeforeUploadStarted.html +3242 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.Error.html +2918 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.EventName.html +3059 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.ProgressChanged.html +2918 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.QueueChanged.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.StateChanged.html +2918 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.UploadError.html +3371 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.UploadItemsCreated.html +3358 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.FSEntry.html +3039 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.FileSpan.html +3023 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Groups.Group.html +2978 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Groups.GroupManager.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.InputCollection.html +3354 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.ItemSettings.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Path.Generator.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Path.PathCache.html +2910 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Progress.html +3186 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Providers.ProgressTracker.html +2961 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Providers.UploadDiff.html +3003 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Providers.UploadProvider.html +3049 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Queue.html +3824 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.ServerItem.html +2978 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Settings.html +3060 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.State.html +3243 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.BaseState.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.CanceledState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.CompletedState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.Factory.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.PausedState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.QueuedState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.ResumeState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.SkippedState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.UploadingState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.UploadItem.html +6147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.UploadLocation.html +2978 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Uploader.html +3314 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.UploaderSession.html +4374 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Utils.DavUrl.html +2996 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Utils.DavUrlBuilder.html +2961 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Utils.RepeatableAction.html +3077 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.UploadProgressInfo.html +3096 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Version.html +4373 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.WebDavRequest.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.WebDavResponse.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.WebDavSession.html +5097 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.WebDavUtil.html +2912 -0
- package/Help/ClassReference/fonts/glyphicons-halflings-regular.eot +0 -0
- package/Help/ClassReference/fonts/glyphicons-halflings-regular.svg +229 -0
- package/Help/ClassReference/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/Help/ClassReference/fonts/glyphicons-halflings-regular.woff +0 -0
- package/Help/ClassReference/global.html +8985 -0
- package/Help/ClassReference/index.html +3889 -0
- package/Help/ClassReference/scripts/bootstrap.min.js +7 -0
- package/Help/ClassReference/scripts/jquery.min.js +6 -0
- package/Help/ClassReference/scripts/jquery.min.map +1 -0
- package/Help/ClassReference/scripts/linenumber.js +29 -0
- package/Help/ClassReference/scripts/main.js +104 -0
- package/Help/ClassReference/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/Help/ClassReference/scripts/prettify/lang-css.js +2 -0
- package/Help/ClassReference/scripts/prettify/prettify.js +28 -0
- package/Help/ClassReference/scripts/underscore-min.js +6 -0
- package/Help/ClassReference/scripts/underscore-min.map +1 -0
- package/Help/ClassReference/styles/bootstrap.min.css +7 -0
- package/Help/ClassReference/styles/jaguar.css +406 -0
- package/Help/ClassReference/styles/prettify-jsdoc.css +111 -0
- package/Help/ClassReference/styles/prettify-tomorrow.css +132 -0
- package/Help/index.html +6 -0
- package/IT Hit WebDAV AJAX Library License Agreement.rtf +314 -0
- package/ITHitWebDAVClient.js +87 -0
- package/Plugins/ITHitEditDocumentOpener.deb +0 -0
- package/Plugins/ITHitEditDocumentOpener.msi +0 -0
- package/Plugins/ITHitEditDocumentOpener.pkg +0 -0
- package/Plugins/ITHitEditDocumentOpener.rpm +0 -0
- package/README.md +98 -0
- package/Tests/DocManager/MsOfficeEditExtensions.js +53 -0
- package/Tests/Helper.js +214 -0
- package/Tests/HierarchyItems/CopyMove.js +341 -0
- package/Tests/HierarchyItems/CreateFile.js +157 -0
- package/Tests/HierarchyItems/CreateFolder.js +156 -0
- package/Tests/HierarchyItems/Delete.js +73 -0
- package/Tests/HierarchyItems/GetFolderItems.js +87 -0
- package/Tests/HierarchyItems/GetHeadRequests.js +73 -0
- package/Tests/HierarchyItems/GetItemByFolder.js +91 -0
- package/Tests/HierarchyItems/GetItemBySession.js +135 -0
- package/Tests/HierarchyItems/GetParent.js +58 -0
- package/Tests/HierarchyItems/ItemExists.js +73 -0
- package/Tests/HierarchyItems/MicrosoftOfficeDiscovery.js +51 -0
- package/Tests/HierarchyItems/NameCheck.js +184 -0
- package/Tests/HierarchyItems/Progress.js +89 -0
- package/Tests/HierarchyItems/Quota.js +35 -0
- package/Tests/HierarchyItems/Refresh.js +68 -0
- package/Tests/HierarchyItems/Search.js +187 -0
- package/Tests/HierarchyItems/SupportedFeatures.js +53 -0
- package/Tests/HierarchyProperties/GetProperties.js +192 -0
- package/Tests/HierarchyProperties/UpdateFolderProperties.js +138 -0
- package/Tests/HierarchyProperties/UpdateProperties.js +187 -0
- package/Tests/ITHitTests.css +72 -0
- package/Tests/ITHitTests.js +560 -0
- package/Tests/Locks/CheckSupport.js +66 -0
- package/Tests/Locks/CopyLock.js +67 -0
- package/Tests/Locks/Etag.js +277 -0
- package/Tests/Locks/GetLocks.js +117 -0
- package/Tests/Locks/Lock.js +134 -0
- package/Tests/Locks/RefreshLock.js +94 -0
- package/Tests/Upload/CancelUpload.js +34 -0
- package/Tests/Upload/GetBytesUploaded.js +47 -0
- package/Tests/Versions/GetVersions.js +84 -0
- package/Tests/Versions/ManageVersions.js +180 -0
- package/Tests/Versions/PutUnderVersion.js +98 -0
- package/Tests/Versions/ReadContent.js +82 -0
- package/Tests/WebDavSession/Events.js +125 -0
- package/Tests/index.html +9 -0
- package/Tests/qunit-runner/highlight/github.css +124 -0
- package/Tests/qunit-runner/highlight/highlight.js +1 -0
- package/Tests/qunit-runner/main.js +340 -0
- package/Tests/qunit-runner/qunit/jquery.js +10308 -0
- package/Tests/qunit-runner/qunit/qunit.css +237 -0
- package/Tests/qunit-runner/qunit/qunit.js +2495 -0
- package/package.json +25 -0
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
document.title = 'IT Hit WebDAV AJAX Library Integration Tests';
|
|
2
|
+
|
|
3
|
+
window.ITHitTestsConfig = {
|
|
4
|
+
Url: '',
|
|
5
|
+
TestsHelperMethodsNamespace: 'ITHit.WebDAV.Client.Tests',
|
|
6
|
+
Tests: [
|
|
7
|
+
'DocManager/MsOfficeEditExtensions.js',
|
|
8
|
+
'HierarchyItems/MicrosoftOfficeDiscovery.js',
|
|
9
|
+
'HierarchyItems/CreateFolder.js',
|
|
10
|
+
'HierarchyItems/CreateFile.js',
|
|
11
|
+
'HierarchyItems/GetItemBySession.js',
|
|
12
|
+
'HierarchyItems/GetItemByFolder.js',
|
|
13
|
+
'HierarchyItems/GetFolderItems.js',
|
|
14
|
+
'HierarchyItems/GetParent.js',
|
|
15
|
+
'HierarchyItems/CopyMove.js',
|
|
16
|
+
'HierarchyItems/Delete.js',
|
|
17
|
+
'HierarchyItems/Refresh.js',
|
|
18
|
+
'HierarchyItems/ItemExists.js',
|
|
19
|
+
'HierarchyItems/SupportedFeatures.js',
|
|
20
|
+
'HierarchyItems/Quota.js',
|
|
21
|
+
'HierarchyItems/Progress.js',
|
|
22
|
+
'HierarchyItems/Search.js',
|
|
23
|
+
'HierarchyItems/NameCheck.js',
|
|
24
|
+
'HierarchyProperties/GetProperties.js',
|
|
25
|
+
'HierarchyProperties/UpdateProperties.js',
|
|
26
|
+
'Locks/CheckSupport.js',
|
|
27
|
+
'Locks/GetLocks.js',
|
|
28
|
+
'Locks/Lock.js',
|
|
29
|
+
'Locks/RefreshLock.js',
|
|
30
|
+
'Versions/GetVersions.js',
|
|
31
|
+
'Versions/ManageVersions.js',
|
|
32
|
+
'Versions/PutUnderVersion.js',
|
|
33
|
+
'Versions/ReadContent.js',
|
|
34
|
+
'Upload/GetBytesUploaded.js',
|
|
35
|
+
'Upload/CancelUpload.js',
|
|
36
|
+
'WebDavSession/Events.js'
|
|
37
|
+
|
|
38
|
+
// @todo Add tests for methods:
|
|
39
|
+
// GetSource, GetSourceAsync
|
|
40
|
+
// CreateLockNull
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// IE<=9
|
|
45
|
+
if (typeof console === "undefined" || typeof console.log === "undefined") {
|
|
46
|
+
console = {};
|
|
47
|
+
console.log = function() {};
|
|
48
|
+
console.debug = function () { };
|
|
49
|
+
}
|
|
50
|
+
if (!Array.prototype.forEach) {
|
|
51
|
+
Array.prototype.forEach = function(fn, scope) {
|
|
52
|
+
for(var i = 0, len = this.length; i < len; ++i) {
|
|
53
|
+
fn.call(scope, this[i], i, this);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
;
|
|
59
|
+
// setTimeout(function() {
|
|
60
|
+
|
|
61
|
+
function findFileDirectory(currentFileName) {
|
|
62
|
+
var scripts = document.getElementsByTagName('script');
|
|
63
|
+
for (var i = 0, l = scripts.length; i < l; i++) {
|
|
64
|
+
var fileNameMatch = /(.+)(\\|\/)([^\/\\?]+)(\?.*)?$/.exec(scripts[i].src);
|
|
65
|
+
if (fileNameMatch && fileNameMatch[3] === currentFileName) {
|
|
66
|
+
return fileNameMatch[1] + fileNameMatch[2];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return '';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Find base url
|
|
73
|
+
var baseUrl = findFileDirectory('ITHitTests.js') || findFileDirectory('TestsUI.js');
|
|
74
|
+
|
|
75
|
+
// Load QUnit Runner
|
|
76
|
+
(function(url, callback) {
|
|
77
|
+
var script = document.createElement('script');
|
|
78
|
+
script.src = url + '?t=' + (new Date()).getTime();
|
|
79
|
+
script.onload = function () {
|
|
80
|
+
callback();
|
|
81
|
+
callback = function () { };
|
|
82
|
+
};
|
|
83
|
+
// For IE<9
|
|
84
|
+
script.onreadystatechange = function () {
|
|
85
|
+
if (this.readyState == "complete" || this.readyState == "loaded") {
|
|
86
|
+
setTimeout(function() {
|
|
87
|
+
callback();
|
|
88
|
+
callback = function () { };
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
document.getElementsByTagName("head")[0].appendChild(script);
|
|
93
|
+
})(baseUrl + 'qunit-runner/main.js', function() {
|
|
94
|
+
|
|
95
|
+
// Initialize QUnit Runner
|
|
96
|
+
QUnitRunner.init({
|
|
97
|
+
baseUrl: baseUrl,
|
|
98
|
+
preload: [
|
|
99
|
+
'Helper.js',
|
|
100
|
+
'ITHitTests.css'
|
|
101
|
+
],
|
|
102
|
+
tests: window.ITHitTestsConfig.Tests,
|
|
103
|
+
onInit: function() {
|
|
104
|
+
$(function() {
|
|
105
|
+
window.ITHitTests = new ITHitTests(window.ITHitTestsConfig);
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
onEnd: function() {
|
|
109
|
+
Helper.Destroy();
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
function ITHitTests(config) {
|
|
114
|
+
this.config = config;
|
|
115
|
+
this.isRun = false;
|
|
116
|
+
this.isDone = false;
|
|
117
|
+
this.$el = null;
|
|
118
|
+
|
|
119
|
+
this.testInstances = {};
|
|
120
|
+
this.testRequestsLog = {};
|
|
121
|
+
|
|
122
|
+
// Store test instances
|
|
123
|
+
QUnit.testStart($.proxy(function() {
|
|
124
|
+
var test = QUnit.config.current;
|
|
125
|
+
this.testInstances[test.testNumber] = test;
|
|
126
|
+
this.testRequestsLog[test.testNumber] = [];
|
|
127
|
+
|
|
128
|
+
this._renderTestButtons(test.testNumber);
|
|
129
|
+
this._refreshProgress();
|
|
130
|
+
}, this));
|
|
131
|
+
QUnit.done($.proxy(function() {
|
|
132
|
+
this.isRun = false;
|
|
133
|
+
this.isDone = true;
|
|
134
|
+
this.$el.find('.button-startToggle').val('Run');
|
|
135
|
+
|
|
136
|
+
// Disable stop button
|
|
137
|
+
this.$el.find('.button-stop').prop('disabled', true);
|
|
138
|
+
this._refreshProgress();
|
|
139
|
+
}, this));
|
|
140
|
+
|
|
141
|
+
this._render($.proxy(function () {
|
|
142
|
+
this._initUrl();
|
|
143
|
+
|
|
144
|
+
// Auto start
|
|
145
|
+
if (QUnitRunner.getHash('autostart') !== '0') {
|
|
146
|
+
this.start();
|
|
147
|
+
} else {
|
|
148
|
+
QUnitRunner.setHash('autostart', null);
|
|
149
|
+
}
|
|
150
|
+
}, this));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
ITHitTests.prototype = {
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Start tests
|
|
157
|
+
*/
|
|
158
|
+
start: function() {
|
|
159
|
+
if (this.isRun) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
this.isRun = true;
|
|
163
|
+
this.$el.find('.button-startToggle').val('Pause');
|
|
164
|
+
|
|
165
|
+
// Enable stop button
|
|
166
|
+
this.$el.find('.button-stop').prop('disabled', false);
|
|
167
|
+
|
|
168
|
+
// Initialize
|
|
169
|
+
window.webDavSession = new ITHit.WebDAV.Client.WebDavSession();
|
|
170
|
+
ITHit.Config.PreventCaching = true; // Force disable cache for browsers. With cache ContentRange test is failed.
|
|
171
|
+
this._subscribeOnRequests();
|
|
172
|
+
|
|
173
|
+
// Create tests dir
|
|
174
|
+
Helper.Create('/', function() {
|
|
175
|
+
QUnitRunner.start();
|
|
176
|
+
});
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
startAll: function() {
|
|
180
|
+
setTimeout(function() {
|
|
181
|
+
QUnitRunner.setHash('module', null);
|
|
182
|
+
QUnitRunner.setHash('testNumber', null, true);
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Pause tests
|
|
188
|
+
*/
|
|
189
|
+
toggleStart: function() {
|
|
190
|
+
if (this.isDone) {
|
|
191
|
+
setTimeout(function() {
|
|
192
|
+
window.location.reload();
|
|
193
|
+
});
|
|
194
|
+
} else if (this.isRun) {
|
|
195
|
+
this.pause();
|
|
196
|
+
} else {
|
|
197
|
+
this.start();
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Pause tests
|
|
203
|
+
*/
|
|
204
|
+
pause: function() {
|
|
205
|
+
if (!this.isRun) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
this.isRun = false;
|
|
209
|
+
this.$el.find('.button-startToggle').val('Continue');
|
|
210
|
+
|
|
211
|
+
QUnitRunner.stop();
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
stop: function() {
|
|
215
|
+
this.pause();
|
|
216
|
+
this.$el.find('.button-startToggle').val('Start');
|
|
217
|
+
this.$el.find('.button-stop').prop('disabled', true);
|
|
218
|
+
|
|
219
|
+
QUnitRunner.setHash('autostart', '0', true);
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
skip: function(assert, message) {
|
|
223
|
+
assert.ok(true, message);
|
|
224
|
+
|
|
225
|
+
var li = $('#qunit-test-output' + assert.test.testNumber);
|
|
226
|
+
|
|
227
|
+
li.css({
|
|
228
|
+
backgroundColor: '#eee',
|
|
229
|
+
color: '#aaa'
|
|
230
|
+
});
|
|
231
|
+
li.find('.test-name').css({
|
|
232
|
+
color: '#aaa'
|
|
233
|
+
});
|
|
234
|
+
li.find('.module-name').prepend('SKIPPED! ');
|
|
235
|
+
|
|
236
|
+
setTimeout(function() {
|
|
237
|
+
li.find('.counts').css({
|
|
238
|
+
display: 'none'
|
|
239
|
+
});
|
|
240
|
+
}, 14);
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* @param url
|
|
246
|
+
*/
|
|
247
|
+
setUrl: function(url) {
|
|
248
|
+
this.config.Url = url;
|
|
249
|
+
this.$el.find('input[name="Url"]').val(url);
|
|
250
|
+
|
|
251
|
+
QUnitRunner.setHash('url', url);
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
*
|
|
256
|
+
* @private
|
|
257
|
+
*/
|
|
258
|
+
_render: function(fCallback) {
|
|
259
|
+
if (jQuery('#qunit-testrunner-toolbar').length < 1) {
|
|
260
|
+
setTimeout($.proxy(function () {
|
|
261
|
+
this._render(fCallback);
|
|
262
|
+
}, this), 100);
|
|
263
|
+
} else {
|
|
264
|
+
this.$el = $('<div />').appendTo('#qunit-testrunner-toolbar');
|
|
265
|
+
$('<meta />')
|
|
266
|
+
.appendTo('head')
|
|
267
|
+
.attr({
|
|
268
|
+
charset: 'utf-8'
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
this.$el.css({
|
|
272
|
+
paddingTop: 5
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
$('<label />')
|
|
276
|
+
.appendTo(this.$el)
|
|
277
|
+
.text('Server Url:');
|
|
278
|
+
|
|
279
|
+
$('<input />')
|
|
280
|
+
.appendTo(this.$el.find('label'))
|
|
281
|
+
.attr({
|
|
282
|
+
name: 'Url'
|
|
283
|
+
})
|
|
284
|
+
.css({
|
|
285
|
+
width: 200,
|
|
286
|
+
marginLeft: 5
|
|
287
|
+
})
|
|
288
|
+
.on('keyup', $.proxy(function (e) {
|
|
289
|
+
if (e.keyCode === 13) {
|
|
290
|
+
this.setUrl(this.$el.find('input[name="Url"]').val());
|
|
291
|
+
this.toggleStart();
|
|
292
|
+
}
|
|
293
|
+
}, this));
|
|
294
|
+
|
|
295
|
+
$('<input type="button" />')
|
|
296
|
+
.appendTo(this.$el)
|
|
297
|
+
.addClass('button-startToggle')
|
|
298
|
+
.attr({
|
|
299
|
+
value: 'Start'
|
|
300
|
+
})
|
|
301
|
+
.on('click', $.proxy(function () {
|
|
302
|
+
this.setUrl(this.$el.find('input[name="Url"]').val());
|
|
303
|
+
this.toggleStart();
|
|
304
|
+
}, this));
|
|
305
|
+
|
|
306
|
+
if (QUnit.config.testNumber.length > 0) {
|
|
307
|
+
$('<input type="button" />')
|
|
308
|
+
.appendTo(this.$el)
|
|
309
|
+
.css('margin-left', '5px')
|
|
310
|
+
.attr({
|
|
311
|
+
value: 'Run all'
|
|
312
|
+
})
|
|
313
|
+
.on('click', $.proxy(function () {
|
|
314
|
+
this.setUrl(this.$el.find('input[name="Url"]').val());
|
|
315
|
+
this.startAll();
|
|
316
|
+
}, this));
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
$('<input type="button" />')
|
|
320
|
+
.appendTo(this.$el)
|
|
321
|
+
.addClass('button-stop')
|
|
322
|
+
.css('margin-left', '5px')
|
|
323
|
+
.attr({
|
|
324
|
+
value: 'Stop'
|
|
325
|
+
})
|
|
326
|
+
.prop({
|
|
327
|
+
disabled: true
|
|
328
|
+
})
|
|
329
|
+
.on('click', $.proxy(function () {
|
|
330
|
+
this.stop();
|
|
331
|
+
}, this));
|
|
332
|
+
|
|
333
|
+
// Hide QUnit `Running...`
|
|
334
|
+
$('#qunit-testresult').html('');
|
|
335
|
+
|
|
336
|
+
this._refreshProgress();
|
|
337
|
+
|
|
338
|
+
fCallback();
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
|
|
342
|
+
_renderTestButtons: function(testNumber) {
|
|
343
|
+
var li = $('#qunit-test-output' + testNumber);
|
|
344
|
+
|
|
345
|
+
var container = $('<div class="actions" />')
|
|
346
|
+
.insertAfter(li.find('strong'));
|
|
347
|
+
|
|
348
|
+
// Fix reload page
|
|
349
|
+
li.find('a:contains(Rerun)')
|
|
350
|
+
.appendTo(container)
|
|
351
|
+
.on('click', function() {
|
|
352
|
+
// Force reload
|
|
353
|
+
setTimeout(function() {
|
|
354
|
+
location.reload();
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
hljs.configure({
|
|
359
|
+
useBR: true
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
$('<a href="javascript:void(0)" />')
|
|
363
|
+
.appendTo(container)
|
|
364
|
+
.text('Show code')
|
|
365
|
+
.on('click', $.proxy(function() {
|
|
366
|
+
var code = this.testInstances[testNumber].callback.toString() + '\n';
|
|
367
|
+
|
|
368
|
+
// Append helper methods from tests namespace
|
|
369
|
+
var sNamespace = this.config.TestsHelperMethodsNamespace;
|
|
370
|
+
if (sNamespace) {
|
|
371
|
+
var oRegExp = new RegExp('(' + sNamespace.replace(/\./, '\\.') + '\\.[^(]+)\\(');
|
|
372
|
+
var oMethods = {};
|
|
373
|
+
|
|
374
|
+
function findHelperMethods(sSource) {
|
|
375
|
+
var i = 0;
|
|
376
|
+
var oMatch = null;
|
|
377
|
+
|
|
378
|
+
while (true) {
|
|
379
|
+
oMatch = oRegExp.exec(sSource.substr(i))
|
|
380
|
+
if (!oMatch || oMatch.index < i) {
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
i = oMatch.index + 1;
|
|
384
|
+
|
|
385
|
+
if (!oMethods[oMatch[1]]) {
|
|
386
|
+
oMethods[oMatch[1]] = ITHit.Namespace(oMatch[1]).toString();
|
|
387
|
+
findHelperMethods(oMethods[oMatch[1]]);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
findHelperMethods(code);
|
|
392
|
+
|
|
393
|
+
for (var sName in oMethods) {
|
|
394
|
+
if (oMethods.hasOwnProperty(sName)) {
|
|
395
|
+
code += '\n' + oMethods[sName].replace(/\n( |\t)/g, '\n').replace(/(^function )/, '$1' + sName);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// Remove namespace
|
|
400
|
+
for (var sName2 in oMethods) {
|
|
401
|
+
if (oMethods.hasOwnProperty(sName2)) {
|
|
402
|
+
var aParts = sName2.split('.');
|
|
403
|
+
aParts.pop();
|
|
404
|
+
|
|
405
|
+
code = code.replace(new RegExp(aParts.join('\\.') + '\\.', 'g'), '');
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
if (!ITHit.DetectBrowser.IE || ITHit.DetectBrowser.IE > 9) {
|
|
411
|
+
code = hljs.highlight('javascript', code).value;
|
|
412
|
+
} else {
|
|
413
|
+
code = code.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
this._showPopup('<pre>' + code + '</pre>');
|
|
417
|
+
}, this));
|
|
418
|
+
|
|
419
|
+
$('<a href="javascript:void(0)" />')
|
|
420
|
+
.appendTo(container)
|
|
421
|
+
.text('Show logs')
|
|
422
|
+
.on('click', $.proxy(function() {
|
|
423
|
+
var code = this.testRequestsLog[testNumber].join('\n');
|
|
424
|
+
if (!ITHit.DetectBrowser.IE || ITHit.DetectBrowser.IE > 9) {
|
|
425
|
+
code = hljs.highlight('xml', code).value;
|
|
426
|
+
} else {
|
|
427
|
+
code = code.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
this._showPopup('<pre>' + code + '</pre>');
|
|
431
|
+
}, this));
|
|
432
|
+
},
|
|
433
|
+
|
|
434
|
+
_refreshProgress: function() {
|
|
435
|
+
var elBanner = $('#qunit-banner');
|
|
436
|
+
var elProgressText = $('#qunit-header').find('.ITHitTests-progress-text');
|
|
437
|
+
|
|
438
|
+
// Lazy render
|
|
439
|
+
if (elProgressText.length === 0) {
|
|
440
|
+
elProgressText = $('<span />')
|
|
441
|
+
.appendTo('#qunit-header')
|
|
442
|
+
.addClass('ITHitTests-progress-text');
|
|
443
|
+
|
|
444
|
+
elBanner.addClass('qunit-pass');
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
var totalCount = QUnit.config.testNumber.length > 0 ? QUnit.config.testNumber.length : QUnitRunner.tests.length;
|
|
448
|
+
var currentCount = this.isDone ? totalCount : (QUnit.config.current ? QUnit.config.current.testNumber - 1 : 0);
|
|
449
|
+
elProgressText.text('(' + currentCount + '/' + totalCount + ')');
|
|
450
|
+
|
|
451
|
+
elBanner.css('width', Math.round(100 * currentCount / totalCount) + '%');
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
_showPopup: function(html) {
|
|
455
|
+
var dialog = $('<div />')
|
|
456
|
+
.appendTo('body')
|
|
457
|
+
.addClass('ITHitTests-popup');
|
|
458
|
+
|
|
459
|
+
// Content
|
|
460
|
+
$('<div>')
|
|
461
|
+
.appendTo(dialog)
|
|
462
|
+
.addClass('ITHitTests-popup-content')
|
|
463
|
+
.html(html);
|
|
464
|
+
|
|
465
|
+
// Close button
|
|
466
|
+
$('<a href="javascript:void(0)" />')
|
|
467
|
+
.appendTo(dialog)
|
|
468
|
+
.addClass('ITHitTests-popup-closeButton')
|
|
469
|
+
.text('x')
|
|
470
|
+
.on('click', function() {
|
|
471
|
+
dialog.remove();
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
// Close on esc
|
|
475
|
+
$(document).one('keyup', function(e) {
|
|
476
|
+
if (e.keyCode == 27) {
|
|
477
|
+
dialog.remove();
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
return dialog;
|
|
482
|
+
},
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
*
|
|
486
|
+
* @private
|
|
487
|
+
*/
|
|
488
|
+
_initUrl: function() {
|
|
489
|
+
if (this.config.Url) {
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
var url = '';
|
|
494
|
+
if (!url && QUnitRunner.getHash('url')) {
|
|
495
|
+
url = QUnitRunner.getHash('url');
|
|
496
|
+
}
|
|
497
|
+
if (!url && window.opener && window.opener.location) {
|
|
498
|
+
url = window.opener.location.href.replace(/[^/]*(\?[^?]+)?(#[^#]+)?$/, '');
|
|
499
|
+
}
|
|
500
|
+
if (!url) {
|
|
501
|
+
url = location.href.replace(/[^/]*(\?[^?]+)?(#[^#]+)?$/, '');
|
|
502
|
+
}
|
|
503
|
+
this.setUrl(url);
|
|
504
|
+
},
|
|
505
|
+
|
|
506
|
+
_subscribeOnRequests: function() {
|
|
507
|
+
var that = this;
|
|
508
|
+
|
|
509
|
+
webDavSession.AddListener('OnBeforeRequestSend', function(oEvent) {
|
|
510
|
+
var log = '';
|
|
511
|
+
|
|
512
|
+
var oDateNow = new Date();
|
|
513
|
+
log += '----------------- Started: ' + oDateNow.toUTCString() + ' [' + oDateNow.getTime() + '] -----------------\n';
|
|
514
|
+
|
|
515
|
+
// Show request info
|
|
516
|
+
log += oEvent.Method + ' ' + oEvent.Href + '\n';
|
|
517
|
+
for (var sKey in oEvent.Headers) {
|
|
518
|
+
if (oEvent.Headers.hasOwnProperty(sKey)) {
|
|
519
|
+
log += sKey + ': ' + oEvent.Headers[sKey] + '\n';
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// Show request body
|
|
524
|
+
log += oEvent.Body + '\n';
|
|
525
|
+
|
|
526
|
+
var testNumber = QUnit.config.current && QUnit.config.current.testNumber;
|
|
527
|
+
if (testNumber) {
|
|
528
|
+
that.testRequestsLog[testNumber].push(log);
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
webDavSession.AddListener('OnResponse', function(oEvent) {
|
|
533
|
+
var log = '';
|
|
534
|
+
|
|
535
|
+
// Show HTTP status and description
|
|
536
|
+
log += oEvent.Status + ' ' + oEvent.StatusDescription + '\n';
|
|
537
|
+
|
|
538
|
+
// Show headers
|
|
539
|
+
for (var sKey in oEvent.Headers) {
|
|
540
|
+
if (oEvent.Headers.hasOwnProperty(sKey)) {
|
|
541
|
+
log += sKey + ': ' + oEvent.Headers[sKey] + '\n';
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// Show response body
|
|
546
|
+
log += oEvent.BodyText + '\n';
|
|
547
|
+
|
|
548
|
+
var oDateNow = new Date();
|
|
549
|
+
log += '----------------- Finished: ' + oDateNow.toUTCString() + ' [' + oDateNow.getTime() + '] -----------------\n';
|
|
550
|
+
|
|
551
|
+
var testNumber = QUnit.config.current && QUnit.config.current.testNumber;
|
|
552
|
+
if (testNumber) {
|
|
553
|
+
that.testRequestsLog[testNumber].push(log);
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
// }, 10);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('Locks.CheckSupport');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.Locks.CheckSupport
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.Locks.CheckSupport', null, {}, /** @lends ITHit.WebDAV.Client.Tests.Locks.CheckSupport */{
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {ITHit.WebDAV.Client.WebDavSession} [webDavSession=new ITHit.WebDAV.Client.WebDavSession()]
|
|
14
|
+
* @param {string} [sFileAbsolutePath='http://localhost:87654/myfile.txt']
|
|
15
|
+
* @param {function} [fCallback=function() {}]
|
|
16
|
+
*/
|
|
17
|
+
CheckLockSupport: function(webDavSession, sFileAbsolutePath, fCallback) {
|
|
18
|
+
webDavSession.OpenFileAsync(sFileAbsolutePath, null, function(oAsyncResult) {
|
|
19
|
+
|
|
20
|
+
/** @typedef {ITHit.WebDAV.Client.File} oFile */
|
|
21
|
+
var oFile = oAsyncResult.Result;
|
|
22
|
+
|
|
23
|
+
if (oFile.SupportedLocks.length === 0) {
|
|
24
|
+
console.log('Locks are not supported.');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
for (var i = 0, l = oFile.SupportedLocks.length; i < l; i++) {
|
|
28
|
+
if (oFile.SupportedLocks[i] === ITHit.WebDAV.Client.LockScope.Exclusive) {
|
|
29
|
+
console.log('Item supports exclusive locks.');
|
|
30
|
+
}
|
|
31
|
+
if (oFile.SupportedLocks[i] === ITHit.WebDAV.Client.LockScope.Shared) {
|
|
32
|
+
console.log('Item supports shared locks.');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
fCallback(oAsyncResult);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
QUnitRunner.test('Check locks types support', function (test) {
|
|
43
|
+
QUnit.stop();
|
|
44
|
+
Helper.Create([
|
|
45
|
+
'Locks/myfile.txt'
|
|
46
|
+
], function() {
|
|
47
|
+
QUnit.start();
|
|
48
|
+
|
|
49
|
+
QUnit.stop();
|
|
50
|
+
ITHit.WebDAV.Client.Tests.Locks.CheckSupport.CheckLockSupport(webDavSession, Helper.GetAbsolutePath('Locks/myfile.txt'), function(oAsyncResult) {
|
|
51
|
+
QUnit.start();
|
|
52
|
+
|
|
53
|
+
/** @typedef {ITHit.WebDAV.Client.File} oFile */
|
|
54
|
+
var oFile = oAsyncResult.Result;
|
|
55
|
+
|
|
56
|
+
if (oFile.SupportedLocks.length === 0) {
|
|
57
|
+
ITHitTests.skip(test, 'Server does not support locks.');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of open item request');
|
|
62
|
+
test.strictEqual(oAsyncResult.Result.SupportedLocks[0], ITHit.WebDAV.Client.LockScope.Exclusive, 'Check item is supported Exclusive lock');
|
|
63
|
+
test.strictEqual(oAsyncResult.Result.SupportedLocks[1], ITHit.WebDAV.Client.LockScope.Shared, 'Check item is supported Shared lock');
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('Locks.CopyLock');
|
|
6
|
+
|
|
7
|
+
QUnitRunner.test('Copy locked file', function (test) {
|
|
8
|
+
Helper.Create([
|
|
9
|
+
'Locks/CopyLock/',
|
|
10
|
+
'Locks/CopyLock/copyfile.txt'
|
|
11
|
+
], QUnitRunner.async(function(oRootFolder, oFile) {
|
|
12
|
+
if (oFile.SupportedLocks.length === 0) {
|
|
13
|
+
ITHitTests.skip(test, 'Server does not support locks.');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
oFile.LockAsync(ITHit.WebDAV.Client.LockScope.Shared, false, 'User 1', -1, QUnitRunner.async(function(oAsyncResult) {
|
|
18
|
+
var sLockToken = oAsyncResult.Result.LockToken.LockToken;
|
|
19
|
+
|
|
20
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of lock file');
|
|
21
|
+
|
|
22
|
+
oFile.CopyToAsync(oRootFolder, 'copyfile_2.txt', false, false, sLockToken, QUnitRunner.async(function (oAsyncResult) {
|
|
23
|
+
|
|
24
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of copy file');
|
|
25
|
+
|
|
26
|
+
webDavSession.OpenFileAsync(Helper.GetAbsolutePath('Locks/CopyLock/copyfile_2.txt'), null, QUnitRunner.async(function (oAsyncResult) {
|
|
27
|
+
/** @typedef {ITHit.WebDAV.Client.File} oNewFile */
|
|
28
|
+
var oNewFile = oAsyncResult.Result;
|
|
29
|
+
|
|
30
|
+
test.strictEqual(oNewFile.ActiveLocks.length, 0, 'Verify that locks did not copy');
|
|
31
|
+
|
|
32
|
+
}));
|
|
33
|
+
}));
|
|
34
|
+
}));
|
|
35
|
+
}));
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
QUnitRunner.test('Copy locked folder', function (test) {
|
|
39
|
+
Helper.Create([
|
|
40
|
+
'Locks/CopyLock/',
|
|
41
|
+
'Locks/CopyLock/copyfolder/'
|
|
42
|
+
], QUnitRunner.async(function(oRootFolder, oFolder) {
|
|
43
|
+
if (oFolder.SupportedLocks.length === 0) {
|
|
44
|
+
ITHitTests.skip(test, 'Server does not support locks.');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
oFolder.LockAsync(ITHit.WebDAV.Client.LockScope.Shared, false, 'User 1', -1, QUnitRunner.async(function(oAsyncResult) {
|
|
49
|
+
var sLockToken = oAsyncResult.Result.LockToken.LockToken;
|
|
50
|
+
|
|
51
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of lock folder');
|
|
52
|
+
|
|
53
|
+
oFolder.CopyToAsync(oRootFolder, 'copyfolder_2', false, false, sLockToken, QUnitRunner.async(function (oAsyncResult) {
|
|
54
|
+
|
|
55
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of copy folder');
|
|
56
|
+
|
|
57
|
+
webDavSession.OpenFolderAsync(Helper.GetAbsolutePath('Locks/CopyLock/copyfolder_2/'), null, QUnitRunner.async(function (oAsyncResult) {
|
|
58
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oNewFolder */
|
|
59
|
+
var oNewFolder = oAsyncResult.Result;
|
|
60
|
+
|
|
61
|
+
test.strictEqual(oNewFolder.ActiveLocks.length, 0, 'Verify that locks did not copy');
|
|
62
|
+
|
|
63
|
+
}));
|
|
64
|
+
}));
|
|
65
|
+
}));
|
|
66
|
+
}));
|
|
67
|
+
});
|