Index: LayoutTests/perf/document-contains.html |
diff --git a/LayoutTests/perf/document-contains.html b/LayoutTests/perf/document-contains.html |
deleted file mode 100644 |
index 25809b0cf6e7c8c1d18eff19260a6f774d62a739..0000000000000000000000000000000000000000 |
--- a/LayoutTests/perf/document-contains.html |
+++ /dev/null |
@@ -1,62 +0,0 @@ |
-<!DOCTYPE html> |
-<script src="../resources/magnitude-perf.js"></script> |
-<body> |
-<script> |
- |
-var doc, node, expected; |
- |
-function appendDeepTree(magnitude) |
-{ |
- for (var i = 0; i < magnitude; i++) { |
- node = node.appendChild(doc.createElement('div')); |
- } |
-} |
- |
- |
-// Tests that contains is O(1) for document where the test |node| is in the document. |
- |
-function setup1(magnitude) |
-{ |
- node = document.body; |
- doc = document; |
- expected = true; |
- appendDeepTree(magnitude); |
-} |
- |
-// Tests that contains is O(1) for document when the test |node| is not in the document. |
- |
-function setup2(magnitude) |
-{ |
- node = document.createElement('div'); // Not added to the document |
- doc = document; |
- expected = false; |
- appendDeepTree(magnitude); |
-} |
- |
-// Tests that contains is O(1) for document when the test |node| is in a different document. |
- |
-function setup3(magnitude) |
-{ |
- var iframe = document.body.appendChild(document.createElement('iframe')); |
- doc = iframe.contentDocument; |
- node = doc.body; // Different document. |
- expected = false; |
- appendDeepTree(magnitude); |
-} |
- |
-function test(magnitude) |
-{ |
- var actual = document.contains(node); |
- if (actual !== expected) |
- throw 'Unexpected return value: ' + actual + ', expected: ' + expected; |
-} |
- |
-Magnitude.description('Tests that document.contains is O(1).'); |
-Magnitude.tolerance = 0.50; |
-Magnitude.trim = 2; |
-Magnitude.run(setup1, test, Magnitude.CONSTANT); |
-Magnitude.run(setup2, test, Magnitude.CONSTANT); |
-Magnitude.run(setup3, test, Magnitude.CONSTANT); |
- |
-</script> |
-</body> |