Navigation Menu

Skip to content

Commit

Permalink
fix some typo, add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
waka committed Feb 7, 2013
1 parent 17202e9 commit d5d5395
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
/node_modules
deps.js

.DS_Store
*~
2 changes: 2 additions & 0 deletions .npmignore
@@ -1,6 +1,8 @@
node_modules
npm-debug.log

deps.js

.git
.gitignore

Expand Down
2 changes: 1 addition & 1 deletion bin/closure-library-phantomjs
Expand Up @@ -170,7 +170,7 @@ phantomjs.stdout.on('data', function(data) {
// Oops
phantomjs.on('exit', function(code) {
if (code === 127) {
util.print("Perhaps phantomjs is not installed?\n");
util.print('Perhaps phantomjs is not installed?\n');
}
process.exit(code);
})
5 changes: 3 additions & 2 deletions lib/adapter.js
Expand Up @@ -42,7 +42,7 @@
global.goog.testing.TestCase.prototype.runTests = function() {
var data = {
name: this.name_,
num: this.getCount(),
num: this.getCount()
};
sendToPhantomJS('head', data);

Expand Down Expand Up @@ -163,7 +163,8 @@
*
* @override
*/
goog.testing.MultiTestRunner.TestFrame.prototype.onIframeLoaded_ = function(e) {
goog.testing.MultiTestRunner.TestFrame.prototype.onIframeLoaded_ =
function(e) {
this.iframeLoaded_ = true;

var js = goog.dom.getFrameContentWindow(this.iframeEl_);
Expand Down
6 changes: 3 additions & 3 deletions lib/closure-library-phantomjs.js
Expand Up @@ -50,12 +50,12 @@ function exitOnError(msg, trace) {
/**
* Wait timeout.
*
* @param {number=} opt_timeout
* @param {number=} opt_timeout .
* @return {number} .
*/
function waitTimeout(opt_timeout) {
// Default max timeout is 600s
var timeout = opt_timeout || DEFAULT_TIMEOUT;;
var timeout = opt_timeout || DEFAULT_TIMEOUT;

var timer = setTimeout(function() {
console.log('PHANTOM_JS: Timeout');
Expand Down Expand Up @@ -179,7 +179,7 @@ page.open(testPath, function(status) {
if (status === 'success') {
waitTimer = waitTimeout(config.timeout);
} else {
console.log("phantomjs: Unable to load page. [" + testPath + ']');
console.log('phantomjs: Unable to load page. [' + testPath + ']');
phantom.exit(1);
}
});
23 changes: 15 additions & 8 deletions lib/reporters.js
Expand Up @@ -9,7 +9,7 @@
*/

var fs = require('fs');
var os = require('system').os;
var system = require('system');


/**
Expand All @@ -29,9 +29,9 @@ var Colors = {
* Symbols of console.
*/
var Symbols = {
OK: (os.name === 'windows') ? '\u221A' : '✓',
NG: (os.name === 'windows') ? '\u00D7' : '✖',
DOT: '.',
OK: (system.os.name === 'windows') ? '\u221A' : '✓',
NG: (system.os.name === 'windows') ? '\u00D7' : '✖',
DOT: '.'
};


Expand Down Expand Up @@ -63,7 +63,7 @@ function gray(str) {
/**
* @interface
*/
function IReporter() {};
function IReporter() {}

/**
* @param {Object} testcase .
Expand Down Expand Up @@ -95,12 +95,15 @@ function DotReporter() {
errors: []
};
console.log('');

// TODO after 1.9 released, use system module
fs.write('/dev/stdout', ' ', 'w');
//system.stdout.write(' ');
}

/**
* @type {Object}
* @private/
* @private
*/
DotReporter.prototype.stats_;

Expand All @@ -119,9 +122,13 @@ DotReporter.prototype.writeResult = function(result) {
result.error && this.stats_.errors.push(result.error);

if (result.success) {
// TODO after 1.9 released, use system module
fs.write('/dev/stdout', gray(Symbols.DOT), 'w');
//system.stdout.write(gray(Symbols.DOT));
} else {
// TODO after 1.9 released, use system module
fs.write('/dev/stdout', red(Symbols.DOT), 'w');
//system.stdout.write(red(Symbols.DOT));
}
};

Expand Down Expand Up @@ -180,7 +187,7 @@ function SpecReporter() {

/**
* @type {Object}
* @private/
* @private
*/
SpecReporter.prototype.stats_;

Expand Down Expand Up @@ -265,7 +272,7 @@ function TapReporter() {

/**
* @type {Object}
* @private/
* @private
*/
TapReporter.prototype.stats_;

Expand Down

0 comments on commit d5d5395

Please sign in to comment.