aboutsummaryrefslogtreecommitdiff
path: root/contexts/data/lib/closure-library/closure/goog/labs/observe/observer_test.html
diff options
context:
space:
mode:
Diffstat (limited to 'contexts/data/lib/closure-library/closure/goog/labs/observe/observer_test.html')
-rw-r--r--contexts/data/lib/closure-library/closure/goog/labs/observe/observer_test.html65
1 files changed, 0 insertions, 65 deletions
diff --git a/contexts/data/lib/closure-library/closure/goog/labs/observe/observer_test.html b/contexts/data/lib/closure-library/closure/goog/labs/observe/observer_test.html
deleted file mode 100644
index 3b3e5d2..0000000
--- a/contexts/data/lib/closure-library/closure/goog/labs/observe/observer_test.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!--
-Copyright 2012 The Closure Library Authors. All Rights Reserved.
-
-Use of this source code is governed by the Apache License, Version 2.0.
-See the COPYING file for details.
--->
-<!--
--->
-<head>
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<title>Closure Unit Tests - goog.labs.observe.Observer</title>
-<script src="../../base.js"></script>
-<script>
- goog.require('goog.labs.observe.Notice');
- goog.require('goog.labs.observe.Observer');
- goog.require('goog.testing.jsunit');
- goog.require('goog.testing.recordFunction');
-</script>
-</head>
-<body>
-<script>
-var TYPE = 'testtype';
-
-
-function testToObserver() {
- var expectedScope = this;
- var notice = new goog.labs.observe.Notice(null, TYPE);
- var fn = goog.testing.recordFunction(function(n) {
- assertEquals('Function receives wrong notice object.', notice, n);
- assertEquals('Function is executed with wrong scope.', expectedScope, this);
- });
- var observer = goog.labs.observe.Observer.fromFunction(fn);
- observer.notify(notice);
- assertEquals(1, fn.getCallCount());
-}
-
-
-function testToObserverWithScope() {
- var expectedScope = {};
- var notice = new goog.labs.observe.Notice(null, TYPE);
- var fn = goog.testing.recordFunction(function(n) {
- assertEquals('Function receives wrong notice object.', notice, n);
- assertEquals('Function is executed with wrong scope.', expectedScope, this);
- });
- var observer = goog.labs.observe.Observer.fromFunction(fn, expectedScope);
- observer.notify(notice);
- assertEquals(1, fn.getCallCount());
-}
-
-
-function testToObserverEquals() {
- var fn = function() {};
- assertTrue(
- goog.labs.observe.Observer.fromFunction(fn).equals(
- goog.labs.observe.Observer.fromFunction(fn)));
-
- var scope = {};
- assertTrue(
- goog.labs.observe.Observer.fromFunction(fn, scope).equals(
- goog.labs.observe.Observer.fromFunction(fn, scope)));
-}
-</script>
-</body>