-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: janusweb
action: commit
revision:
path_from:
revision_from: 937a6ff6a48fba5f1efed5b81c96946563200da9:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit 937a6ff6a48fba5f1efed5b81c96946563200da9
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Mon Aug 15 04:44:11 2016 -0700

    Added scripting test

diff --git a/tests/scripting.test.js b/tests/scripting.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..0c5084fc41096d51c0907fa0c0a1579c796d7984
--- /dev/null
+++ b/tests/scripting.test.js
@@ -0,0 +1,43 @@
+console.log('hurgh');
+describe("JanusWeb Scripting", function() {
+  jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
+  var client, janusweb, canvas;
+  var resolution = '800x600';
+  var browser = 'chrome'; // FIXME - don't hardcode this
+
+  beforeEach(function(done) {
+    jasmine.addMatchers(imagediff.jasmine);
+    done();
+  });
+
+  it("should initialize client", function(done) {
+    try {
+      elation.janusweb.init({homepage: 'http://www.janusvr.com/index.html', resolution: resolution}).then(function(newclient) {
+        client = newclient;
+        janusweb = client.janusweb;
+        expect(client).toBeDefined();
+        expect(janusweb).toBeDefined();
+        done();
+      });
+    } catch (e) {
+      console.log('exception happened!', e.stack);
+    }
+  });
+
+  it("added canvas to document", function(done) {
+    var canvases = document.getElementsByTagName('canvas');
+    expect(canvases.length).toEqual(1);
+    canvas = canvases[0];
+    done();
+  });
+
+  it("should have a global janus object", function(done) {
+    expect(window.janus).toBeDefined();
+    done();
+  });
+  it("should return a URL for janus.currenturl()", function(done) {
+    expect(window.janus.currenturl).toBeDefined();
+    expect(window.janus.currenturl()).toBeDefined();
+    done();
+  });
+});

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 16:29:06 2024