Added Chrome App Tests

Added Chrome app tests file and amended Readme.
This commit is contained in:
Adam Lay
2013-09-30 23:46:02 +01:00
parent 60a1057fbf
commit 229b4c5211
2 changed files with 28 additions and 0 deletions
+1
View File
@@ -44,6 +44,7 @@ List of Definitions
* [Cheerio](https://github.com/MatthewMueller/cheerio) (by [Bret Little](https://github.com/blittle))
* [Chosen](http://harvesthq.github.com/chosen/) (by [Boris Yankov](https://github.com/borisyankov))
* [Chrome](http://developer.chrome.com/extensions/) (by [Matthew Kimber](https://github.com/matthewkimber))
* [Chrome App](http://developer.chrome.com/apps/) (by [Adam Lay](https://github.com/AdamLay))
* [CodeMirror](http://codemirror.net) (by [François de Campredon](https://github.com/fdecampredon))
* [Commander](http://github.com/visionmedia/commander.js) (by [Marcelo Dezem](https://github.com/mdezem))
* [d3.js](http://d3js.org/) (from TypeScript samples)
+27
View File
@@ -0,0 +1,27 @@
/// <reference path="chrome-app.d.ts" />
import runtime = chrome.app.runtime;
import cwindow = chrome.app.window;
var createOptions: cwindow.CreateOptions = {
id: "My Window",
bounds: {
left: 0,
top: 0,
width: 640,
height: 480
},
resizable: true
};
//Create new window on app launch
chrome.app.runtime.onLaunched.addListener(function (launchData: runtime.LaunchData) {
chrome.app.window.create('app/url', createOptions, function (created_window: cwindow.AppWindow) {
return;
});
});
chrome.app.runtime.onRestarted.addListener(function () { return; });
// Get Current Window
var currentWindow: cwindow.AppWindow = chrome.app.window.current();