aboutsummaryrefslogtreecommitdiff
path: root/tools/addon-sdk-1.3/packages/addon-kit/tests/test-clipboard.js
diff options
context:
space:
mode:
authorGravatar Rogan Creswick <creswick@galois.com>2012-03-31 08:08:11 -0700
committerGravatar Rogan Creswick <creswick@galois.com>2012-03-31 08:08:11 -0700
commitec532e93339a942a395829ec87f427852cd72e00 (patch)
treef6ad13ca7f90f26fda9bc23e428ee367f153e3d2 /tools/addon-sdk-1.3/packages/addon-kit/tests/test-clipboard.js
parent780bf48de85215f5b0b6fde0df40599ac6f9c037 (diff)
removed older addon-sdks from tools
Diffstat (limited to 'tools/addon-sdk-1.3/packages/addon-kit/tests/test-clipboard.js')
-rw-r--r--tools/addon-sdk-1.3/packages/addon-kit/tests/test-clipboard.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/tools/addon-sdk-1.3/packages/addon-kit/tests/test-clipboard.js b/tools/addon-sdk-1.3/packages/addon-kit/tests/test-clipboard.js
deleted file mode 100644
index 5f61d48..0000000
--- a/tools/addon-sdk-1.3/packages/addon-kit/tests/test-clipboard.js
+++ /dev/null
@@ -1,60 +0,0 @@
-
-// Test the typical use case, setting & getting with no flavors specified
-exports.testWithNoFlavor = function(test) {
- var contents = "hello there";
- var flavor = "text";
- var fullFlavor = "text/unicode";
- var clip = require("clipboard");
- // Confirm we set the clipboard
- test.assert(clip.set(contents));
- // Confirm flavor is set
- test.assertEqual(clip.currentFlavors[0], flavor);
- // Confirm we set the clipboard
- test.assertEqual(clip.get(), contents);
- // Confirm we can get the clipboard using the flavor
- test.assertEqual(clip.get(flavor), contents);
- // Confirm we can still get the clipboard using the full flavor
- test.assertEqual(clip.get(fullFlavor), contents);
-};
-
-// Test the slightly less common case where we specify the flavor
-exports.testWithFlavor = function(test) {
- var contents = "<b>hello there</b>";
- var contentsText = "hello there";
- var flavor = "html";
- var fullFlavor = "text/html";
- var unicodeFlavor = "text";
- var unicodeFullFlavor = "text/unicode";
- var clip = require("clipboard");
- test.assert(clip.set(contents, flavor));
- test.assertEqual(clip.currentFlavors[0], unicodeFlavor);
- test.assertEqual(clip.currentFlavors[1], flavor);
- test.assertEqual(clip.get(), contentsText);
- test.assertEqual(clip.get(flavor), contents);
- test.assertEqual(clip.get(fullFlavor), contents);
- test.assertEqual(clip.get(unicodeFlavor), contentsText);
- test.assertEqual(clip.get(unicodeFullFlavor), contentsText);
-};
-
-// Test that the typical case still works when we specify the flavor to set
-exports.testWithRedundantFlavor = function(test) {
- var contents = "<b>hello there</b>";
- var flavor = "text";
- var fullFlavor = "text/unicode";
- var clip = require("clipboard");
- test.assert(clip.set(contents, flavor));
- test.assertEqual(clip.currentFlavors[0], flavor);
- test.assertEqual(clip.get(), contents);
- test.assertEqual(clip.get(flavor), contents);
- test.assertEqual(clip.get(fullFlavor), contents);
-};
-
-exports.testNotInFlavor = function(test) {
- var contents = "hello there";
- var flavor = "html";
- var clip = require("clipboard");
- test.assert(clip.set(contents));
- // If there's nothing on the clipboard with this flavor, should return null
- test.assertEqual(clip.get(flavor), null);
-};
-// TODO: Test error cases.