Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Copyright notices and comments

Mike McGann5cb6ff4a4cd8
diff --git a/js/OpenLayers/Tile/Canvas.js b/js/OpenLayers/Tile/Canvas.js
index 39551b5b9..e69cb728c 100644
--- a/js/OpenLayers/Tile/Canvas.js
+++ b/js/OpenLayers/Tile/Canvas.js
@@ -1,7 +1,10 @@
/*
* NASA Worldview
*
- * Copyright (C) 2011 - 2013 United States Government as represented by the
+ * This code was originally developed at NASA/Goddard Space Flight Center for
+ * the Earth Science Data and Information System (ESDIS) project.
+ *
+ * Copyright (C) 2013 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*/
diff --git a/test/OpenLayers/Tile/testCanvas.js b/test/OpenLayers/Tile/testCanvas.js
index b74bf0625..eac0c0359 100644
--- a/test/OpenLayers/Tile/testCanvas.js
+++ b/test/OpenLayers/Tile/testCanvas.js
@@ -1,3 +1,14 @@
+/*
+ * NASA Worldview
+ *
+ * This code was originally developed at NASA/Goddard Space Flight Center for
+ * the Earth Science Data and Information System (ESDIS) project.
+ *
+ * Copyright (C) 2013 United States Government as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ * All Rights Reserved.
+ */
+
TestCase("Test.OpenLayers.Tile.Canvas", {
tile: null,
@@ -9,10 +20,10 @@ TestCase("Test.OpenLayers.Tile.Canvas", {
tile = new OpenLayers.Tile.Canvas(
mockLayer,
- new OpenLayers.Pixel(0, 0),
- new OpenLayers.Bounds(0, 0, 1, 1),
- "url",
- new OpenLayers.Size(512, 512)
+ new OpenLayers.Pixel(0, 0), // screen location
+ new OpenLayers.Bounds(0, 0, 1, 1), // lat/lon bb
+ "http://example.com/wms",
+ new OpenLayers.Size(512, 512) // tile size
);
},
@@ -29,13 +40,19 @@ TestCase("Test.OpenLayers.Tile.Canvas", {
assertEquals("hidden", tile.canvas.style.visibility);
},
- testClearRemovesLoadError: function() {
+ testClearRemovesLoadErrorClass: function() {
tile.canvas = {};
tile.canvas.style = { visibility: "inherit" };
OpenLayers.Element.addClass("olImageLoadError");
tile.clear();
assertFalse(OpenLayers.Element.hasClass("olImageLoadError"));
- }
+ },
+
+ testGetCanvasCreatesCanvas: function() {
+ assertNull(tile.canvas);
+ var canvas = tile.getCanvas();
+ assertNotNull(tile.canvas);
+ },
});
diff --git a/test/harness.js b/test/harness.js
index 0a88df222..14181588d 100644
--- a/test/harness.js
+++ b/test/harness.js
@@ -1,2 +1,17 @@
+/*
+ * NASA Worldview
+ *
+ * This code was originally developed at NASA/Goddard Space Flight Center for
+ * the Earth Science Data and Information System (ESDIS) project.
+ *
+ * Copyright (C) 2013 United States Government as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ * All Rights Reserved.
+ */
+
+/*
+ * Inform JsMockito that JsTestDriver is being used so it will know when
+ * to clean up the mock objects.
+ */
JsHamcrest.Integration.JsTestDriver();
JsMockito.Integration.JsTestDriver();
\ No newline at end of file