From 1cee0d44697221b6827916887d7e989141829372 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 2 Aug 2013 13:21:20 +0200 Subject: [PATCH] create imap-client file structure --- gmail-test-proxy/background.js | 10 ++++++++++ gmail-test-proxy/imap-client-test.js | 13 +++++++++++++ .../{browserify-test.js => imap-client.js} | 0 gmail-test-proxy/manifest.json | 15 +++++++++++++++ src/index.js | 7 +++++++ 5 files changed, 45 insertions(+) create mode 100644 gmail-test-proxy/background.js create mode 100644 gmail-test-proxy/imap-client-test.js rename gmail-test-proxy/{browserify-test.js => imap-client.js} (100%) create mode 100644 gmail-test-proxy/manifest.json diff --git a/gmail-test-proxy/background.js b/gmail-test-proxy/background.js new file mode 100644 index 0000000..99992dc --- /dev/null +++ b/gmail-test-proxy/background.js @@ -0,0 +1,10 @@ +'use strict'; + +chrome.app.runtime.onLaunched.addListener(function() { + chrome.app.window.create('foo.html', { + 'bounds': { + 'width': 1024, + 'height': 650 + } + }); +}); \ No newline at end of file diff --git a/gmail-test-proxy/imap-client-test.js b/gmail-test-proxy/imap-client-test.js new file mode 100644 index 0000000..d597885 --- /dev/null +++ b/gmail-test-proxy/imap-client-test.js @@ -0,0 +1,13 @@ +var assert = require('assert'), + inbox = require("inbox"); + +describe('IMAP client', function() { + + describe("Init", function() { + + it('should work', function(done) { + + }); + }); + +}); \ No newline at end of file diff --git a/gmail-test-proxy/browserify-test.js b/gmail-test-proxy/imap-client.js similarity index 100% rename from gmail-test-proxy/browserify-test.js rename to gmail-test-proxy/imap-client.js diff --git a/gmail-test-proxy/manifest.json b/gmail-test-proxy/manifest.json new file mode 100644 index 0000000..e3d0568 --- /dev/null +++ b/gmail-test-proxy/manifest.json @@ -0,0 +1,15 @@ +{ + "name": "IMAP Test", + "description": "Testing chrome.socket for IMAP", + "version": "0.0.1", + "manifest_version": 2, + "offline_enabled": true, + "permissions": [{ + "socket": ["tcp-connect"] + }], + "app": { + "background": { + "scripts": ["background.js"] + } + } +} \ No newline at end of file diff --git a/src/index.js b/src/index.js index 5a0f473..3fbe653 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,13 @@ require(['jquery', 'js/app-controller', 'js/app-config'], function($, controller, app) { 'use strict'; + chrome.identity.getAuthToken({ + 'interactive': true + }, function(token) { + console.log(token); + // Use the token. + }); + /** * Load templates and start the application */