ce2dcccf86
- Modified the original tests so TinyMCE can be loaded from /src/wp-includes/js/tinymce. - Added "WP" option to the UI to select only tests relevant to our integration (excludes most of the default plugins tests). - Added tests for obsolete HTML elements and attributes (html4 back-compat). See #27014. git-svn-id: https://develop.svn.wordpress.org/trunk@27155 602fd350-edb4-49c9-b593-d223f7449a82
51 lines
1.5 KiB
HTML
51 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Basic editor functionality tests</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css" type="text/css" />
|
|
<script src="http://code.jquery.com/qunit/qunit-git.js"></script>
|
|
<script src="../js/qunit/reporter.js"></script>
|
|
<script src="../js/utils.js"></script>
|
|
<script src="../js/tinymce_loader.js"></script>
|
|
<script>
|
|
QUnit.config.reorder = false;
|
|
QUnit.config.autostart = false;
|
|
|
|
test('PluginDependencyIsLoaded', function() {
|
|
expect(2);
|
|
var pluginManager = tinymce.PluginManager;
|
|
var depPlugin = pluginManager.get("example_dependency");
|
|
ok(depPlugin, "Example Dependent plugin should have loaded");
|
|
var examplePlugin = pluginManager.get("example");
|
|
ok(examplePlugin, "Example plugin should have loaded via dependencies");
|
|
});
|
|
|
|
tinymce.init({
|
|
mode : "exact",
|
|
elements : "elm1",
|
|
add_unload_trigger : false,
|
|
plugins: "example_dependency",
|
|
init_instance_callback : function(ed) {
|
|
editor = ed;
|
|
QUnit.start();
|
|
}
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1 id="qunit-header">Plugin Dependency Functional tests</h1>
|
|
<h2 id="qunit-banner"></h2>
|
|
<div id="qunit-testrunner-toolbar"></div>
|
|
<h2 id="qunit-userAgent"></h2>
|
|
<ol id="qunit-tests"></ol>
|
|
<div id="content">
|
|
<textarea id="elm1" name="elm1"></textarea>
|
|
<div>
|
|
<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent({format : 'raw'}));">[getRawContents]</a>
|
|
<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent());">[getContents]</a>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|