feat(strict mode): adding strict mode flag to all js files

the flag must be in all src and test files so that we get the benefit of
running in the strict mode even in jstd

the following script was used to modify all files:

for file in `find src test -name "*.js"`; do
  echo -e "'use strict';\n" > temp.txt
  cat $file >> temp.txt
  mv temp.txt $file
done
This commit is contained in:
Igor Minar 2011-07-17 01:05:43 -07:00
parent b98c23274b
commit fe5240732d
108 changed files with 216 additions and 0 deletions

View file

@ -1,3 +1,5 @@
'use strict';
//////////////////////////////////// ////////////////////////////////////
if (typeof document.getAttribute == $undefined) if (typeof document.getAttribute == $undefined)

View file

@ -1,3 +1,5 @@
'use strict';
var browserSingleton; var browserSingleton;
/** /**
* @workInProgress * @workInProgress

View file

@ -1,3 +1,5 @@
'use strict';
////////////////////////////// //////////////////////////////
// Browser // Browser
////////////////////////////// //////////////////////////////

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Template provides directions an how to bind to a given element. * Template provides directions an how to bind to a given element.
* It contains a list of init functions which need to be called to * It contains a list of init functions which need to be called to

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @ngdoc function * @ngdoc function
* @name angular.injector * @name angular.injector

View file

@ -1,3 +1,5 @@
'use strict';
var array = [].constructor; var array = [].constructor;
/** /**

View file

@ -1,3 +1,5 @@
'use strict';
function Route(template, defaults) { function Route(template, defaults) {

View file

@ -1,3 +1,5 @@
'use strict';
function getter(instance, path, unboundFn) { function getter(instance, path, unboundFn) {
if (!path) return instance; if (!path) return instance;
var element = path.split('.'); var element = path.split('.');

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* The MIT License * The MIT License
* *

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* The MIT License * The MIT License
* *

View file

@ -1,3 +1,5 @@
'use strict';
var angularGlobal = { var angularGlobal = {
'typeOf':function(obj){ 'typeOf':function(obj){
if (obj === null) return $null; if (obj === null) return $null;

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc overview * @ngdoc overview

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc overview * @ngdoc overview

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc overview * @ngdoc overview

View file

@ -1,3 +1,5 @@
'use strict';
////////////////////////////////// //////////////////////////////////
//JQLite //JQLite
////////////////////////////////// //////////////////////////////////

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* JSTestDriver adapter for angular scenario tests * JSTestDriver adapter for angular scenario tests
* *

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc overview * @ngdoc overview

View file

@ -1,3 +1,5 @@
'use strict';
var OPERATORS = { var OPERATORS = {
'null':function(self){return null;}, 'null':function(self){return null;},
'true':function(self){return true;}, 'true':function(self){return true;},

View file

@ -1,3 +1,5 @@
'use strict';
/* /*
* HTML Parser By Misko Hevery (misko@hevery.com) * HTML Parser By Misko Hevery (misko@hevery.com)
* based on: HTML Parser By John Resig (ejohn.org) * based on: HTML Parser By John Resig (ejohn.org)

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Represents the application currently being tested and abstracts usage * Represents the application currently being tested and abstracts usage
* of iframes or separate windows. * of iframes or separate windows.

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* The representation of define blocks. Don't used directly, instead use * The representation of define blocks. Don't used directly, instead use
* define() in your tests. * define() in your tests.

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* A future action in a spec. * A future action in a spec.
* *

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Maintains an object tree from the runner events. * Maintains an object tree from the runner events.
* *

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Runner for scenarios * Runner for scenarios
* *

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Setup file for the Scenario. * Setup file for the Scenario.

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* This class is the "this" of the it/beforeEach/afterEach method. * This class is the "this" of the it/beforeEach/afterEach method.
* Responsibilities: * Responsibilities:

View file

@ -1,3 +1,5 @@
'use strict';
(function(previousOnLoad){ (function(previousOnLoad){
var prefix = (function(){ var prefix = (function(){
var filename = /(.*\/)angular-bootstrap.js(#(.*))?/; var filename = /(.*\/)angular-bootstrap.js(#(.*))?/;

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Shared DSL statements that are useful to all scenarios. * Shared DSL statements that are useful to all scenarios.
*/ */

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Matchers for implementing specs. Follows the Jasmine spec conventions. * Matchers for implementing specs. Follows the Jasmine spec conventions.
*/ */

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* User Interface for the Scenario Runner. * User Interface for the Scenario Runner.
* *

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Generates JSON output into a context. * Generates JSON output into a context.
*/ */

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Creates a global value $result with the result of the runner. * Creates a global value $result with the result of the runner.
*/ */

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Generates XML output into a context. * Generates XML output into a context.
*/ */

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/, var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,
HASH_MATCH = /^([^\?]*)?(\?([^\?]*))?$/, HASH_MATCH = /^([^\?]*)?(\?([^\?]*))?$/,
DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp':21}; DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp':21};

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc service * @ngdoc service

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc overview * @ngdoc overview

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* @workInProgress * @workInProgress
* @ngdoc overview * @ngdoc overview

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular', function(){ describe('angular', function(){
describe('case', function(){ describe('case', function(){
it('should change case', function(){ it('should change case', function(){

View file

@ -1,3 +1,5 @@
'use strict';
describe('api', function(){ describe('api', function(){
describe('HashMap', function(){ describe('HashMap', function(){

View file

@ -1,3 +1,5 @@
'use strict';
describe('Binder', function(){ describe('Binder', function(){
beforeEach(function(){ beforeEach(function(){

View file

@ -1,3 +1,5 @@
'use strict';
describe('browser', function(){ describe('browser', function(){
var browser, fakeWindow, xhr, logs, scripts, removedScripts, setTimeoutQueue; var browser, fakeWindow, xhr, logs, scripts, removedScripts, setTimeoutQueue;

View file

@ -1,3 +1,5 @@
'use strict';
describe('compiler', function(){ describe('compiler', function(){
var compiler, markup, attrMarkup, directives, widgets, compile, log, scope; var compiler, markup, attrMarkup, directives, widgets, compile, log, scope;

View file

@ -1,3 +1,5 @@
'use strict';
describe('filter', function() { describe('filter', function() {
var filter = angular.filter; var filter = angular.filter;

View file

@ -1,3 +1,5 @@
'use strict';
describe("formatter", function(){ describe("formatter", function(){
it('should noop', function(){ it('should noop', function(){
assertEquals("abc", angular.formatter.noop.format("abc")); assertEquals("abc", angular.formatter.noop.format("abc"));

View file

@ -1,3 +1,5 @@
'use strict';
describe('injector', function(){ describe('injector', function(){
var providers; var providers;
var cache; var cache;

View file

@ -1,3 +1,5 @@
'use strict';
describe('json', function(){ describe('json', function(){
it('should serialize primitives', function() { it('should serialize primitives', function() {
expect(toJson(0/0)).toEqual('null'); expect(toJson(0/0)).toEqual('null');

View file

@ -1,3 +1,5 @@
'use strict';
describe('parser', function() { describe('parser', function() {
describe('lexer', function() { describe('lexer', function() {
it('should tokenize a string', function() { it('should tokenize a string', function() {

View file

@ -1,3 +1,5 @@
'use strict';
describe("resource", function() { describe("resource", function() {
var xhr, resource, CreditCard, callback; var xhr, resource, CreditCard, callback;

View file

@ -1,3 +1,5 @@
'use strict';
describe("ScenarioSpec: Compilation", function(){ describe("ScenarioSpec: Compilation", function(){
var scope; var scope;

View file

@ -1,3 +1,5 @@
'use strict';
describe('scope/model', function(){ describe('scope/model', function(){
var temp; var temp;

View file

@ -1,3 +1,5 @@
'use strict';
describe('ValidatorTest', function(){ describe('ValidatorTest', function(){
it('ShouldHaveThisSet', function() { it('ShouldHaveThisSet', function() {

View file

@ -1,3 +1,5 @@
'use strict';
describe('mocks', function(){ describe('mocks', function(){
describe('TzDate', function() { describe('TzDate', function() {

View file

@ -1,3 +1,5 @@
'use strict';
describe("directive", function(){ describe("directive", function(){
var compile, model, element; var compile, model, element;

View file

@ -1,3 +1,5 @@
'use strict';
describe('jqLite', function(){ describe('jqLite', function(){
var scope, a, b, c; var scope, a, b, c;

View file

@ -1 +1,3 @@
'use strict';
var _jQuery = jQuery; var _jQuery = jQuery;

View file

@ -1 +1,3 @@
'use strict';
var _jQuery = jQuery.noConflict(true); var _jQuery = jQuery.noConflict(true);

View file

@ -1,3 +1,5 @@
'use strict';
describe('jstd-adapter', function() { describe('jstd-adapter', function() {
var fakeJSTD = { pluginRegistrar: { register: function() {} } }, var fakeJSTD = { pluginRegistrar: { register: function() {} } },
originalNavigateTo = angular.scenario.Application.prototype.navigateTo; originalNavigateTo = angular.scenario.Application.prototype.navigateTo;

View file

@ -1,3 +1,5 @@
'use strict';
describe("markups", function(){ describe("markups", function(){
var compile, element, scope; var compile, element, scope;

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Mock implementation of {@link angular.service.$log} that gathers all logged messages in arrays * Mock implementation of {@link angular.service.$log} that gathers all logged messages in arrays
* (one array per logging level). These arrays are exposed as `logs` property of each of the * (one array per logging level). These arrays are exposed as `logs` property of each of the

View file

@ -1,3 +1,5 @@
'use strict';
describe('HTML', function(){ describe('HTML', function(){
function expectHTML(html) { function expectHTML(html) {

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.Application', function() { describe('angular.scenario.Application', function() {
var $window; var $window;
var app, frames; var app, frames;

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.Describe', function() { describe('angular.scenario.Describe', function() {
var log; var log;
var root; var root;

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.Future', function() { describe('angular.scenario.Future', function() {
var future; var future;

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.ObjectModel', function() { describe('angular.scenario.ObjectModel', function() {
var model; var model;
var runner; var runner;

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Mock spec runner. * Mock spec runner.
*/ */

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* Mock Application * Mock Application
*/ */

View file

@ -1,3 +1,5 @@
'use strict';
describe("angular.scenario.dsl", function() { describe("angular.scenario.dsl", function() {
var $window, $root; var $window, $root;
var application, eventLog; var application, eventLog;

View file

@ -1,3 +1,5 @@
'use strict';
describe('widgets', function() { describe('widgets', function() {
it('should verify that basic widgets work', function(){ it('should verify that basic widgets work', function(){
browser().navigateTo('widgets.html'); browser().navigateTo('widgets.html');

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.matchers', function () { describe('angular.scenario.matchers', function () {
var matchers; var matchers;

View file

@ -1,3 +1,5 @@
'use strict';
angular.scenario.testing = angular.scenario.testing || {}; angular.scenario.testing = angular.scenario.testing || {};
angular.scenario.testing.MockAngular = function() { angular.scenario.testing.MockAngular = function() {

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.output.html', function() { describe('angular.scenario.output.html', function() {
var runner, model, spec, step, listeners, ui, context; var runner, model, spec, step, listeners, ui, context;

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.output.json', function() { describe('angular.scenario.output.json', function() {
var output, context; var output, context;
var runner, model, $window; var runner, model, $window;

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.output.object', function() { describe('angular.scenario.output.object', function() {
var output; var output;
var runner, model, $window; var runner, model, $window;

View file

@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.output.json', function() { describe('angular.scenario.output.json', function() {
var output, context; var output, context;
var runner, model, $window; var runner, model, $window;

View file

@ -1,3 +1,5 @@
'use strict';
describe('$cookieStore', function() { describe('$cookieStore', function() {
var scope, $browser, $cookieStore; var scope, $browser, $cookieStore;

View file

@ -1,3 +1,5 @@
'use strict';
describe('$cookies', function() { describe('$cookies', function() {
var scope, $browser; var scope, $browser;

View file

@ -1,3 +1,5 @@
'use strict';
describe('$defer', function() { describe('$defer', function() {
var scope, $browser, $defer, $exceptionHandler; var scope, $browser, $defer, $exceptionHandler;

View file

@ -1,3 +1,5 @@
'use strict';
describe('$document', function() { describe('$document', function() {
var scope; var scope;

View file

@ -1,3 +1,5 @@
'use strict';
describe('$exceptionHandler', function() { describe('$exceptionHandler', function() {
var scope; var scope;

View file

@ -1 +1,3 @@
'use strict';

View file

@ -1,3 +1,5 @@
'use strict';
describe('$invalidWidgets', function() { describe('$invalidWidgets', function() {
var scope; var scope;

View file

@ -1,3 +1,5 @@
'use strict';
describe('$location', function() { describe('$location', function() {
var scope, $location, $browser; var scope, $location, $browser;

View file

@ -1,3 +1,5 @@
'use strict';
describe('$log', function() { describe('$log', function() {
var scope; var scope;

View file

@ -1 +1,3 @@
'use strict';

View file

@ -1,3 +1,5 @@
'use strict';
describe('$route', function() { describe('$route', function() {
var scope; var scope;

Some files were not shown because too many files have changed in this diff Show more