PHP Classes

File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/tinymce/util/XHR.js

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/tinymce/util/XHR.js   Download  
File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/tinymce/util/XHR.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 7 years ago
Size: 866 bytes
 

Contents

Class file image Download
if (location.protocol != "file:") { module("tinymce.util.XHR"); asyncTest("Successful request", function() { expect(5); tinymce.util.XHR.on('beforeSend', function(e) { e.xhr.test = 123; e.settings.test = 456; }); tinymce.util.XHR.send({ url: 'tinymce/util/json_rpc_ok.js', success: function(data, xhr, input) { equal(tinymce.trim(data), '{"result": "Hello JSON-RPC", "error": null, "id": 1}'); ok(!!xhr.status); equal(input.url, 'tinymce/util/json_rpc_ok.js'); equal(xhr.test, 123); equal(input.test, 456); start(); } }); }); asyncTest("Unsuccessful request", function() { expect(3); tinymce.util.XHR.send({ url: 'tinymce/util/404.js', error: function(type, xhr, input) { equal(type, 'GENERAL'); ok(!!xhr.status); equal(input.url, 'tinymce/util/404.js'); start(); } }); }); }