Sha256: b52a4c25253f1307f47fd8f24598a8b441e83b662979e58136a695479ad53662

Contents?: true

Size: 941 Bytes

Versions: 11

Compression:

Stored size: 941 Bytes

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// License:   Licensed under MIT license (see license.js)
// ==========================================================================
/*global module, test, htmlbody*/

module("SC.Cursor", {
  setup: function () {
    htmlbody('<style title="wrong-style"></style>');
  },

  teardown: function () {
    clearHtmlbody();
  }
});

/**
  There was a bug that if any additional style elements exist in the body
  the cursor would create a stylesheet in the head, but then retrieve the
  last stylesheet object which would be wrong.
*/
test("The cursor's stylesheet object should be the right object.", function () {
  var actual = SC.Cursor.sharedStyleSheet(),
    wrong;

  wrong = document.styleSheets[document.styleSheets.length - 1];
  ok(actual !== wrong, "The last stylesheet is not correct.");
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.11.0.rc3 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.11.0.rc2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.11.0.rc1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.10.3.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.10.2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.10.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.10.0 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.10.0.rc.3 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/cursor.js