PHP Classes

File: public/js/tinymce/src/themes/mobile/src/test/js/phantom/features/FeatureDetectTest.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/themes/mobile/src/test/js/phantom/features/FeatureDetectTest.js   Download  
File: public/js/tinymce/src/themes/mobile/src/test/js/phantom/features/FeatureDetectTest.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 1,116 bytes
 

Contents

Class file image Download
test( 'features.FeatureDetectTest', [ 'ephox.agar.api.Assertions', 'ephox.katamari.api.Fun', 'tinymce.themes.mobile.features.Features' ], function (Assertions, Fun, Features) { /* * Check that if the feature is not known, it skips over it * */ var testFeature = function (name, supported) { return { isSupported: Fun.constant(supported), sketch: Fun.constant(name) }; }; var features = { alpha: testFeature('alpha', true), beta: testFeature('beta', false), gamma: testFeature('gamma', true), delta: testFeature('delta', true) }; var check = function (label, expected, toolbar) { var actual = Features.detect({ toolbar: toolbar }, features); Assertions.assertEq(label, expected, actual); }; check('Empty toolbar', [ ], ''); check('Toolbar with everything', [ 'alpha', 'gamma', 'delta' ], [ 'alpha', 'beta', 'gamma', 'delta', 'epsilon' ]); check('Toolbar with everything', [ 'alpha', 'gamma', 'delta' ], [ 'alpha', 'beta', 'alpha', 'gamma', 'delta', 'epsilon' ]); } );