[
  {
    "path": ".gitattributes",
    "content": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs     diff=csharp\n*.sln    merge=union\n*.csproj merge=union\n*.vbproj merge=union\n*.fsproj merge=union\n*.dbproj merge=union\n\n# Standard to msysgit\n*.doc\t diff=astextplain\n*.DOC\t diff=astextplain\n*.docx diff=astextplain\n*.DOCX diff=astextplain\n*.dot  diff=astextplain\n*.DOT  diff=astextplain\n*.pdf  diff=astextplain\n*.PDF\t diff=astextplain\n*.rtf\t diff=astextplain\n*.RTF\t diff=astextplain\n"
  },
  {
    "path": ".gitignore",
    "content": "#################\n## Eclipse\n#################\n\n*.pydevproject\n.project\n.metadata\nbin/\ntmp/\n*.tmp\n*.bak\n*.swp\n*~.nib\n*.log\nlocal.properties\n.classpath\n.settings/\n.loadpath\n\n# External tool builders\n.externalToolBuilders/\n\n# Locally stored \"Eclipse launch configurations\"\n*.launch\n\n# CDT-specific\n.cproject\n\n# PDT-specific\n.buildpath\n\n\n#################\n## Visual Studio\n#################\n\n## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User-specific files\n*.suo\n*.user\n*.sln.docstates\n\n# Build results\n[Dd]ebug/\n[Rr]elease/\n*_i.c\n*_p.c\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.vspscc\n.builds\n*.dotCover\n\n## TODO: If you have NuGet Package Restore enabled, uncomment this\n#packages/\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opensdf\n*.sdf\n\n# Visual Studio profiler\n*.psess\n*.vsp\n\n# ReSharper is a .NET coding add-in\n_ReSharper*\n\n# Installshield output folder\n[Ee]xpress\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish\n\n# Others\n[Bb]in\n[Oo]bj\nsql\nTestResults\n*.Cache\nClientBin\nstylecop.*\n~$*\n*.dbmdl\nGenerated_Code #added for RIA/Silverlight projects\n\n# Backup & report files from converting an old project file to a newer\n# Visual Studio version. Backup files are not needed, because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\n\n\n\n############\n## Windows\n############\n\n# Windows image file caches\nThumbs.db\n\n# Folder config file\nDesktop.ini\n\n\n#############\n## Python\n#############\n\n*.py[co]\n\n# Packages\n*.egg\n*.egg-info\ndist\nbuild\neggs\nparts\nbin\nvar\nsdist\ndevelop-eggs\n.installed.cfg\n\n# Installer logs\npip-log.txt\n\n# Unit test / coverage reports\n.coverage\n.tox\n\n#Translations\n*.mo\n\n#Mr Developer\n.mr.developer.cfg\n\n# Mac crap\n.DS_Store\n.AppleDouble\n\n#NPM\nnode_modules\n\n#Grunt\n.grunt\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n  - \"0.11\"\n  - \"0.10\"\nbefore_install:\n  - npm install -g grunt-cli\n"
  },
  {
    "path": ".vimrc",
    "content": "\nset tabstop=4\nset shiftwidth=4\nset expandtab\n"
  },
  {
    "path": "Gruntfile.js",
    "content": "module.exports = function(grunt) {\n\n// Project configuration.\ngrunt.initConfig({\n\tpkg: grunt.file.readJSON('package.json'),\n\tjshint: {\n\t\tall: ['Gruntfile.js', 'jquery.dfp.js', 'tests/spec/*.js']\n\t},\n\tuglify: {\n\t\toptions: {\n\t\t\tbanner: '/**\\n * jQuery DFP v<%= pkg.version %>\\n * http://github.com/coop182/jquery.dfp.js\\n *\\n * Copyright <%= grunt.template.today(\"yyyy\") %> Matt Cooper\\n * Released under the MIT license\\n */\\n'\n\t\t},\n\t\tbuild: {\n\t\t\tsrc: 'jquery.dfp.js',\n\t\t\tdest: 'jquery.dfp.min.js'\n\t\t}\n\t},\n\tjasmine: {\n\t\tcomponents: {\n\t\t\tsrc: ['jquery.dfp.js'],\n\t\t\toptions: {\n\t\t\t\tvendor: [\n\t\t\t\t\t'http://code.jquery.com/jquery-1.11.0.js',\n\t\t\t\t\t'tests/plugins.js'\n\t\t\t\t],\n\t\t\t\tspecs: 'tests/spec/*Spec.js'\n\t\t\t}\n\t\t}\n\t}\n});\n\n// Load the plugin that provides the \"jshint\" task.\ngrunt.loadNpmTasks('grunt-contrib-jshint');\n\n// Load the plugin that provides the \"uglify\" task.\ngrunt.loadNpmTasks('grunt-contrib-uglify');\n\n// Load the plugin that provides the \"jasmine\" task.\ngrunt.loadNpmTasks('grunt-contrib-jasmine');\n\n// Default task(s).\ngrunt.registerTask('default', ['jshint', 'jasmine', 'uglify']);\n\n// Travis task(s).\ngrunt.registerTask('travis', ['jshint', 'jasmine']);\n\n};\n"
  },
  {
    "path": "MIT-License.txt",
    "content": "Copyright (c) 2016 Matt Cooper\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
  },
  {
    "path": "Readme.markdown",
    "content": "jQuery DFP - A jQuery implementation for Google DFP\n======================================================\n\n[![Build Status](https://travis-ci.org/coop182/jquery.dfp.js.png?branch=master)](https://travis-ci.org/coop182/jquery.dfp.js)\n\nThis script is a drop in solution for getting Double Click for Publishers (DFP) by Google working on your page. By including this script on your page and then initialising it in the ways described below you should find it very easy to get DFP working.\n\nDo not include any of the generated DFP script tags from the DFP admin on your page, this script replaces them.\n\nThis script also works with [Zepto.js](http://zeptojs.com/)\n\nDemo / Ad unit tester\n---------------------\n\nYou can use [this page](http://coop182.github.io/jquery.dfp.js/dfptests/test.html?google_console=1&networkID=15572793&adunitID=Leader&dimensions=728x90) to test your DFP ads using the jquery.dfp.js script. There is some debug code included to help debug the ad delivery.\n\nYou can also use the [Google Console](https://support.google.com/dfp_sb/answer/181070?hl=en-GB) to debug your ad units. This is done by by adding a \"google_console=1\" or \"google_debug=1\" to the url, and toggling the console by pressing CTRL + F10. Subsequent pagerequests will not require the parameters, and the console can be toggled. Adding the querystring \"googfc\" to an url, will also load the console, but also show it, without having to press CTRL + F10.\n\nSetup\n-----\n\nYou can add ad units to your page in any location that you would like to display an ad.\n\nBy default this script will look for ad units with a class of `adunit` but you can of course use jQuery selectors as well.\n\nThe minimum information required for an ad unit to function is having the ad unit specified. To do this you can use the id parameter of the element, for example:\n\n```html\n<div class=\"adunit\" id=\"Ad_unit_id\"></div>\n```\n\nIn the example above the ID of the div element will be used to look up a corresponding ad unit in DFP and the dimensions of the adunit will be set to the same dimensions of the div which could be defined in your CSS.\n\nYou can optionally specify the adunit name and dimensions in the following way:\n\n```html\n<div class=\"adunit\" data-adunit=\"Ad_unit_id\" data-dimensions=\"393x176\"></div>\n```\n\nThis method can be useful for including multiple copies of an ad unit with the same name which when part of a DFP placement will then pull in as many different creatives as possible.\n\nYou can also specify multiple dimensions sets:\n\n```html\n<div class=\"adunit\" data-adunit=\"Ad_unit_id\" data-dimensions=\"393x176,450x500\"></div>\n```\n\nAlso you can optionally specify custom targeting on a per ad unit basis in the following way:\n\n```html\n<div class=\"adunit\" data-adunit=\"Ad_unit_id\" data-dimensions=\"393x176\" data-targeting='{\"city_id\":\"1\"}'></div>\n```\n\nAlso you can optionally specify custom exclusion category on a per ad unit basis in the following way:\n\n```html\n<div class=\"adunit\" data-adunit=\"Ad_unit_id\" data-dimensions=\"393x176\" data-exclusions=\"firstcategory,secondcategory\"></div>\n```\n\nTo create an out of page ad unit set the data-outofpage property on the ad unit. Dimensions are not required for out of page ad units.\n\n```html\n<div class=\"adunit\" data-adunit=\"Ad_unit_id\" data-outofpage=\"true\"></div>\n```\n\nIn order to identify an ad unit on the page that is a video companion ad, set the data-companion attribute on that unit.\n\n```html\n<div class=\"adunit\" data-adunit=\"Ad_unit_id\" data-dimensions=\"393x176\" data-companion=\"true\"></div>\n```\n\nUsage\n-----\n\nCalling the script:\n\n```html\n<html>\n<head>\n    <title>DFP TEST</title>\n    <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js\"></script>\n    <script src=\"jquery.dfp.min.js\"></script>\n</head>\n<body>\n\n    <div class=\"adunit\" id=\"Middle_Feature\" data-dimensions=\"393x176\" data-targeting='{\"city_id\":\"1\"}'></div>\n\n    <script>\n\n        $.dfp({\n            dfpID: 'xxxxxxxxx'\n        });\n\n    </script>\n\n</body>\n</html>\n```\n\nUsing a bootstrap file (take a look at [example-bootstrap.js](https://github.com/coop182/jquery.dfp.js/blob/master/example-bootstrap.js)):\n\n```html\n<html>\n<head>\n    <title>DFP TEST</title>\n    <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js\"></script>\n    <script src=\"example-bootstrap.js\"></script>\n</head>\n<body>\n\n    <div class=\"adunit\" id=\"Middle_Feature\" data-dimensions=\"393x176\" data-targeting='{\"city_id\":\"1\"}'></div>\n\n</body>\n</html>\n```\n\nYou can init the script in the following ways:\n\n```javascript\n$.dfp('xxxxxxxxx');\n```\n```javascript\n$.dfp({\n    dfpID:'xxxxxxxxx'\n});\n```\n```javascript\n$('selector').dfp({\n    dfpID:'xxxxxxxxx'\n});\n```\n```javascript\n$('selector').dfp({\n    dfpID:'xxxxxxxxx',\n    setCategoryExclusion: 'firstcategory, secondcategory'\n});\n```\n```javascript\n$('selector').dfp({\n    dfpID:'xxxxxxxxx',\n    setLocation: { latitude: 34, longitude: -45.12, precision: 1000 }\n});\n```\n\n```javascript\n$('selector').dfp({\n    dfpID:'xxxxxxxxx',\n    sizeMapping: {\n        'my-default': [\n        \t{browser: [1024, 768], ad_sizes: [980, 185]},\n\t        {browser: [ 980, 600], ad_sizes: [[728, 90], [640, 480]]},\n\t        {browser: [   0,   0], ad_sizes: [88, 31]}\n        ],\n    }\n});\n```\n\nAvailable Options\n-----------------\n\n<table>\n    <tr>\n        <th>Option</th>\n        <th>Description</th>\n    </tr>\n    <tr>\n        <td>dfpID</td>\n        <td>This string is your unique DFP account ID.</td>\n    </tr>\n    <tr>\n        <td>setTargeting</td>\n        <td>This object is where you set custom targeting key value pairs. Also see the Default Targeting options that are set further down the page.</td>\n    </tr>\n    <tr>\n        <td>url</td>\n        <td>This string is the url used by the URL Targeting feature. The default value of this option is the value found by calling window.location.</td>\n    </tr>\n    <tr>\n        <td>setUrlTargeting</td>\n        <td>This boolean specifies whether the targeting should include information found in the url of the current page. The default value of this option is true.</td>\n    </tr>\n    <tr>\n        <td>setCategoryExclusion</td>\n        <td>This comma separated list sets category exclusions globally (page level).</td>\n    </tr>\n    <tr>\n        <td>setLocation</td>\n        <td>This object sets geolocalization. String values are not valid. </td>\n    </tr>\n    <tr>\n        <td>enableSingleRequest</td>\n        <td>This boolean sets whether the page ads are fetched with a single request or not, you will need to set this to false it you want to call $.dfp() more than once, typically you would do this if you are loading ad units into the page after the initial load.</td>\n    </tr>\n    <tr>\n        <td>collapseEmptyDivs</td>\n        <td>This can be set to true, false or 'original'. If its set to true the divs will be set to display:none if no line item is found. False means that the ad unit div will stay visible no matter what. Setting this to 'original' (the default option) means that the ad unit div will be hidden if no line items are found UNLESS there is some existing content inside the ad unit div tags. This allows you to have fall back content in the ad unit in the event that no ads are found.</td>\n    </tr>\n    <tr>\n        <td>refreshExisting</td>\n        <td>This boolean controls what happens when dfp is called multiple times on ad units. By default it is set to true which means that if an already initialised ad is initialised again it will instead be refreshed.</td>\n    </tr>\n    <tr>\n        <td>sizeMapping</td>\n        <td>Defines named size maps that can be used with in combination with the data-size-mapping attribute to enable responsive ad sizing (https://support.google.com/dfp_premium/answer/3423562?hl=en).</td>\n    </tr>\n    <tr>\n        <td>companionAds</td>\n        <td>If adding companion ads to accompany videos using the IMA SDK to serve video ads, then pass this parameter as true to identify the units being used for that purpose. (https://support.google.com/dfp_premium/answer/1191131)</td>\n    </tr>\n    <tr>\n        <td>disableInitialLoad</td>\n        <td>This allows for serving companion ad units when the video on the page auto plays.  You'll need to include this setting with companionAds as true to avoid possible double impressions. (https://support.google.com/dfp_premium/answer/1191131)</td>\n    </tr>\n    <tr>\n        <td>setCentering</td>\n        <td>Enables/disables centering of ads.</td>\n    </tr>\n    <tr>\n        <td>afterEachAdLoaded</td>\n        <td>This is a call back function, see below for more information.</td>\n    </tr>\n    <tr>\n        <td>afterAllAdsLoaded</td>\n        <td>This is a call back function, see below for more information.</td>\n    </tr>\n    <tr>\n        <td>beforeEachAdLoaded</td>\n        <td>This is a call back function, see below for more information.</td>\n    </tr>\n</table>\n\nCallbacks\n---------\n\nThis script provides two callbacks which you can use to make working with DFP a little easier.\n\n<table>\n    <tr>\n        <th>Callback</th>\n        <th>Parameters</th>\n        <th>Description</th>\n    </tr>\n    <tr>\n        <td>afterEachAdLoaded(adUnit)</td>\n        <td>\n            <ul>\n                <li>adUnit - jQuery Object - the jQuery object</li>\n            </ul>\n        </td>\n        <td>This is called after each ad unit has finished rendering.</td>\n    </tr>\n    <tr>\n        <td>afterAllAdsLoaded(adUnits)</td>\n        <td>\n            <ul>\n                <li>adUnits - jQuery Object - the jQuery object containing all selected ad units</li>\n            </ul>\n        </td>\n        <td>This is called after all ad units have finished rendering.</td>\n    </tr>\n    <tr>\n        <td>alterAdUnitName(adUnitName, adUnit)</td>\n        <td>\n            <ul>\n                <li>adUnitName - String - the default ad unit name</li>\n                <li>adUnit - jQuery Object - the jQuery object</li>\n            </ul>\n        </td>\n        <td>Return the modified or overrided ad unit name.  This function is called once per ad unit.</td>\n    </tr>\n    <tr>\n        <td>beforeEachAdLoaded(adUnit)</td>\n        <td>\n            <ul>\n                <li>adUnit - jQuery Object - the jQuery object</li>\n            </ul>\n        </td>\n        <td>This is called before each ad unit has started rendering.</td>\n    </tr>\n    <tr>\n        <td>afterAdBlocked(adUnit)</td>\n        <td>\n            <ul>\n                <li>adUnit - jQuery Object - the jQuery object</li>\n            </ul>\n        </td>\n        <td>This is called after each AdUnit has been blocked.</td>\n    </tr>   \n</table>\n\nPlease see the [example-bootstrap.js](https://github.com/coop182/jquery.dfp.js/blob/master/example-bootstrap.js) file for an example of how to use these.\n\nDefault URL Targeting\n---------------------\n\nThe following targeting options are built into this script and should be setup in your DFP account ([within Inventory/Custom Targeting](https://support.google.com/dfp_sb/bin/answer.py?hl=en&answer=2983838)) to make full use of them. These targeting-parameters can be turned on/off with the setUrlTargeting option.\n\n**Beware: The Targeting string has a 40 character limit!**\n\n<table>\n    <tr>\n        <th>Key</th>\n        <th>Description</th>\n    </tr>\n    <tr>\n        <td>UrlHost</td>\n        <td>This allows you to target different host names, for example you could test your ads on your staging environment before pushing them live by specifying a host of staging.yourdomain.com within DFP, this script will take care of the rest.</td>\n    </tr>\n    <tr>\n        <td>UrlPath</td>\n        <td>This allows you to target the path of the users browser, for example if you set UrlPath to '/page1' on the targeting options of the DFP line item it would match http://www.yourdomain.com/page1 only and not http://www.yourdomain.com/page1/segment2.</td>\n    </tr>\n    <tr>\n        <td>UrlQuery</td>\n        <td>This allows you to target the query parameters of a page. For example if the URL was http://www.yourdomain.com/page1?param1=value1 you could target it with a DFP ad by specifying a UrlQuery targeting string of param1:value1</td>\n    </tr>\n</table>\n\nDFP now supports both a \"begins with\" and a \"contains\" operator when specifying the custom criteria value. Furthermore the value when using free-form-key-value custom criterias, is no longer subject to a 40 character limit. Read more about custom criteria in the [DFP help](https://support.google.com/dfp_premium/answer/188092).\n\n![URL Targeting](https://raw.github.com/coop182/jquery.dfp.js/master/img/url-targetting.png)\n\n**IMPORTANT: Regarding user-identifiable information in url targeting**\n\nIf your url contains user-identifiable information you have to anonymize the url when using URL targeting.\n\nFrom the [DFP docs](https://support.google.com/dfp_premium/answer/177383):\n\n> You may not pass any user-identifiable data (including names, addresses, or user IDs) in the targeting. Please mask this information using the encoding of your choice, and ensure your ad trafficker knows how to decode the values when setting up a line item.\n\nFrom the [DFP Terms & Conditions](http://www.google.dk/doubleclick/publishers/small-business/terms.html):\n\n> **2.3 Prohibited Actions.** You will not, and will not allow any third party to: ... (h) utilize any feature or functionality of the Program, or include anything in Program Data or Program Ads, that could be so utilized, to personally identify and/or personally track individual end users or any other persons\n\nIgnoring this rule can result in Google shutting down your network!\n\nYou can anonymize the url by providing an anonymized version in the 'url' option. This example shows how to replace email occurances in the url with an empty string:\n\n```javascript\n$('selector').dfp({\n  dfpID: 'xxxxxxxxx',\n  url: window.location.toString().replace(/\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b/gi, '')\n});\n```\n\nContributing\n------------\n\nAny and all contributions will be greatly appreciated.\n\nIf you wish to you can use [Grunt](http://gruntjs.com/) to enable a smooth contributing and build process.\n\nInstall Node.js by running `sudo apt-get install nodejs`\n\nInstall Grunt using: `npm install -g grunt-cli`\n\nOnce installed run `npm install` from inside the cloned repo directory.\n\nYou should now be able to make your changes to `jquery.dfp.js` and once you are finished simply run `grunt` if there are no errors then you can commit your changes and make a pull request and your feature/bug fix will be merged as soon as possible.\n\nPlease feel free to write tests which will test your new code, [Travis CI](https://travis-ci.org/) is used to test the code automatically once a pull request is generated.\n\nThanks a lot to these [contributors](https://github.com/coop182/jquery.dfp.js/graphs/contributors).\n"
  },
  {
    "path": "bower.json",
    "content": "{\n    \"name\": \"jquery.dfp\",\n    \"version\": \"2.4.2\",\n    \"main\": \"jquery.dfp.js\",\n    \"ignore\": [\n        \"img/\",\n        \"tests/\",\n        \".gitattributes\",\n        \".gitignore\",\n        \".travis.yml\",\n        \".vimrc\",\n        \"Gruntfile.js\",\n        \"example-bootstrap.js\"\n    ]\n}\n"
  },
  {
    "path": "dfp.jquery.json",
    "content": "{\n    \"name\": \"dfp\",\n    \"title\": \"jQuery DFP\",\n    \"description\": \"A jQuery implementation for Google DoubleClick for Publishers (DFP)\",\n    \"keywords\": [\n        \"DFP\",\n        \"google\",\n        \"ads\",\n        \"advertising\"\n    ],\n    \"version\": \"2.4.2\",\n    \"author\": {\n        \"name\": \"Matt Cooper\",\n        \"email\": \"matt@matthewcooper.net\",\n        \"url\": \"http://matthewcooper.net\"\n    },\n    \"homepage\": \"https://github.com/coop182/jquery.dfp.js\",\n    \"bugs\": \"https://github.com/coop182/jquery.dfp.js/issues\",\n    \"docs\": \"https://github.com/coop182/jquery.dfp.js\",\n    \"licenses\": [\n        {\n            \"type\": \"MIT\",\n            \"url\": \"https://github.com/coop182/jquery.dfp.js/blob/master/MIT-License.txt\"\n        }\n    ],\n    \"dependencies\": {\n        \"jquery\": \">= 1.7\"\n    }\n}\n"
  },
  {
    "path": "example-bootstrap.js",
    "content": "(function ($, window) {\n\n\t\"use strict\";\n\n\t$.getScript(\"jquery.dfp.min.js\", function () {\n\n\t\t$.dfp({\n\n\t\t\t// Set the DFP ID\n\t\t\t'dfpID': 'xxxxxxxx',\n\n\t\t\t// Callback which is run after the render of each ad.\n\t\t\tafterEachAdLoaded: function (adUnit) {\n\n\t\t\t\t// Do something after each ad is loaded.\n\n\t\t\t\tif ($(adUnit).hasClass('display-none')) {\n\t\t\t\t\t// Ad not found\n\t\t\t\t} else {\n\t\t\t\t\t// Ad found\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\t// Callback which is run after the render of all ads.\n\t\t\tafterAllAdsLoaded: function (adUnits) {\n\n\t\t\t\t// Do something after all ads are loaded.\n\n\t\t\t},\n\t\t\t\n\t\t\talterAdUnitName: function(adUnitName,adUnit) {\n\t\t\t\t// Modify add unit name. For example, can add a prefix or suffix\n\t\t\t\treturn 'PREFIX_' + adUnitName + '_SUFFIX';\n\t\t\t}\n\n\t\t});\n\n\t});\n\n})(window.jQuery, window);\n"
  },
  {
    "path": "jquery.dfp.js",
    "content": "/*!\n * jQuery DFP v2.4.2\n * http://github.com/coop182/jquery.dfp.js\n *\n * Copyright 2016 Matt Cooper\n * Released under the MIT license\n */\n\n(function (window, undefined) {\n    \"use strict\";\n\n    /**\n     * Make plugin UMD compatible\n     * Uses CommonJS, AMD or browser globals to create plugin.\n     */\n    (function (factory) {\n        if (typeof define === 'function' && define.amd) {\n            // AMD. Register as an anonymous module.\n            define(['jquery'], factory);\n        } else if (typeof exports === 'object') {\n            // Node/CommonJS\n            factory(require('jquery'));\n        } else {\n            // Browser globals\n            factory(window.jQuery || window.Zepto);\n        }\n    }(function ($) {\n\n        var\n\n        // Save Scope\n        dfpScript = this || {};\n\n        var\n        // DFP account ID\n        dfpID = '',\n\n        // Init counters\n        count = 0,\n        uid = 0,\n        rendered = 0,\n\n        // Default DFP selector\n        dfpSelector = '.adunit',\n\n        adsCouldNeverBeInitilized = false,\n\n        // Keep track of if we've already tried to load gpt.js before\n        dfpIsLoaded = false,\n\n        // Store adunit on div as:\n        storeAs = 'googleAdUnit',\n\n        /**\n         * Init function sets required params and loads Google's DFP script\n         * @param  String id       The DFP account ID\n         * @param  String selector The adunit selector\n         * @param  Object options  Custom options to apply\n         */\n        init = function (id, selector, options) {\n            var $adCollection;\n\n            // Reset counters on each call\n            count = 0;\n            rendered = 0;\n\n            dfpID = id;\n            $adCollection = $(selector);\n\n            /**\n             * @returns {boolean}\n             */\n            dfpScript.shouldCheckForAdBlockers = function(){\n                return options ? typeof options.afterAdBlocked === 'function' : false;\n            };\n\n            // explicitly wait for loader to be completed, otherwise the googletag might not be available\n            dfpLoader(options, $adCollection).then(function(){\n                options = setOptions(options);\n                dfpScript.dfpOptions = options;\n\n                $(function () {\n                    createAds(options, $adCollection);\n                    displayAds(options, $adCollection);\n                });\n            });\n\n        },\n\n        /**\n         * Set the options for DFP\n         * @param Object options Custom options to apply\n         * @return Object extended options\n         */\n        setOptions = function (options) {\n\n            // Set default options\n            var dfpOptions = {\n                setTargeting: {},\n                setCategoryExclusion: '',\n                setLocation: '',\n                enableSingleRequest: true,\n                collapseEmptyDivs: 'original',\n                refreshExisting: true,\n                disablePublisherConsole: false,\n                disableInitialLoad: false,\n                setCentering: false,\n                noFetch: false,\n                namespace: undefined,\n                sizeMapping: {}\n            };\n\n            if (typeof options.setUrlTargeting === 'undefined' || options.setUrlTargeting) {\n                // Get URL Targeting\n                var urlTargeting = getUrlTargeting(options.url);\n                $.extend(true, dfpOptions.setTargeting, {\n                    UrlHost: urlTargeting.Host,\n                    UrlPath: urlTargeting.Path,\n                    UrlQuery: urlTargeting.Query\n                });\n            }\n\n            // Merge options objects\n            $.extend(true, dfpOptions, options);\n\n            // If a custom googletag is specified, use it.\n            if (dfpOptions.googletag) {\n                window.googletag.cmd.push(function () {\n                    $.extend(true, window.googletag, dfpOptions.googletag);\n                });\n            }\n\n            return dfpOptions;\n        },\n\n        /**\n         * Find and create all Ads\n         * @param Object dfpOptions options related to ad instantiation\n         * @param jQuery $adCollection collection of ads\n         * @return Array an array of ad units that have been created.\n         */\n        createAds = function (dfpOptions, $adCollection) {\n            var googletag = window.googletag;\n            // Loops through on page Ad units and gets ads for them.\n            $adCollection.each(function () {\n                var $adUnit = $(this);\n\n                count++;\n\n                // adUnit name\n                var adUnitName = getName($adUnit, dfpOptions);\n\n                // adUnit id - this will use an existing id or an auto generated one.\n                var adUnitID = getID($adUnit, adUnitName);\n\n                // get dimensions of the adUnit\n                var dimensions = getDimensions($adUnit);\n\n                // set existing content\n                $adUnit.data('existingContent', $adUnit.html());\n\n                // wipe html clean ready for ad and set the default display class.\n                $adUnit.html('').addClass('display-none');\n\n                // Push commands to DFP to create ads\n                googletag.cmd.push(function () {\n\n                    var googleAdUnit,\n                        $adUnitData = $adUnit.data(storeAs);\n\n                    if ($adUnitData) {\n\n                        // Get existing ad unit\n                        googleAdUnit = $adUnitData;\n\n                    } else {\n\n                        // Build slotName for loading\n                        var slotName;\n                        if (dfpID === '') {\n                            slotName = adUnitName;\n                        } else {\n                            slotName = '/' + dfpID + '/' + adUnitName;\n                        }\n\n                        // Create the ad - out of page or normal\n                        if ($adUnit.data('outofpage')) {\n                            googleAdUnit = googletag.defineOutOfPageSlot(slotName, adUnitID);\n                        } else {\n                            googleAdUnit = googletag.defineSlot(slotName, dimensions, adUnitID);\n                            if ($adUnit.data('companion')) {\n                                googleAdUnit = googleAdUnit.addService(googletag.companionAds());\n                            }\n                        }\n\n                        googleAdUnit = googleAdUnit.addService(googletag.pubads());\n\n                    }\n\n                    // Sets custom targeting for just THIS ad unit if it has been specified\n                    var targeting = $adUnit.data('targeting');\n                    if (targeting) {\n                        $.each(targeting, function (k, v) {\n                            googleAdUnit.setTargeting(k, v);\n                        });\n                    }\n\n                    // Sets custom exclusions for just THIS ad unit if it has been specified\n                    var exclusions = $adUnit.data('exclusions');\n                    if (exclusions) {\n                        var exclusionsGroup = exclusions.split(',');\n                        var valueTrimmed;\n                        $.each(exclusionsGroup, function (k, v) {\n                            valueTrimmed = $.trim(v);\n                            if (valueTrimmed.length > 0) {\n                                googleAdUnit.setCategoryExclusion(valueTrimmed);\n                            }\n                        });\n                    }\n\n                    // Sets responsive size mapping for just THIS ad unit if it has been specified\n                    var mapping = $adUnit.data('size-mapping');\n                    if (mapping && dfpOptions.sizeMapping[mapping]) {\n                        // Convert verbose to DFP format\n                        var map = googletag.sizeMapping();\n                        $.each(dfpOptions.sizeMapping[mapping], function (k, v) {\n                            map.addSize(v.browser, v.ad_sizes);\n                        });\n                        googleAdUnit.defineSizeMapping(map.build());\n                    }\n\n                    // Store googleAdUnit reference\n                    $adUnit.data(storeAs, googleAdUnit);\n\n                    // Allow altering of the ad slot before ad load\n                    if (typeof dfpOptions.beforeEachAdLoaded === 'function') {\n                        dfpOptions.beforeEachAdLoaded.call(this, $adUnit);\n                    }\n                });\n\n            });\n\n            // Push DFP config options\n            googletag.cmd.push(function () {\n\n                var pubadsService = googletag.pubads();\n\n                if (dfpOptions.enableSingleRequest) {\n                    pubadsService.enableSingleRequest();\n                }\n\n                $.each(dfpOptions.setTargeting, function (k, v) {\n                    pubadsService.setTargeting(k, v);\n                });\n\n                var setLocation = dfpOptions.setLocation;\n                if (typeof setLocation === 'object') {\n                    if (typeof setLocation.latitude === 'number' && typeof setLocation.longitude === 'number' &&\n                        typeof setLocation.precision === 'number') {\n                        pubadsService.setLocation(setLocation.latitude, setLocation.longitude, setLocation.precision);\n                    } else if (typeof setLocation.latitude === 'number' && typeof setLocation.longitude === 'number') {\n                        pubadsService.setLocation(setLocation.latitude, setLocation.longitude);\n                    }\n                }\n\n                if (dfpOptions.setCategoryExclusion.length > 0) {\n                    var exclusionsGroup = dfpOptions.setCategoryExclusion.split(',');\n                    var valueTrimmed;\n\n                    $.each(exclusionsGroup, function (k, v) {\n                        valueTrimmed = $.trim(v);\n                        if (valueTrimmed.length > 0) {\n                            pubadsService.setCategoryExclusion(valueTrimmed);\n                        }\n                    });\n                }\n\n                if (dfpOptions.collapseEmptyDivs) {\n                    pubadsService.collapseEmptyDivs();\n                }\n\n                if (dfpOptions.disablePublisherConsole) {\n                    pubadsService.disablePublisherConsole();\n                }\n\n                if (dfpOptions.companionAds) {\n                    googletag.companionAds().setRefreshUnfilledSlots(true);\n\n                    if (!dfpOptions.disableInitialLoad) {\n                        pubadsService.enableVideoAds();\n                    }\n                }\n\n                if (dfpOptions.disableInitialLoad) {\n                    pubadsService.disableInitialLoad();\n                }\n\n                if (dfpOptions.noFetch) {\n                    pubadsService.noFetch();\n                }\n\n                if (dfpOptions.setCentering) {\n                    pubadsService.setCentering(true);\n                }\n\n                // Setup event listener to listen for renderEnded event and fire callbacks.\n                pubadsService.addEventListener('slotRenderEnded', function (event) {\n\n                    rendered++;\n\n                    var $adUnit = $('#' + event.slot.getSlotId().getDomId());\n\n                    var display = event.isEmpty ? 'none' : 'block';\n\n                    // if the div has been collapsed but there was existing content expand the\n                    // div and reinsert the existing content.\n                    var $existingContent = $adUnit.data('existingContent');\n                    if (display === 'none' && $.trim($existingContent).length > 0 &&\n                        dfpOptions.collapseEmptyDivs === 'original') {\n                        $adUnit.show().html($existingContent);\n                        display = 'block display-original';\n                    }\n\n                    $adUnit.removeClass('display-none').addClass('display-' + display);\n\n                    // Excute afterEachAdLoaded callback if provided\n                    if (typeof dfpOptions.afterEachAdLoaded === 'function') {\n                        dfpOptions.afterEachAdLoaded.call(this, $adUnit, event);\n                    }\n\n                    // Excute afterAllAdsLoaded callback if provided\n                    if (typeof dfpOptions.afterAllAdsLoaded === 'function' && rendered === count) {\n                        dfpOptions.afterAllAdsLoaded.call(this, $adCollection);\n                    }\n\n                });\n\n                // this will work with AdblockPlus\n                if(dfpScript.shouldCheckForAdBlockers() && !googletag._adBlocked_) {\n                    setTimeout(function () {\n                        var slots = pubadsService.getSlots ? pubadsService.getSlots() : [];\n                        if (slots.length > 0) {\n                            $.get(slots[0].getContentUrl()).always(function (r) {\n                                if (r.status !== 200) {\n                                    $.each(slots, function () {\n                                        var $adUnit = $('#' + this.getSlotId().getDomId());\n                                        dfpOptions.afterAdBlocked.call(dfpScript, $adUnit, this);\n                                    });\n                                }\n                            });\n                        }\n                    }, 0);\n                }\n\n                googletag.enableServices();\n\n            });\n\n        },\n\n        /**\n         * Display all created Ads\n         * @param {Object} dfpOptions options related to ad instantiation\n         * @param {jQuery} $adCollection collection of ads\n         */\n        displayAds = function (dfpOptions, $adCollection) {\n\n            var googletag = window.googletag;\n            // Check if google adLoader can be loaded, this will work with AdBlock\n            if(dfpScript.shouldCheckForAdBlockers() && !googletag._adBlocked_) {\n                if (googletag.getVersion) {\n                    var script = '//partner.googleadservices.com/gpt/pubads_impl_' +\n                        googletag.getVersion() + '.js';\n                    $.getScript(script).always(function (r) {\n                        if (r && r.statusText === 'error') {\n                            $.each($adCollection, function () {\n                                dfpOptions.afterAdBlocked.call(dfpScript, $(this));\n                            });\n                        }\n                    });\n                }\n\n            }\n\n            $adCollection.each(function () {\n\n                var $adUnit = $(this),\n                    $adUnitData = $adUnit.data(storeAs);\n\n                if (googletag._adBlocked_) {\n                    if(dfpScript.shouldCheckForAdBlockers()) {\n                        dfpOptions.afterAdBlocked.call(dfpScript, $adUnit);\n                    }\n                }\n                if (dfpOptions.refreshExisting && $adUnitData && $adUnit.hasClass('display-block')) {\n\n                    googletag.cmd.push(function () { googletag.pubads().refresh([$adUnitData]); });\n\n                } else {\n                    googletag.cmd.push(function () { googletag.display($adUnit.attr('id')); });\n                }\n\n            });\n\n        },\n\n        /**\n         * Create an array of paths so that we can target DFP ads to Page URI's\n         * @return Array an array of URL parts that can be targeted.\n         */\n        getUrlTargeting = function (url) {\n\n            // Get the url and parse it to its component parts using regex from RFC2396 Appendix-B (https://tools.ietf.org/html/rfc2396#appendix-B)\n            var urlMatches = (url || window.location.toString()).match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/);\n            var matchedAuthority = urlMatches[4] || '';\n            var matchedPath = (urlMatches[5] || '').replace(/(.)\\/$/, '$1');\n            var matchedQuery = urlMatches[7] || '';\n\n            // Get the query params for targeting against\n            var params = matchedQuery.replace(/\\=/ig, ':').split('&');\n\n            return {\n                Host: matchedAuthority,\n                Path: matchedPath,\n                Query: params\n            };\n\n        },\n\n        /**\n         * Get the id of the adUnit div or generate a unique one.\n         * @param  Object $adUnit     The adunit to work with\n         * @param  String adUnitName The name of the adunit\n         * @return String             The ID of the adunit or a unique autogenerated ID\n         */\n        getID = function ($adUnit, adUnitName) {\n\n            uid++;\n            return $adUnit.attr('id') || $adUnit.attr('id', adUnitName.replace(/[^A-z0-9]/g, '_') + '-auto-gen-id-' + uid).attr('id');\n\n        },\n\n        /**\n         * Get the name of the Ad unit, either use the div id or\n         * check for the optional attribute data-adunit\n         * @param  Object $adUnit The adunit to work with\n         * @param  Object dfpOptions options related to ad instantiation\n         * @return String        The name of the adunit, will be the same as inside DFP\n         */\n        getName = function ($adUnit, dfpOptions) {\n\n            var adUnitName = $adUnit.data('adunit') || dfpOptions.namespace || $adUnit.attr('id') || '';\n            if (typeof dfpOptions.alterAdUnitName === 'function') {\n                adUnitName = dfpOptions.alterAdUnitName.call(this, adUnitName, $adUnit);\n            }\n            return adUnitName;\n\n        },\n\n        /**\n         * Get the dimensions of the ad unit using the container div dimensions or\n         * check for the optional attribute data-dimensions\n         * @param  Object $adUnit The adunit to work with\n         * @return Array         The dimensions of the adunit (width, height)\n         */\n        getDimensions = function ($adUnit) {\n\n            var dimensions = [],\n                dimensionsData = $adUnit.data('dimensions');\n\n            // Check if data-dimensions are specified. If they aren't, use the dimensions of the ad unit div.\n            if (dimensionsData) {\n\n                var dimensionGroups = dimensionsData.split(',');\n\n                $.each(dimensionGroups, function (k, v) {\n\n                    var dimensionSet = v.split('x');\n                    dimensions.push([parseInt(dimensionSet[0], 10), parseInt(dimensionSet[1], 10)]);\n\n                });\n\n            } else {\n\n                dimensions.push([$adUnit.width(), $adUnit.height()]);\n\n            }\n\n            return dimensions;\n\n        },\n\n        /**\n         * Call the google DFP script - there is a little bit of error detection in here to detect\n         * if the dfp script has failed to load either through an error or it being blocked by an ad\n         * blocker... if it does not load we execute a dummy script to replace the real DFP.\n         *\n         * @param {Object} options\n         * @param {Array} $adCollection\n         */\n        dfpLoader = function (options, $adCollection) {\n\n            function execBlockEvents() {\n                if(dfpScript.shouldCheckForAdBlockers()) {\n                    $.each($adCollection, function () {\n                        options.afterAdBlocked.call(dfpScript, $(this));\n                    });\n                }\n            }\n\n            // make sure we don't load gpt.js multiple times\n            dfpIsLoaded = dfpIsLoaded || $('script[src*=\"googletagservices.com/tag/js/gpt.js\"]').length;\n            if (dfpIsLoaded) {\n                if(adsCouldNeverBeInitilized) {\n                    execBlockEvents();\n                }\n                return $.Deferred().resolve();\n            }\n\n            var loaded = $.Deferred();\n\n            window.googletag = window.googletag || {};\n            window.googletag.cmd = window.googletag.cmd || [];\n\n            var gads = document.createElement('script');\n            gads.async = true;\n            gads.type = 'text/javascript';\n\n            // Adblock blocks the load of Ad scripts... so we check for that\n            gads.onerror = function () {\n                dfpBlocked();\n                loaded.resolve();\n                adsCouldNeverBeInitilized = true;\n                execBlockEvents();\n            };\n\n            gads.onload = function() {\n                // this will work with ghostery:\n                if (!googletag._loadStarted_) {\n                    googletag._adBlocked_ = true;\n                    execBlockEvents();\n                }\n                loaded.resolve();\n            };\n\n            var useSSL = 'https:' === document.location.protocol;\n            gads.src = (useSSL ? 'https:' : 'http:') +\n            '//www.googletagservices.com/tag/js/gpt.js';\n            var node = document.getElementsByTagName('script')[0];\n            node.parentNode.insertBefore(gads, node);\n\n            // Adblock plus seems to hide blocked scripts... so we check for that\n            if (gads.style.display === 'none') {\n                dfpBlocked();\n            }\n\n            return loaded;\n\n        },\n\n        /**\n         * This function gets called if DFP has been blocked by an adblocker\n         * it implements a dummy version of the dfp object and allows the script to excute its callbacks\n         * regardless of whether DFP is actually loaded or not... it is basically only useful for situations\n         * where you are laying DFP over existing content and need to init things like slide shows after the loading\n         * is completed.\n         */\n        dfpBlocked = function () {\n            var googletag = window.googletag;\n            // Get the stored dfp commands\n            var commands = googletag.cmd;\n\n            var _defineSlot = function (name, dimensions, id, oop) {\n                googletag.ads.push(id);\n                googletag.ads[id] = {\n                    renderEnded: function () { },\n                    addService: function () { return this; }\n                };\n\n                return googletag.ads[id];\n            };\n\n            // overwrite the dfp object - replacing the command array with a function and defining missing functions\n            googletag = {\n                cmd: {\n                    push: function (callback) {\n                        callback.call(dfpScript);\n                    }\n                },\n                ads: [],\n                pubads: function () { return this; },\n                noFetch: function () { return this; },\n                disableInitialLoad: function () { return this; },\n                disablePublisherConsole: function () { return this; },\n                enableSingleRequest: function () { return this; },\n                setTargeting: function () { return this; },\n                collapseEmptyDivs: function () { return this; },\n                enableServices: function () { return this; },\n                defineSlot: function (name, dimensions, id) {\n                    return _defineSlot(name, dimensions, id, false);\n                },\n                defineOutOfPageSlot: function (name, id) {\n                    return _defineSlot(name, [], id, true);\n                },\n                display: function (id) {\n                    googletag.ads[id].renderEnded.call(dfpScript);\n                    return this;\n                }\n\n            };\n\n            // Execute any stored commands\n            $.each(commands, function (k, v) {\n                googletag.cmd.push(v);\n            });\n\n\n        };\n\n\n        /**\n         * Add function to the jQuery / Zepto namespace\n         * @param  String id      (Optional) The DFP account ID\n         * @param  Object options (Optional) Custom options to apply\n         */\n        $.dfp = $.fn.dfp = function (id, options) {\n\n            options = options || {};\n\n            if (id === undefined) {\n                id = dfpID;\n            }\n\n            if (typeof id === 'object') {\n                options = id;\n                id = options.dfpID || dfpID;\n            }\n\n            var selector = this;\n\n            if (typeof this === 'function') {\n                selector = dfpSelector;\n            }\n\n            init(id, selector, options);\n\n            return this;\n\n        };\n\n    }));\n\n})(window);\n"
  },
  {
    "path": "package.json",
    "content": "{\n    \"name\": \"jquery.dfp\",\n    \"version\": \"2.4.2\",\n    \"devDependencies\": {\n        \"grunt\": \"~0.4\",\n        \"grunt-contrib-jasmine\": \"^0.8.2\",\n        \"grunt-contrib-jshint\": \"^0.11.1\",\n        \"grunt-contrib-uglify\": \"^0.8.0\"\n    },\n    \"scripts\": {\n        \"test\": \"grunt travis --verbose\"\n    },\n    \"repository\": {\n        \"type\": \"git\",\n        \"url\": \"https://github.com/coop182/jquery.dfp.js\"\n    },\n    \"main\": \"jquery.dfp.js\"\n}\n"
  },
  {
    "path": "tests/SpecRunner.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <title>Jasmine Spec Runner v2.2.0</title>\n\n  <link rel=\"shortcut icon\" type=\"image/png\" href=\"lib/jasmine-2.2.0/jasmine_favicon.png\">\n  <link rel=\"stylesheet\" href=\"lib/jasmine-2.2.0/jasmine.css\">\n\n  <script src=\"lib/jasmine-2.2.0/jasmine.js\"></script>\n  <script src=\"lib/jasmine-2.2.0/jasmine-html.js\"></script>\n  <script src=\"lib/jasmine-2.2.0/boot.js\"></script>\n\n  <!-- Plugins -->\n  <script type=\"text/javascript\" src=\"plugins.js\"></script>\n\n  <!-- include source files here... -->\n  <script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-1.11.0.js\"></script>\n  <script type=\"text/javascript\" src=\"../jquery.dfp.js\"></script>\n\n  <!-- include spec files here... -->\n  <script type=\"text/javascript\" src=\"spec/loadingPhaseSpec.js\"></script>\n  <script type=\"text/javascript\" src=\"spec/adUnitSpec.js\"></script>\n  <script type=\"text/javascript\" src=\"spec/TargetingSpec.js\"></script>\n  <script type=\"text/javascript\" src=\"spec/categoryExclusionSpec.js\"></script>\n  <script type=\"text/javascript\" src=\"spec/setLocationSpec.js\"></script>\n  <script type=\"text/javascript\" src=\"spec/sizeMappingSpec.js\"></script>\n  <script type=\"text/javascript\" src=\"spec/callBacksSpec.js\"></script>\n\n</head>\n\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "tests/lib/jasmine-2.2.0/boot.js",
    "content": "/**\n Starting with version 2.0, this file \"boots\" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js` and `jasmine_html.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.\n\n If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.\n\n The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.\n\n [jasmine-gem]: http://github.com/pivotal/jasmine-gem\n */\n\n(function() {\n\n  /**\n   * ## Require &amp; Instantiate\n   *\n   * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.\n   */\n  window.jasmine = jasmineRequire.core(jasmineRequire);\n\n  /**\n   * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.\n   */\n  jasmineRequire.html(jasmine);\n\n  /**\n   * Create the Jasmine environment. This is used to run all specs in a project.\n   */\n  var env = jasmine.getEnv();\n\n  /**\n   * ## The Global Interface\n   *\n   * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.\n   */\n  var jasmineInterface = jasmineRequire.interface(jasmine, env);\n\n  /**\n   * Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.\n   */\n  if (typeof window == \"undefined\" && typeof exports == \"object\") {\n    extend(exports, jasmineInterface);\n  } else {\n    extend(window, jasmineInterface);\n  }\n\n  /**\n   * ## Runner Parameters\n   *\n   * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.\n   */\n\n  var queryString = new jasmine.QueryString({\n    getWindowLocation: function() { return window.location; }\n  });\n\n  var catchingExceptions = queryString.getParam(\"catch\");\n  env.catchExceptions(typeof catchingExceptions === \"undefined\" ? true : catchingExceptions);\n\n  /**\n   * ## Reporters\n   * The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).\n   */\n  var htmlReporter = new jasmine.HtmlReporter({\n    env: env,\n    onRaiseExceptionsClick: function() { queryString.navigateWithNewParam(\"catch\", !env.catchingExceptions()); },\n    addToExistingQueryString: function(key, value) { return queryString.fullStringWithNewParam(key, value); },\n    getContainer: function() { return document.body; },\n    createElement: function() { return document.createElement.apply(document, arguments); },\n    createTextNode: function() { return document.createTextNode.apply(document, arguments); },\n    timer: new jasmine.Timer()\n  });\n\n  /**\n   * The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results  from JavaScript.\n   */\n  env.addReporter(jasmineInterface.jsApiReporter);\n  env.addReporter(htmlReporter);\n\n  /**\n   * Filter which specs will be run by matching the start of the full name against the `spec` query param.\n   */\n  var specFilter = new jasmine.HtmlSpecFilter({\n    filterString: function() { return queryString.getParam(\"spec\"); }\n  });\n\n  env.specFilter = function(spec) {\n    return specFilter.matches(spec.getFullName());\n  };\n\n  /**\n   * Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack.\n   */\n  window.setTimeout = window.setTimeout;\n  window.setInterval = window.setInterval;\n  window.clearTimeout = window.clearTimeout;\n  window.clearInterval = window.clearInterval;\n\n  /**\n   * ## Execution\n   *\n   * Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.\n   */\n  var currentWindowOnload = window.onload;\n\n  window.onload = function() {\n    if (currentWindowOnload) {\n      currentWindowOnload();\n    }\n    htmlReporter.initialize();\n    env.execute();\n  };\n\n  /**\n   * Helper function for readability above.\n   */\n  function extend(destination, source) {\n    for (var property in source) destination[property] = source[property];\n    return destination;\n  }\n\n}());\n"
  },
  {
    "path": "tests/lib/jasmine-2.2.0/console.js",
    "content": "/*\nCopyright (c) 2008-2015 Pivotal Labs\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\nfunction getJasmineRequireObj() {\n  if (typeof module !== 'undefined' && module.exports) {\n    return exports;\n  } else {\n    window.jasmineRequire = window.jasmineRequire || {};\n    return window.jasmineRequire;\n  }\n}\n\ngetJasmineRequireObj().console = function(jRequire, j$) {\n  j$.ConsoleReporter = jRequire.ConsoleReporter();\n};\n\ngetJasmineRequireObj().ConsoleReporter = function() {\n\n  var noopTimer = {\n    start: function(){},\n    elapsed: function(){ return 0; }\n  };\n\n  function ConsoleReporter(options) {\n    var print = options.print,\n      showColors = options.showColors || false,\n      onComplete = options.onComplete || function() {},\n      timer = options.timer || noopTimer,\n      specCount,\n      failureCount,\n      failedSpecs = [],\n      pendingCount,\n      ansi = {\n        green: '\\x1B[32m',\n        red: '\\x1B[31m',\n        yellow: '\\x1B[33m',\n        none: '\\x1B[0m'\n      },\n      failedSuites = [];\n\n    print('ConsoleReporter is deprecated and will be removed in a future version.');\n\n    this.jasmineStarted = function() {\n      specCount = 0;\n      failureCount = 0;\n      pendingCount = 0;\n      print('Started');\n      printNewline();\n      timer.start();\n    };\n\n    this.jasmineDone = function() {\n      printNewline();\n      for (var i = 0; i < failedSpecs.length; i++) {\n        specFailureDetails(failedSpecs[i]);\n      }\n\n      if(specCount > 0) {\n        printNewline();\n\n        var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +\n          failureCount + ' ' + plural('failure', failureCount);\n\n        if (pendingCount) {\n          specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);\n        }\n\n        print(specCounts);\n      } else {\n        print('No specs found');\n      }\n\n      printNewline();\n      var seconds = timer.elapsed() / 1000;\n      print('Finished in ' + seconds + ' ' + plural('second', seconds));\n      printNewline();\n\n      for(i = 0; i < failedSuites.length; i++) {\n        suiteFailureDetails(failedSuites[i]);\n      }\n\n      onComplete(failureCount === 0);\n    };\n\n    this.specDone = function(result) {\n      specCount++;\n\n      if (result.status == 'pending') {\n        pendingCount++;\n        print(colored('yellow', '*'));\n        return;\n      }\n\n      if (result.status == 'passed') {\n        print(colored('green', '.'));\n        return;\n      }\n\n      if (result.status == 'failed') {\n        failureCount++;\n        failedSpecs.push(result);\n        print(colored('red', 'F'));\n      }\n    };\n\n    this.suiteDone = function(result) {\n      if (result.failedExpectations && result.failedExpectations.length > 0) {\n        failureCount++;\n        failedSuites.push(result);\n      }\n    };\n\n    return this;\n\n    function printNewline() {\n      print('\\n');\n    }\n\n    function colored(color, str) {\n      return showColors ? (ansi[color] + str + ansi.none) : str;\n    }\n\n    function plural(str, count) {\n      return count == 1 ? str : str + 's';\n    }\n\n    function repeat(thing, times) {\n      var arr = [];\n      for (var i = 0; i < times; i++) {\n        arr.push(thing);\n      }\n      return arr;\n    }\n\n    function indent(str, spaces) {\n      var lines = (str || '').split('\\n');\n      var newArr = [];\n      for (var i = 0; i < lines.length; i++) {\n        newArr.push(repeat(' ', spaces).join('') + lines[i]);\n      }\n      return newArr.join('\\n');\n    }\n\n    function specFailureDetails(result) {\n      printNewline();\n      print(result.fullName);\n\n      for (var i = 0; i < result.failedExpectations.length; i++) {\n        var failedExpectation = result.failedExpectations[i];\n        printNewline();\n        print(indent(failedExpectation.message, 2));\n        print(indent(failedExpectation.stack, 2));\n      }\n\n      printNewline();\n    }\n\n    function suiteFailureDetails(result) {\n      for (var i = 0; i < result.failedExpectations.length; i++) {\n        printNewline();\n        print(colored('red', 'An error was thrown in an afterAll'));\n        printNewline();\n        print(colored('red', 'AfterAll ' + result.failedExpectations[i].message));\n\n      }\n      printNewline();\n    }\n  }\n\n  return ConsoleReporter;\n};\n"
  },
  {
    "path": "tests/lib/jasmine-2.2.0/jasmine-html.js",
    "content": "/*\nCopyright (c) 2008-2015 Pivotal Labs\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\njasmineRequire.html = function(j$) {\n  j$.ResultsNode = jasmineRequire.ResultsNode();\n  j$.HtmlReporter = jasmineRequire.HtmlReporter(j$);\n  j$.QueryString = jasmineRequire.QueryString();\n  j$.HtmlSpecFilter = jasmineRequire.HtmlSpecFilter();\n};\n\njasmineRequire.HtmlReporter = function(j$) {\n\n  var noopTimer = {\n    start: function() {},\n    elapsed: function() { return 0; }\n  };\n\n  function HtmlReporter(options) {\n    var env = options.env || {},\n      getContainer = options.getContainer,\n      createElement = options.createElement,\n      createTextNode = options.createTextNode,\n      onRaiseExceptionsClick = options.onRaiseExceptionsClick || function() {},\n      addToExistingQueryString = options.addToExistingQueryString || defaultQueryString,\n      timer = options.timer || noopTimer,\n      results = [],\n      specsExecuted = 0,\n      failureCount = 0,\n      pendingSpecCount = 0,\n      htmlReporterMain,\n      symbols,\n      failedSuites = [];\n\n    this.initialize = function() {\n      clearPrior();\n      htmlReporterMain = createDom('div', {className: 'jasmine_html-reporter'},\n        createDom('div', {className: 'banner'},\n          createDom('a', {className: 'title', href: 'http://jasmine.github.io/', target: '_blank'}),\n          createDom('span', {className: 'version'}, j$.version)\n        ),\n        createDom('ul', {className: 'symbol-summary'}),\n        createDom('div', {className: 'alert'}),\n        createDom('div', {className: 'results'},\n          createDom('div', {className: 'failures'})\n        )\n      );\n      getContainer().appendChild(htmlReporterMain);\n\n      symbols = find('.symbol-summary');\n    };\n\n    var totalSpecsDefined;\n    this.jasmineStarted = function(options) {\n      totalSpecsDefined = options.totalSpecsDefined || 0;\n      timer.start();\n    };\n\n    var summary = createDom('div', {className: 'summary'});\n\n    var topResults = new j$.ResultsNode({}, '', null),\n      currentParent = topResults;\n\n    this.suiteStarted = function(result) {\n      currentParent.addChild(result, 'suite');\n      currentParent = currentParent.last();\n    };\n\n    this.suiteDone = function(result) {\n      if (result.status == 'failed') {\n        failedSuites.push(result);\n      }\n\n      if (currentParent == topResults) {\n        return;\n      }\n\n      currentParent = currentParent.parent;\n    };\n\n    this.specStarted = function(result) {\n      currentParent.addChild(result, 'spec');\n    };\n\n    var failures = [];\n    this.specDone = function(result) {\n      if(noExpectations(result) && typeof console !== 'undefined' && typeof console.error !== 'undefined') {\n        console.error('Spec \\'' + result.fullName + '\\' has no expectations.');\n      }\n\n      if (result.status != 'disabled') {\n        specsExecuted++;\n      }\n\n      symbols.appendChild(createDom('li', {\n          className: noExpectations(result) ? 'empty' : result.status,\n          id: 'spec_' + result.id,\n          title: result.fullName\n        }\n      ));\n\n      if (result.status == 'failed') {\n        failureCount++;\n\n        var failure =\n          createDom('div', {className: 'spec-detail failed'},\n            createDom('div', {className: 'description'},\n              createDom('a', {title: result.fullName, href: specHref(result)}, result.fullName)\n            ),\n            createDom('div', {className: 'messages'})\n          );\n        var messages = failure.childNodes[1];\n\n        for (var i = 0; i < result.failedExpectations.length; i++) {\n          var expectation = result.failedExpectations[i];\n          messages.appendChild(createDom('div', {className: 'result-message'}, expectation.message));\n          messages.appendChild(createDom('div', {className: 'stack-trace'}, expectation.stack));\n        }\n\n        failures.push(failure);\n      }\n\n      if (result.status == 'pending') {\n        pendingSpecCount++;\n      }\n    };\n\n    this.jasmineDone = function() {\n      var banner = find('.banner');\n      banner.appendChild(createDom('span', {className: 'duration'}, 'finished in ' + timer.elapsed() / 1000 + 's'));\n\n      var alert = find('.alert');\n\n      alert.appendChild(createDom('span', { className: 'exceptions' },\n        createDom('label', { className: 'label', 'for': 'raise-exceptions' }, 'raise exceptions'),\n        createDom('input', {\n          className: 'raise',\n          id: 'raise-exceptions',\n          type: 'checkbox'\n        })\n      ));\n      var checkbox = find('#raise-exceptions');\n\n      checkbox.checked = !env.catchingExceptions();\n      checkbox.onclick = onRaiseExceptionsClick;\n\n      if (specsExecuted < totalSpecsDefined) {\n        var skippedMessage = 'Ran ' + specsExecuted + ' of ' + totalSpecsDefined + ' specs - run all';\n        alert.appendChild(\n          createDom('span', {className: 'bar skipped'},\n            createDom('a', {href: '?', title: 'Run all specs'}, skippedMessage)\n          )\n        );\n      }\n      var statusBarMessage = '';\n      var statusBarClassName = 'bar ';\n\n      if (totalSpecsDefined > 0) {\n        statusBarMessage += pluralize('spec', specsExecuted) + ', ' + pluralize('failure', failureCount);\n        if (pendingSpecCount) { statusBarMessage += ', ' + pluralize('pending spec', pendingSpecCount); }\n        statusBarClassName += (failureCount > 0) ? 'failed' : 'passed';\n      } else {\n        statusBarClassName += 'skipped';\n        statusBarMessage += 'No specs found';\n      }\n\n      alert.appendChild(createDom('span', {className: statusBarClassName}, statusBarMessage));\n\n      for(i = 0; i < failedSuites.length; i++) {\n        var failedSuite = failedSuites[i];\n        for(var j = 0; j < failedSuite.failedExpectations.length; j++) {\n          var errorBarMessage = 'AfterAll ' + failedSuite.failedExpectations[j].message;\n          var errorBarClassName = 'bar errored';\n          alert.appendChild(createDom('span', {className: errorBarClassName}, errorBarMessage));\n        }\n      }\n\n      var results = find('.results');\n      results.appendChild(summary);\n\n      summaryList(topResults, summary);\n\n      function summaryList(resultsTree, domParent) {\n        var specListNode;\n        for (var i = 0; i < resultsTree.children.length; i++) {\n          var resultNode = resultsTree.children[i];\n          if (resultNode.type == 'suite') {\n            var suiteListNode = createDom('ul', {className: 'suite', id: 'suite-' + resultNode.result.id},\n              createDom('li', {className: 'suite-detail'},\n                createDom('a', {href: specHref(resultNode.result)}, resultNode.result.description)\n              )\n            );\n\n            summaryList(resultNode, suiteListNode);\n            domParent.appendChild(suiteListNode);\n          }\n          if (resultNode.type == 'spec') {\n            if (domParent.getAttribute('class') != 'specs') {\n              specListNode = createDom('ul', {className: 'specs'});\n              domParent.appendChild(specListNode);\n            }\n            var specDescription = resultNode.result.description;\n            if(noExpectations(resultNode.result)) {\n              specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;\n            }\n            if(resultNode.result.status === 'pending' && resultNode.result.pendingReason !== '') {\n              specDescription = specDescription + ' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason;\n            }\n            specListNode.appendChild(\n              createDom('li', {\n                  className: resultNode.result.status,\n                  id: 'spec-' + resultNode.result.id\n                },\n                createDom('a', {href: specHref(resultNode.result)}, specDescription)\n              )\n            );\n          }\n        }\n      }\n\n      if (failures.length) {\n        alert.appendChild(\n          createDom('span', {className: 'menu bar spec-list'},\n            createDom('span', {}, 'Spec List | '),\n            createDom('a', {className: 'failures-menu', href: '#'}, 'Failures')));\n        alert.appendChild(\n          createDom('span', {className: 'menu bar failure-list'},\n            createDom('a', {className: 'spec-list-menu', href: '#'}, 'Spec List'),\n            createDom('span', {}, ' | Failures ')));\n\n        find('.failures-menu').onclick = function() {\n          setMenuModeTo('failure-list');\n        };\n        find('.spec-list-menu').onclick = function() {\n          setMenuModeTo('spec-list');\n        };\n\n        setMenuModeTo('failure-list');\n\n        var failureNode = find('.failures');\n        for (var i = 0; i < failures.length; i++) {\n          failureNode.appendChild(failures[i]);\n        }\n      }\n    };\n\n    return this;\n\n    function find(selector) {\n      return getContainer().querySelector('.jasmine_html-reporter ' + selector);\n    }\n\n    function clearPrior() {\n      // return the reporter\n      var oldReporter = find('');\n\n      if(oldReporter) {\n        getContainer().removeChild(oldReporter);\n      }\n    }\n\n    function createDom(type, attrs, childrenVarArgs) {\n      var el = createElement(type);\n\n      for (var i = 2; i < arguments.length; i++) {\n        var child = arguments[i];\n\n        if (typeof child === 'string') {\n          el.appendChild(createTextNode(child));\n        } else {\n          if (child) {\n            el.appendChild(child);\n          }\n        }\n      }\n\n      for (var attr in attrs) {\n        if (attr == 'className') {\n          el[attr] = attrs[attr];\n        } else {\n          el.setAttribute(attr, attrs[attr]);\n        }\n      }\n\n      return el;\n    }\n\n    function pluralize(singular, count) {\n      var word = (count == 1 ? singular : singular + 's');\n\n      return '' + count + ' ' + word;\n    }\n\n    function specHref(result) {\n      return addToExistingQueryString('spec', result.fullName);\n    }\n\n    function defaultQueryString(key, value) {\n      return '?' + key + '=' + value;\n    }\n\n    function setMenuModeTo(mode) {\n      htmlReporterMain.setAttribute('class', 'jasmine_html-reporter ' + mode);\n    }\n\n    function noExpectations(result) {\n      return (result.failedExpectations.length + result.passedExpectations.length) === 0 &&\n        result.status === 'passed';\n    }\n  }\n\n  return HtmlReporter;\n};\n\njasmineRequire.HtmlSpecFilter = function() {\n  function HtmlSpecFilter(options) {\n    var filterString = options && options.filterString() && options.filterString().replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n    var filterPattern = new RegExp(filterString);\n\n    this.matches = function(specName) {\n      return filterPattern.test(specName);\n    };\n  }\n\n  return HtmlSpecFilter;\n};\n\njasmineRequire.ResultsNode = function() {\n  function ResultsNode(result, type, parent) {\n    this.result = result;\n    this.type = type;\n    this.parent = parent;\n\n    this.children = [];\n\n    this.addChild = function(result, type) {\n      this.children.push(new ResultsNode(result, type, this));\n    };\n\n    this.last = function() {\n      return this.children[this.children.length - 1];\n    };\n  }\n\n  return ResultsNode;\n};\n\njasmineRequire.QueryString = function() {\n  function QueryString(options) {\n\n    this.navigateWithNewParam = function(key, value) {\n      options.getWindowLocation().search = this.fullStringWithNewParam(key, value);\n    };\n\n    this.fullStringWithNewParam = function(key, value) {\n      var paramMap = queryStringToParamMap();\n      paramMap[key] = value;\n      return toQueryString(paramMap);\n    };\n\n    this.getParam = function(key) {\n      return queryStringToParamMap()[key];\n    };\n\n    return this;\n\n    function toQueryString(paramMap) {\n      var qStrPairs = [];\n      for (var prop in paramMap) {\n        qStrPairs.push(encodeURIComponent(prop) + '=' + encodeURIComponent(paramMap[prop]));\n      }\n      return '?' + qStrPairs.join('&');\n    }\n\n    function queryStringToParamMap() {\n      var paramStr = options.getWindowLocation().search.substring(1),\n        params = [],\n        paramMap = {};\n\n      if (paramStr.length > 0) {\n        params = paramStr.split('&');\n        for (var i = 0; i < params.length; i++) {\n          var p = params[i].split('=');\n          var value = decodeURIComponent(p[1]);\n          if (value === 'true' || value === 'false') {\n            value = JSON.parse(value);\n          }\n          paramMap[decodeURIComponent(p[0])] = value;\n        }\n      }\n\n      return paramMap;\n    }\n\n  }\n\n  return QueryString;\n};\n"
  },
  {
    "path": "tests/lib/jasmine-2.2.0/jasmine.css",
    "content": "body { overflow-y: scroll; }\n\n.jasmine_html-reporter { background-color: #eee; padding: 5px; margin: -8px; font-size: 11px; font-family: Monaco, \"Lucida Console\", monospace; line-height: 14px; color: #333; }\n.jasmine_html-reporter a { text-decoration: none; }\n.jasmine_html-reporter a:hover { text-decoration: underline; }\n.jasmine_html-reporter p, .jasmine_html-reporter h1, .jasmine_html-reporter h2, .jasmine_html-reporter h3, .jasmine_html-reporter h4, .jasmine_html-reporter h5, .jasmine_html-reporter h6 { margin: 0; line-height: 14px; }\n.jasmine_html-reporter .banner, .jasmine_html-reporter .symbol-summary, .jasmine_html-reporter .summary, .jasmine_html-reporter .result-message, .jasmine_html-reporter .spec .description, .jasmine_html-reporter .spec-detail .description, .jasmine_html-reporter .alert .bar, .jasmine_html-reporter .stack-trace { padding-left: 9px; padding-right: 9px; }\n.jasmine_html-reporter .banner { position: relative; }\n.jasmine_html-reporter .banner .title { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAZCAMAAACGusnyAAACdlBMVEX/////AP+AgICqVaqAQICZM5mAVYCSSZKAQICOOY6ATYCLRouAQICJO4m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aWxsLXJ1bGU6bm9uemVybztzdHJva2U6bm9uZSIgLz48cGF0aAogICAgICAgICAgICAgZD0iTSA2MDcuNDY1LDkwMy40NDUgNDk4Ljg1NSwxMDUyLjk3IDUyOS4zMiwxMDc1LjEgNjM3LjkzLDkyNS41NjYgNjA3LjQ2NSw5MDMuNDQ1IgogICAgICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgICAgIGlkPSJwYXRoNTIiCiAgICAgICAgICAgICBzdHlsZT0iZmlsbDojOGE0MTgyO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIiAvPjxwYXRoCiAgICAgICAgICAgICBkPSJtIDM4MC42ODgsNjIyLjEyOSAtMTEuNjI2LDM1LjgwMSAxNzUuNzU4LDU3LjA5IDExLjYyMSwtMzUuODAxIC0xNzUuNzUzLC01Ny4wOSIKICAgICAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgICAgICBpZD0icGF0aDU0IgogICAgICAgICAgICAgc3R5bGU9ImZpbGw6IzhhNDE4MjtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6bm9uemVybztzdHJva2U6bm9uZSIgLz48cGF0aAogICAgICAgICAgICAgZD0ibSA3MTYuMjg5LDM3Ni41OSAzNy42NDA2LDAgMCwxODQuODE2IC0zNy42NDA2LDAgMCwtMTg0LjgxNiB6IgogICAgICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgICAgIGlkPSJwYXRoNTYiCiAgICAgICAgICAgICBzdHlsZT0iZmlsbDojOGE0MTgyO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIiAvPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4=') no-repeat, none; -moz-background-size: 100%; -o-background-size: 100%; -webkit-background-size: 100%; background-size: 100%; display: block; float: left; width: 90px; height: 25px; }\n.jasmine_html-reporter .banner .version { margin-left: 14px; position: relative; top: 6px; }\n.jasmine_html-reporter .banner .duration { position: absolute; right: 14px; top: 6px; }\n.jasmine_html-reporter #jasmine_content { position: fixed; right: 100%; }\n.jasmine_html-reporter .version { color: #aaa; }\n.jasmine_html-reporter .banner { margin-top: 14px; }\n.jasmine_html-reporter .duration { color: #aaa; float: right; }\n.jasmine_html-reporter .symbol-summary { overflow: hidden; *zoom: 1; margin: 14px 0; }\n.jasmine_html-reporter .symbol-summary li { display: inline-block; height: 8px; width: 14px; font-size: 16px; }\n.jasmine_html-reporter .symbol-summary li.passed { font-size: 14px; }\n.jasmine_html-reporter .symbol-summary li.passed:before { color: #007069; content: \"\\02022\"; }\n.jasmine_html-reporter .symbol-summary li.failed { line-height: 9px; }\n.jasmine_html-reporter .symbol-summary li.failed:before { color: #ca3a11; content: \"\\d7\"; font-weight: bold; margin-left: -1px; }\n.jasmine_html-reporter .symbol-summary li.disabled { font-size: 14px; }\n.jasmine_html-reporter .symbol-summary li.disabled:before { color: #bababa; content: \"\\02022\"; }\n.jasmine_html-reporter .symbol-summary li.pending { line-height: 17px; }\n.jasmine_html-reporter .symbol-summary li.pending:before { color: #ba9d37; content: \"*\"; }\n.jasmine_html-reporter .symbol-summary li.empty { font-size: 14px; }\n.jasmine_html-reporter .symbol-summary li.empty:before { color: #ba9d37; content: \"\\02022\"; }\n.jasmine_html-reporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; }\n.jasmine_html-reporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }\n.jasmine_html-reporter .bar.failed { background-color: #ca3a11; }\n.jasmine_html-reporter .bar.passed { background-color: #007069; }\n.jasmine_html-reporter .bar.skipped { background-color: #bababa; }\n.jasmine_html-reporter .bar.errored { background-color: #ca3a11; }\n.jasmine_html-reporter .bar.menu { background-color: #fff; color: #aaa; }\n.jasmine_html-reporter .bar.menu a { color: #333; }\n.jasmine_html-reporter .bar a { color: white; }\n.jasmine_html-reporter.spec-list .bar.menu.failure-list, .jasmine_html-reporter.spec-list .results .failures { display: none; }\n.jasmine_html-reporter.failure-list .bar.menu.spec-list, .jasmine_html-reporter.failure-list .summary { display: none; }\n.jasmine_html-reporter .running-alert { background-color: #666; }\n.jasmine_html-reporter .results { margin-top: 14px; }\n.jasmine_html-reporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; }\n.jasmine_html-reporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }\n.jasmine_html-reporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; }\n.jasmine_html-reporter.showDetails .summary { display: none; }\n.jasmine_html-reporter.showDetails #details { display: block; }\n.jasmine_html-reporter .summaryMenuItem { font-weight: bold; text-decoration: underline; }\n.jasmine_html-reporter .summary { margin-top: 14px; }\n.jasmine_html-reporter .summary ul { list-style-type: none; margin-left: 14px; padding-top: 0; padding-left: 0; }\n.jasmine_html-reporter .summary ul.suite { margin-top: 7px; margin-bottom: 7px; }\n.jasmine_html-reporter .summary li.passed a { color: #007069; }\n.jasmine_html-reporter .summary li.failed a { color: #ca3a11; }\n.jasmine_html-reporter .summary li.empty a { color: #ba9d37; }\n.jasmine_html-reporter .summary li.pending a { color: #ba9d37; }\n.jasmine_html-reporter .description + .suite { margin-top: 0; }\n.jasmine_html-reporter .suite { margin-top: 14px; }\n.jasmine_html-reporter .suite a { color: #333; }\n.jasmine_html-reporter .failures .spec-detail { margin-bottom: 28px; }\n.jasmine_html-reporter .failures .spec-detail .description { background-color: #ca3a11; }\n.jasmine_html-reporter .failures .spec-detail .description a { color: white; }\n.jasmine_html-reporter .result-message { padding-top: 14px; color: #333; white-space: pre; }\n.jasmine_html-reporter .result-message span.result { display: block; }\n.jasmine_html-reporter .stack-trace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666; border: 1px solid #ddd; background: white; white-space: pre; }\n"
  },
  {
    "path": "tests/lib/jasmine-2.2.0/jasmine.js",
    "content": "/*\nCopyright (c) 2008-2015 Pivotal Labs\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\nvar getJasmineRequireObj = (function (jasmineGlobal) {\n  var jasmineRequire;\n\n  if (typeof module !== 'undefined' && module.exports) {\n    jasmineGlobal = global;\n    jasmineRequire = exports;\n  } else {\n    if (typeof window !== 'undefined' && typeof window.toString === 'function' && window.toString() === '[object GjsGlobal]') {\n      jasmineGlobal = window;\n    }\n    jasmineRequire = jasmineGlobal.jasmineRequire = jasmineGlobal.jasmineRequire || {};\n  }\n\n  function getJasmineRequire() {\n    return jasmineRequire;\n  }\n\n  getJasmineRequire().core = function(jRequire) {\n    var j$ = {};\n\n    jRequire.base(j$, jasmineGlobal);\n    j$.util = jRequire.util();\n    j$.Any = jRequire.Any();\n    j$.Anything = jRequire.Anything(j$);\n    j$.CallTracker = jRequire.CallTracker();\n    j$.MockDate = jRequire.MockDate();\n    j$.Clock = jRequire.Clock();\n    j$.DelayedFunctionScheduler = jRequire.DelayedFunctionScheduler();\n    j$.Env = jRequire.Env(j$);\n    j$.ExceptionFormatter = jRequire.ExceptionFormatter();\n    j$.Expectation = jRequire.Expectation();\n    j$.buildExpectationResult = jRequire.buildExpectationResult();\n    j$.JsApiReporter = jRequire.JsApiReporter();\n    j$.matchersUtil = jRequire.matchersUtil(j$);\n    j$.ObjectContaining = jRequire.ObjectContaining(j$);\n    j$.ArrayContaining = jRequire.ArrayContaining(j$);\n    j$.pp = jRequire.pp(j$);\n    j$.QueueRunner = jRequire.QueueRunner(j$);\n    j$.ReportDispatcher = jRequire.ReportDispatcher();\n    j$.Spec = jRequire.Spec(j$);\n    j$.SpyRegistry = jRequire.SpyRegistry(j$);\n    j$.SpyStrategy = jRequire.SpyStrategy();\n    j$.StringMatching = jRequire.StringMatching(j$);\n    j$.Suite = jRequire.Suite();\n    j$.Timer = jRequire.Timer();\n    j$.version = jRequire.version();\n\n    j$.matchers = jRequire.requireMatchers(jRequire, j$);\n\n    return j$;\n  };\n\n  return getJasmineRequire;\n})(this);\n\ngetJasmineRequireObj().requireMatchers = function(jRequire, j$) {\n  var availableMatchers = [\n      'toBe',\n      'toBeCloseTo',\n      'toBeDefined',\n      'toBeFalsy',\n      'toBeGreaterThan',\n      'toBeLessThan',\n      'toBeNaN',\n      'toBeNull',\n      'toBeTruthy',\n      'toBeUndefined',\n      'toContain',\n      'toEqual',\n      'toHaveBeenCalled',\n      'toHaveBeenCalledWith',\n      'toMatch',\n      'toThrow',\n      'toThrowError'\n    ],\n    matchers = {};\n\n  for (var i = 0; i < availableMatchers.length; i++) {\n    var name = availableMatchers[i];\n    matchers[name] = jRequire[name](j$);\n  }\n\n  return matchers;\n};\n\ngetJasmineRequireObj().base = function(j$, jasmineGlobal) {\n  j$.unimplementedMethod_ = function() {\n    throw new Error('unimplemented method');\n  };\n\n  j$.MAX_PRETTY_PRINT_DEPTH = 40;\n  j$.MAX_PRETTY_PRINT_ARRAY_LENGTH = 100;\n  j$.DEFAULT_TIMEOUT_INTERVAL = 5000;\n\n  j$.getGlobal = function() {\n    return jasmineGlobal;\n  };\n\n  j$.getEnv = function(options) {\n    var env = j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options);\n    //jasmine. singletons in here (setTimeout blah blah).\n    return env;\n  };\n\n  j$.isArray_ = function(value) {\n    return j$.isA_('Array', value);\n  };\n\n  j$.isString_ = function(value) {\n    return j$.isA_('String', value);\n  };\n\n  j$.isNumber_ = function(value) {\n    return j$.isA_('Number', value);\n  };\n\n  j$.isA_ = function(typeName, value) {\n    return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';\n  };\n\n  j$.isDomNode = function(obj) {\n    return obj.nodeType > 0;\n  };\n\n  j$.fnNameFor = function(func) {\n    return func.name || func.toString().match(/^\\s*function\\s*(\\w*)\\s*\\(/)[1];\n  };\n\n  j$.any = function(clazz) {\n    return new j$.Any(clazz);\n  };\n\n  j$.anything = function() {\n    return new j$.Anything();\n  };\n\n  j$.objectContaining = function(sample) {\n    return new j$.ObjectContaining(sample);\n  };\n\n  j$.stringMatching = function(expected) {\n    return new j$.StringMatching(expected);\n  };\n\n  j$.arrayContaining = function(sample) {\n    return new j$.ArrayContaining(sample);\n  };\n\n  j$.createSpy = function(name, originalFn) {\n\n    var spyStrategy = new j$.SpyStrategy({\n        name: name,\n        fn: originalFn,\n        getSpy: function() { return spy; }\n      }),\n      callTracker = new j$.CallTracker(),\n      spy = function() {\n        var callData = {\n          object: this,\n          args: Array.prototype.slice.apply(arguments)\n        };\n\n        callTracker.track(callData);\n        var returnValue = spyStrategy.exec.apply(this, arguments);\n        callData.returnValue = returnValue;\n\n        return returnValue;\n      };\n\n    for (var prop in originalFn) {\n      if (prop === 'and' || prop === 'calls') {\n        throw new Error('Jasmine spies would overwrite the \\'and\\' and \\'calls\\' properties on the object being spied upon');\n      }\n\n      spy[prop] = originalFn[prop];\n    }\n\n    spy.and = spyStrategy;\n    spy.calls = callTracker;\n\n    return spy;\n  };\n\n  j$.isSpy = function(putativeSpy) {\n    if (!putativeSpy) {\n      return false;\n    }\n    return putativeSpy.and instanceof j$.SpyStrategy &&\n      putativeSpy.calls instanceof j$.CallTracker;\n  };\n\n  j$.createSpyObj = function(baseName, methodNames) {\n    if (j$.isArray_(baseName) && j$.util.isUndefined(methodNames)) {\n      methodNames = baseName;\n      baseName = 'unknown';\n    }\n\n    if (!j$.isArray_(methodNames) || methodNames.length === 0) {\n      throw 'createSpyObj requires a non-empty array of method names to create spies for';\n    }\n    var obj = {};\n    for (var i = 0; i < methodNames.length; i++) {\n      obj[methodNames[i]] = j$.createSpy(baseName + '.' + methodNames[i]);\n    }\n    return obj;\n  };\n};\n\ngetJasmineRequireObj().util = function() {\n\n  var util = {};\n\n  util.inherit = function(childClass, parentClass) {\n    var Subclass = function() {\n    };\n    Subclass.prototype = parentClass.prototype;\n    childClass.prototype = new Subclass();\n  };\n\n  util.htmlEscape = function(str) {\n    if (!str) {\n      return str;\n    }\n    return str.replace(/&/g, '&amp;')\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;');\n  };\n\n  util.argsToArray = function(args) {\n    var arrayOfArgs = [];\n    for (var i = 0; i < args.length; i++) {\n      arrayOfArgs.push(args[i]);\n    }\n    return arrayOfArgs;\n  };\n\n  util.isUndefined = function(obj) {\n    return obj === void 0;\n  };\n\n  util.arrayContains = function(array, search) {\n    var i = array.length;\n    while (i--) {\n      if (array[i] === search) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  util.clone = function(obj) {\n    if (Object.prototype.toString.apply(obj) === '[object Array]') {\n      return obj.slice();\n    }\n\n    var cloned = {};\n    for (var prop in obj) {\n      if (obj.hasOwnProperty(prop)) {\n        cloned[prop] = obj[prop];\n      }\n    }\n\n    return cloned;\n  };\n\n  return util;\n};\n\ngetJasmineRequireObj().Spec = function(j$) {\n  function Spec(attrs) {\n    this.expectationFactory = attrs.expectationFactory;\n    this.resultCallback = attrs.resultCallback || function() {};\n    this.id = attrs.id;\n    this.description = attrs.description || '';\n    this.queueableFn = attrs.queueableFn;\n    this.beforeAndAfterFns = attrs.beforeAndAfterFns || function() { return {befores: [], afters: []}; };\n    this.userContext = attrs.userContext || function() { return {}; };\n    this.onStart = attrs.onStart || function() {};\n    this.getSpecName = attrs.getSpecName || function() { return ''; };\n    this.expectationResultFactory = attrs.expectationResultFactory || function() { };\n    this.queueRunnerFactory = attrs.queueRunnerFactory || function() {};\n    this.catchingExceptions = attrs.catchingExceptions || function() { return true; };\n\n    if (!this.queueableFn.fn) {\n      this.pend();\n    }\n\n    this.result = {\n      id: this.id,\n      description: this.description,\n      fullName: this.getFullName(),\n      failedExpectations: [],\n      passedExpectations: [],\n      pendingReason: ''\n    };\n  }\n\n  Spec.prototype.addExpectationResult = function(passed, data) {\n    var expectationResult = this.expectationResultFactory(data);\n    if (passed) {\n      this.result.passedExpectations.push(expectationResult);\n    } else {\n      this.result.failedExpectations.push(expectationResult);\n    }\n  };\n\n  Spec.prototype.expect = function(actual) {\n    return this.expectationFactory(actual, this);\n  };\n\n  Spec.prototype.execute = function(onComplete) {\n    var self = this;\n\n    this.onStart(this);\n\n    if (this.markedPending || this.disabled) {\n      complete();\n      return;\n    }\n\n    var fns = this.beforeAndAfterFns();\n    var allFns = fns.befores.concat(this.queueableFn).concat(fns.afters);\n\n    this.queueRunnerFactory({\n      queueableFns: allFns,\n      onException: function() { self.onException.apply(self, arguments); },\n      onComplete: complete,\n      userContext: this.userContext()\n    });\n\n    function complete() {\n      self.result.status = self.status();\n      self.resultCallback(self.result);\n\n      if (onComplete) {\n        onComplete();\n      }\n    }\n  };\n\n  Spec.prototype.onException = function onException(e) {\n    if (Spec.isPendingSpecException(e)) {\n      this.pend(extractCustomPendingMessage(e));\n      return;\n    }\n\n    this.addExpectationResult(false, {\n      matcherName: '',\n      passed: false,\n      expected: '',\n      actual: '',\n      error: e\n    });\n  };\n\n  Spec.prototype.disable = function() {\n    this.disabled = true;\n  };\n\n  Spec.prototype.pend = function(message) {\n    this.markedPending = true;\n    if (message) {\n      this.result.pendingReason = message;\n    }\n  };\n\n  Spec.prototype.status = function() {\n    if (this.disabled) {\n      return 'disabled';\n    }\n\n    if (this.markedPending) {\n      return 'pending';\n    }\n\n    if (this.result.failedExpectations.length > 0) {\n      return 'failed';\n    } else {\n      return 'passed';\n    }\n  };\n\n  Spec.prototype.isExecutable = function() {\n    return !this.disabled && !this.markedPending;\n  };\n\n  Spec.prototype.getFullName = function() {\n    return this.getSpecName(this);\n  };\n\n  var extractCustomPendingMessage = function(e) {\n    var fullMessage = e.toString(),\n        boilerplateStart = fullMessage.indexOf(Spec.pendingSpecExceptionMessage),\n        boilerplateEnd = boilerplateStart + Spec.pendingSpecExceptionMessage.length;\n\n    return fullMessage.substr(boilerplateEnd);\n  };\n\n  Spec.pendingSpecExceptionMessage = '=> marked Pending';\n\n  Spec.isPendingSpecException = function(e) {\n    return !!(e && e.toString && e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1);\n  };\n\n  return Spec;\n};\n\nif (typeof window == void 0 && typeof exports == 'object') {\n  exports.Spec = jasmineRequire.Spec;\n}\n\ngetJasmineRequireObj().Env = function(j$) {\n  function Env(options) {\n    options = options || {};\n\n    var self = this;\n    var global = options.global || j$.getGlobal();\n\n    var totalSpecsDefined = 0;\n\n    var catchExceptions = true;\n\n    var realSetTimeout = j$.getGlobal().setTimeout;\n    var realClearTimeout = j$.getGlobal().clearTimeout;\n    this.clock = new j$.Clock(global, new j$.DelayedFunctionScheduler(), new j$.MockDate(global));\n\n    var runnableLookupTable = {};\n    var runnableResources = {};\n\n    var currentSpec = null;\n    var currentlyExecutingSuites = [];\n    var currentDeclarationSuite = null;\n\n    var currentSuite = function() {\n      return currentlyExecutingSuites[currentlyExecutingSuites.length - 1];\n    };\n\n    var currentRunnable = function() {\n      return currentSpec || currentSuite();\n    };\n\n    var reporter = new j$.ReportDispatcher([\n      'jasmineStarted',\n      'jasmineDone',\n      'suiteStarted',\n      'suiteDone',\n      'specStarted',\n      'specDone'\n    ]);\n\n    this.specFilter = function() {\n      return true;\n    };\n\n    this.addCustomEqualityTester = function(tester) {\n      if(!currentRunnable()) {\n        throw new Error('Custom Equalities must be added in a before function or a spec');\n      }\n      runnableResources[currentRunnable().id].customEqualityTesters.push(tester);\n    };\n\n    this.addMatchers = function(matchersToAdd) {\n      if(!currentRunnable()) {\n        throw new Error('Matchers must be added in a before function or a spec');\n      }\n      var customMatchers = runnableResources[currentRunnable().id].customMatchers;\n      for (var matcherName in matchersToAdd) {\n        customMatchers[matcherName] = matchersToAdd[matcherName];\n      }\n    };\n\n    j$.Expectation.addCoreMatchers(j$.matchers);\n\n    var nextSpecId = 0;\n    var getNextSpecId = function() {\n      return 'spec' + nextSpecId++;\n    };\n\n    var nextSuiteId = 0;\n    var getNextSuiteId = function() {\n      return 'suite' + nextSuiteId++;\n    };\n\n    var expectationFactory = function(actual, spec) {\n      return j$.Expectation.Factory({\n        util: j$.matchersUtil,\n        customEqualityTesters: runnableResources[spec.id].customEqualityTesters,\n        customMatchers: runnableResources[spec.id].customMatchers,\n        actual: actual,\n        addExpectationResult: addExpectationResult\n      });\n\n      function addExpectationResult(passed, result) {\n        return spec.addExpectationResult(passed, result);\n      }\n    };\n\n    var defaultResourcesForRunnable = function(id, parentRunnableId) {\n      var resources = {spies: [], customEqualityTesters: [], customMatchers: {}};\n\n      if(runnableResources[parentRunnableId]){\n        resources.customEqualityTesters = j$.util.clone(runnableResources[parentRunnableId].customEqualityTesters);\n        resources.customMatchers = j$.util.clone(runnableResources[parentRunnableId].customMatchers);\n      }\n\n      runnableResources[id] = resources;\n    };\n\n    var clearResourcesForRunnable = function(id) {\n        spyRegistry.clearSpies();\n        delete runnableResources[id];\n    };\n\n    var beforeAndAfterFns = function(suite, runnablesExplictlySet) {\n      return function() {\n        var befores = [],\n          afters = [],\n          beforeAlls = [],\n          afterAlls = [];\n\n        while(suite) {\n          befores = befores.concat(suite.beforeFns);\n          afters = afters.concat(suite.afterFns);\n\n          if (runnablesExplictlySet()) {\n            beforeAlls = beforeAlls.concat(suite.beforeAllFns);\n            afterAlls = afterAlls.concat(suite.afterAllFns);\n          }\n\n          suite = suite.parentSuite;\n        }\n        return {\n          befores: beforeAlls.reverse().concat(befores.reverse()),\n          afters: afters.concat(afterAlls)\n        };\n      };\n    };\n\n    var getSpecName = function(spec, suite) {\n      return suite.getFullName() + ' ' + spec.description;\n    };\n\n    // TODO: we may just be able to pass in the fn instead of wrapping here\n    var buildExpectationResult = j$.buildExpectationResult,\n        exceptionFormatter = new j$.ExceptionFormatter(),\n        expectationResultFactory = function(attrs) {\n          attrs.messageFormatter = exceptionFormatter.message;\n          attrs.stackFormatter = exceptionFormatter.stack;\n\n          return buildExpectationResult(attrs);\n        };\n\n    // TODO: fix this naming, and here's where the value comes in\n    this.catchExceptions = function(value) {\n      catchExceptions = !!value;\n      return catchExceptions;\n    };\n\n    this.catchingExceptions = function() {\n      return catchExceptions;\n    };\n\n    var maximumSpecCallbackDepth = 20;\n    var currentSpecCallbackDepth = 0;\n\n    function clearStack(fn) {\n      currentSpecCallbackDepth++;\n      if (currentSpecCallbackDepth >= maximumSpecCallbackDepth) {\n        currentSpecCallbackDepth = 0;\n        realSetTimeout(fn, 0);\n      } else {\n        fn();\n      }\n    }\n\n    var catchException = function(e) {\n      return j$.Spec.isPendingSpecException(e) || catchExceptions;\n    };\n\n    var queueRunnerFactory = function(options) {\n      options.catchException = catchException;\n      options.clearStack = options.clearStack || clearStack;\n      options.timer = {setTimeout: realSetTimeout, clearTimeout: realClearTimeout};\n      options.fail = self.fail;\n\n      new j$.QueueRunner(options).execute();\n    };\n\n    var topSuite = new j$.Suite({\n      env: this,\n      id: getNextSuiteId(),\n      description: 'Jasmine__TopLevel__Suite',\n      queueRunner: queueRunnerFactory\n    });\n    runnableLookupTable[topSuite.id] = topSuite;\n    defaultResourcesForRunnable(topSuite.id);\n    currentDeclarationSuite = topSuite;\n\n    this.topSuite = function() {\n      return topSuite;\n    };\n\n    this.execute = function(runnablesToRun) {\n      if(runnablesToRun) {\n        runnablesExplictlySet = true;\n      } else if (focusedRunnables.length) {\n        runnablesExplictlySet = true;\n        runnablesToRun = focusedRunnables;\n      } else {\n        runnablesToRun = [topSuite.id];\n      }\n\n      var allFns = [];\n      for(var i = 0; i < runnablesToRun.length; i++) {\n        var runnable = runnableLookupTable[runnablesToRun[i]];\n        allFns.push((function(runnable) { return { fn: function(done) { runnable.execute(done); } }; })(runnable));\n      }\n\n      reporter.jasmineStarted({\n        totalSpecsDefined: totalSpecsDefined\n      });\n\n      queueRunnerFactory({queueableFns: allFns, onComplete: reporter.jasmineDone});\n    };\n\n    this.addReporter = function(reporterToAdd) {\n      reporter.addReporter(reporterToAdd);\n    };\n\n    var spyRegistry = new j$.SpyRegistry({currentSpies: function() {\n      if(!currentRunnable()) {\n        throw new Error('Spies must be created in a before function or a spec');\n      }\n      return runnableResources[currentRunnable().id].spies;\n    }});\n\n    this.spyOn = function() {\n      return spyRegistry.spyOn.apply(spyRegistry, arguments);\n    };\n\n    var suiteFactory = function(description) {\n      var suite = new j$.Suite({\n        env: self,\n        id: getNextSuiteId(),\n        description: description,\n        parentSuite: currentDeclarationSuite,\n        queueRunner: queueRunnerFactory,\n        onStart: suiteStarted,\n        expectationFactory: expectationFactory,\n        expectationResultFactory: expectationResultFactory,\n        runnablesExplictlySetGetter: runnablesExplictlySetGetter,\n        resultCallback: function(attrs) {\n          if (!suite.disabled) {\n            clearResourcesForRunnable(suite.id);\n          }\n          currentlyExecutingSuites.pop();\n          reporter.suiteDone(attrs);\n        }\n      });\n\n      runnableLookupTable[suite.id] = suite;\n      return suite;\n\n      function suiteStarted(suite) {\n        currentlyExecutingSuites.push(suite);\n        defaultResourcesForRunnable(suite.id, suite.parentSuite.id);\n        reporter.suiteStarted(suite.result);\n      }\n    };\n\n    this.describe = function(description, specDefinitions) {\n      var suite = suiteFactory(description);\n      addSpecsToSuite(suite, specDefinitions);\n      return suite;\n    };\n\n    this.xdescribe = function(description, specDefinitions) {\n      var suite = this.describe(description, specDefinitions);\n      suite.disable();\n      return suite;\n    };\n\n    var focusedRunnables = [];\n\n    this.fdescribe = function(description, specDefinitions) {\n      var suite = suiteFactory(description);\n      suite.isFocused = true;\n\n      focusedRunnables.push(suite.id);\n      unfocusAncestor();\n      addSpecsToSuite(suite, specDefinitions);\n\n      return suite;\n    };\n\n    function addSpecsToSuite(suite, specDefinitions) {\n      var parentSuite = currentDeclarationSuite;\n      parentSuite.addChild(suite);\n      currentDeclarationSuite = suite;\n\n      var declarationError = null;\n      try {\n        specDefinitions.call(suite);\n      } catch (e) {\n        declarationError = e;\n      }\n\n      if (declarationError) {\n        self.it('encountered a declaration exception', function() {\n          throw declarationError;\n        });\n      }\n\n      currentDeclarationSuite = parentSuite;\n    }\n\n    function findFocusedAncestor(suite) {\n      while (suite) {\n        if (suite.isFocused) {\n          return suite.id;\n        }\n        suite = suite.parentSuite;\n      }\n\n      return null;\n    }\n\n    function unfocusAncestor() {\n      var focusedAncestor = findFocusedAncestor(currentDeclarationSuite);\n      if (focusedAncestor) {\n        for (var i = 0; i < focusedRunnables.length; i++) {\n          if (focusedRunnables[i] === focusedAncestor) {\n            focusedRunnables.splice(i, 1);\n            break;\n          }\n        }\n      }\n    }\n\n    var runnablesExplictlySet = false;\n\n    var runnablesExplictlySetGetter = function(){\n      return runnablesExplictlySet;\n    };\n\n    var specFactory = function(description, fn, suite, timeout) {\n      totalSpecsDefined++;\n      var spec = new j$.Spec({\n        id: getNextSpecId(),\n        beforeAndAfterFns: beforeAndAfterFns(suite, runnablesExplictlySetGetter),\n        expectationFactory: expectationFactory,\n        resultCallback: specResultCallback,\n        getSpecName: function(spec) {\n          return getSpecName(spec, suite);\n        },\n        onStart: specStarted,\n        description: description,\n        expectationResultFactory: expectationResultFactory,\n        queueRunnerFactory: queueRunnerFactory,\n        userContext: function() { return suite.clonedSharedUserContext(); },\n        queueableFn: {\n          fn: fn,\n          timeout: function() { return timeout || j$.DEFAULT_TIMEOUT_INTERVAL; }\n        }\n      });\n\n      runnableLookupTable[spec.id] = spec;\n\n      if (!self.specFilter(spec)) {\n        spec.disable();\n      }\n\n      return spec;\n\n      function specResultCallback(result) {\n        clearResourcesForRunnable(spec.id);\n        currentSpec = null;\n        reporter.specDone(result);\n      }\n\n      function specStarted(spec) {\n        currentSpec = spec;\n        defaultResourcesForRunnable(spec.id, suite.id);\n        reporter.specStarted(spec.result);\n      }\n    };\n\n    this.it = function(description, fn, timeout) {\n      var spec = specFactory(description, fn, currentDeclarationSuite, timeout);\n      currentDeclarationSuite.addChild(spec);\n      return spec;\n    };\n\n    this.xit = function() {\n      var spec = this.it.apply(this, arguments);\n      spec.pend();\n      return spec;\n    };\n\n    this.fit = function(){\n      var spec = this.it.apply(this, arguments);\n\n      focusedRunnables.push(spec.id);\n      unfocusAncestor();\n      return spec;\n    };\n\n    this.expect = function(actual) {\n      if (!currentRunnable()) {\n        throw new Error('\\'expect\\' was used when there was no current spec, this could be because an asynchronous test timed out');\n      }\n\n      return currentRunnable().expect(actual);\n    };\n\n    this.beforeEach = function(beforeEachFunction, timeout) {\n      currentDeclarationSuite.beforeEach({\n        fn: beforeEachFunction,\n        timeout: function() { return timeout || j$.DEFAULT_TIMEOUT_INTERVAL; }\n      });\n    };\n\n    this.beforeAll = function(beforeAllFunction, timeout) {\n      currentDeclarationSuite.beforeAll({\n        fn: beforeAllFunction,\n        timeout: function() { return timeout || j$.DEFAULT_TIMEOUT_INTERVAL; }\n      });\n    };\n\n    this.afterEach = function(afterEachFunction, timeout) {\n      currentDeclarationSuite.afterEach({\n        fn: afterEachFunction,\n        timeout: function() { return timeout || j$.DEFAULT_TIMEOUT_INTERVAL; }\n      });\n    };\n\n    this.afterAll = function(afterAllFunction, timeout) {\n      currentDeclarationSuite.afterAll({\n        fn: afterAllFunction,\n        timeout: function() { return timeout || j$.DEFAULT_TIMEOUT_INTERVAL; }\n      });\n    };\n\n    this.pending = function(message) {\n      var fullMessage = j$.Spec.pendingSpecExceptionMessage;\n      if(message) {\n        fullMessage += message;\n      }\n      throw fullMessage;\n    };\n\n    this.fail = function(error) {\n      var message = 'Failed';\n      if (error) {\n        message += ': ';\n        message += error.message || error;\n      }\n\n      currentRunnable().addExpectationResult(false, {\n        matcherName: '',\n        passed: false,\n        expected: '',\n        actual: '',\n        message: message,\n        error: error && error.message ? error : null\n      });\n    };\n  }\n\n  return Env;\n};\n\ngetJasmineRequireObj().JsApiReporter = function() {\n\n  var noopTimer = {\n    start: function(){},\n    elapsed: function(){ return 0; }\n  };\n\n  function JsApiReporter(options) {\n    var timer = options.timer || noopTimer,\n        status = 'loaded';\n\n    this.started = false;\n    this.finished = false;\n\n    this.jasmineStarted = function() {\n      this.started = true;\n      status = 'started';\n      timer.start();\n    };\n\n    var executionTime;\n\n    this.jasmineDone = function() {\n      this.finished = true;\n      executionTime = timer.elapsed();\n      status = 'done';\n    };\n\n    this.status = function() {\n      return status;\n    };\n\n    var suites = [],\n      suites_hash = {};\n\n    this.suiteStarted = function(result) {\n      suites_hash[result.id] = result;\n    };\n\n    this.suiteDone = function(result) {\n      storeSuite(result);\n    };\n\n    this.suiteResults = function(index, length) {\n      return suites.slice(index, index + length);\n    };\n\n    function storeSuite(result) {\n      suites.push(result);\n      suites_hash[result.id] = result;\n    }\n\n    this.suites = function() {\n      return suites_hash;\n    };\n\n    var specs = [];\n\n    this.specDone = function(result) {\n      specs.push(result);\n    };\n\n    this.specResults = function(index, length) {\n      return specs.slice(index, index + length);\n    };\n\n    this.specs = function() {\n      return specs;\n    };\n\n    this.executionTime = function() {\n      return executionTime;\n    };\n\n  }\n\n  return JsApiReporter;\n};\n\ngetJasmineRequireObj().CallTracker = function() {\n\n  function CallTracker() {\n    var calls = [];\n\n    this.track = function(context) {\n      calls.push(context);\n    };\n\n    this.any = function() {\n      return !!calls.length;\n    };\n\n    this.count = function() {\n      return calls.length;\n    };\n\n    this.argsFor = function(index) {\n      var call = calls[index];\n      return call ? call.args : [];\n    };\n\n    this.all = function() {\n      return calls;\n    };\n\n    this.allArgs = function() {\n      var callArgs = [];\n      for(var i = 0; i < calls.length; i++){\n        callArgs.push(calls[i].args);\n      }\n\n      return callArgs;\n    };\n\n    this.first = function() {\n      return calls[0];\n    };\n\n    this.mostRecent = function() {\n      return calls[calls.length - 1];\n    };\n\n    this.reset = function() {\n      calls = [];\n    };\n  }\n\n  return CallTracker;\n};\n\ngetJasmineRequireObj().Clock = function() {\n  function Clock(global, delayedFunctionScheduler, mockDate) {\n    var self = this,\n      realTimingFunctions = {\n        setTimeout: global.setTimeout,\n        clearTimeout: global.clearTimeout,\n        setInterval: global.setInterval,\n        clearInterval: global.clearInterval\n      },\n      fakeTimingFunctions = {\n        setTimeout: setTimeout,\n        clearTimeout: clearTimeout,\n        setInterval: setInterval,\n        clearInterval: clearInterval\n      },\n      installed = false,\n      timer;\n\n\n    self.install = function() {\n      replace(global, fakeTimingFunctions);\n      timer = fakeTimingFunctions;\n      installed = true;\n\n      return self;\n    };\n\n    self.uninstall = function() {\n      delayedFunctionScheduler.reset();\n      mockDate.uninstall();\n      replace(global, realTimingFunctions);\n\n      timer = realTimingFunctions;\n      installed = false;\n    };\n\n    self.mockDate = function(initialDate) {\n      mockDate.install(initialDate);\n    };\n\n    self.setTimeout = function(fn, delay, params) {\n      if (legacyIE()) {\n        if (arguments.length > 2) {\n          throw new Error('IE < 9 cannot support extra params to setTimeout without a polyfill');\n        }\n        return timer.setTimeout(fn, delay);\n      }\n      return Function.prototype.apply.apply(timer.setTimeout, [global, arguments]);\n    };\n\n    self.setInterval = function(fn, delay, params) {\n      if (legacyIE()) {\n        if (arguments.length > 2) {\n          throw new Error('IE < 9 cannot support extra params to setInterval without a polyfill');\n        }\n        return timer.setInterval(fn, delay);\n      }\n      return Function.prototype.apply.apply(timer.setInterval, [global, arguments]);\n    };\n\n    self.clearTimeout = function(id) {\n      return Function.prototype.call.apply(timer.clearTimeout, [global, id]);\n    };\n\n    self.clearInterval = function(id) {\n      return Function.prototype.call.apply(timer.clearInterval, [global, id]);\n    };\n\n    self.tick = function(millis) {\n      if (installed) {\n        mockDate.tick(millis);\n        delayedFunctionScheduler.tick(millis);\n      } else {\n        throw new Error('Mock clock is not installed, use jasmine.clock().install()');\n      }\n    };\n\n    return self;\n\n    function legacyIE() {\n      //if these methods are polyfilled, apply will be present\n      return !(realTimingFunctions.setTimeout || realTimingFunctions.setInterval).apply;\n    }\n\n    function replace(dest, source) {\n      for (var prop in source) {\n        dest[prop] = source[prop];\n      }\n    }\n\n    function setTimeout(fn, delay) {\n      return delayedFunctionScheduler.scheduleFunction(fn, delay, argSlice(arguments, 2));\n    }\n\n    function clearTimeout(id) {\n      return delayedFunctionScheduler.removeFunctionWithId(id);\n    }\n\n    function setInterval(fn, interval) {\n      return delayedFunctionScheduler.scheduleFunction(fn, interval, argSlice(arguments, 2), true);\n    }\n\n    function clearInterval(id) {\n      return delayedFunctionScheduler.removeFunctionWithId(id);\n    }\n\n    function argSlice(argsObj, n) {\n      return Array.prototype.slice.call(argsObj, n);\n    }\n  }\n\n  return Clock;\n};\n\ngetJasmineRequireObj().DelayedFunctionScheduler = function() {\n  function DelayedFunctionScheduler() {\n    var self = this;\n    var scheduledLookup = [];\n    var scheduledFunctions = {};\n    var currentTime = 0;\n    var delayedFnCount = 0;\n\n    self.tick = function(millis) {\n      millis = millis || 0;\n      var endTime = currentTime + millis;\n\n      runScheduledFunctions(endTime);\n      currentTime = endTime;\n    };\n\n    self.scheduleFunction = function(funcToCall, millis, params, recurring, timeoutKey, runAtMillis) {\n      var f;\n      if (typeof(funcToCall) === 'string') {\n        /* jshint evil: true */\n        f = function() { return eval(funcToCall); };\n        /* jshint evil: false */\n      } else {\n        f = funcToCall;\n      }\n\n      millis = millis || 0;\n      timeoutKey = timeoutKey || ++delayedFnCount;\n      runAtMillis = runAtMillis || (currentTime + millis);\n\n      var funcToSchedule = {\n        runAtMillis: runAtMillis,\n        funcToCall: f,\n        recurring: recurring,\n        params: params,\n        timeoutKey: timeoutKey,\n        millis: millis\n      };\n\n      if (runAtMillis in scheduledFunctions) {\n        scheduledFunctions[runAtMillis].push(funcToSchedule);\n      } else {\n        scheduledFunctions[runAtMillis] = [funcToSchedule];\n        scheduledLookup.push(runAtMillis);\n        scheduledLookup.sort(function (a, b) {\n          return a - b;\n        });\n      }\n\n      return timeoutKey;\n    };\n\n    self.removeFunctionWithId = function(timeoutKey) {\n      for (var runAtMillis in scheduledFunctions) {\n        var funcs = scheduledFunctions[runAtMillis];\n        var i = indexOfFirstToPass(funcs, function (func) {\n          return func.timeoutKey === timeoutKey;\n        });\n\n        if (i > -1) {\n          if (funcs.length === 1) {\n            delete scheduledFunctions[runAtMillis];\n            deleteFromLookup(runAtMillis);\n          } else {\n            funcs.splice(i, 1);\n          }\n\n          // intervals get rescheduled when executed, so there's never more\n          // than a single scheduled function with a given timeoutKey\n          break;\n        }\n      }\n    };\n\n    self.reset = function() {\n      currentTime = 0;\n      scheduledLookup = [];\n      scheduledFunctions = {};\n      delayedFnCount = 0;\n    };\n\n    return self;\n\n    function indexOfFirstToPass(array, testFn) {\n      var index = -1;\n\n      for (var i = 0; i < array.length; ++i) {\n        if (testFn(array[i])) {\n          index = i;\n          break;\n        }\n      }\n\n      return index;\n    }\n\n    function deleteFromLookup(key) {\n      var value = Number(key);\n      var i = indexOfFirstToPass(scheduledLookup, function (millis) {\n        return millis === value;\n      });\n\n      if (i > -1) {\n        scheduledLookup.splice(i, 1);\n      }\n    }\n\n    function reschedule(scheduledFn) {\n      self.scheduleFunction(scheduledFn.funcToCall,\n        scheduledFn.millis,\n        scheduledFn.params,\n        true,\n        scheduledFn.timeoutKey,\n        scheduledFn.runAtMillis + scheduledFn.millis);\n    }\n\n    function forEachFunction(funcsToRun, callback) {\n      for (var i = 0; i < funcsToRun.length; ++i) {\n        callback(funcsToRun[i]);\n      }\n    }\n\n    function runScheduledFunctions(endTime) {\n      if (scheduledLookup.length === 0 || scheduledLookup[0] > endTime) {\n        return;\n      }\n\n      do {\n        currentTime = scheduledLookup.shift();\n\n        var funcsToRun = scheduledFunctions[currentTime];\n        delete scheduledFunctions[currentTime];\n\n        forEachFunction(funcsToRun, function(funcToRun) {\n          if (funcToRun.recurring) {\n            reschedule(funcToRun);\n          }\n        });\n\n        forEachFunction(funcsToRun, function(funcToRun) {\n          funcToRun.funcToCall.apply(null, funcToRun.params || []);\n        });\n      } while (scheduledLookup.length > 0 &&\n              // checking first if we're out of time prevents setTimeout(0)\n              // scheduled in a funcToRun from forcing an extra iteration\n                 currentTime !== endTime  &&\n                 scheduledLookup[0] <= endTime);\n    }\n  }\n\n  return DelayedFunctionScheduler;\n};\n\ngetJasmineRequireObj().ExceptionFormatter = function() {\n  function ExceptionFormatter() {\n    this.message = function(error) {\n      var message = '';\n\n      if (error.name && error.message) {\n        message += error.name + ': ' + error.message;\n      } else {\n        message += error.toString() + ' thrown';\n      }\n\n      if (error.fileName || error.sourceURL) {\n        message += ' in ' + (error.fileName || error.sourceURL);\n      }\n\n      if (error.line || error.lineNumber) {\n        message += ' (line ' + (error.line || error.lineNumber) + ')';\n      }\n\n      return message;\n    };\n\n    this.stack = function(error) {\n      return error ? error.stack : null;\n    };\n  }\n\n  return ExceptionFormatter;\n};\n\ngetJasmineRequireObj().Expectation = function() {\n\n  function Expectation(options) {\n    this.util = options.util || { buildFailureMessage: function() {} };\n    this.customEqualityTesters = options.customEqualityTesters || [];\n    this.actual = options.actual;\n    this.addExpectationResult = options.addExpectationResult || function(){};\n    this.isNot = options.isNot;\n\n    var customMatchers = options.customMatchers || {};\n    for (var matcherName in customMatchers) {\n      this[matcherName] = Expectation.prototype.wrapCompare(matcherName, customMatchers[matcherName]);\n    }\n  }\n\n  Expectation.prototype.wrapCompare = function(name, matcherFactory) {\n    return function() {\n      var args = Array.prototype.slice.call(arguments, 0),\n        expected = args.slice(0),\n        message = '';\n\n      args.unshift(this.actual);\n\n      var matcher = matcherFactory(this.util, this.customEqualityTesters),\n          matcherCompare = matcher.compare;\n\n      function defaultNegativeCompare() {\n        var result = matcher.compare.apply(null, args);\n        result.pass = !result.pass;\n        return result;\n      }\n\n      if (this.isNot) {\n        matcherCompare = matcher.negativeCompare || defaultNegativeCompare;\n      }\n\n      var result = matcherCompare.apply(null, args);\n\n      if (!result.pass) {\n        if (!result.message) {\n          args.unshift(this.isNot);\n          args.unshift(name);\n          message = this.util.buildFailureMessage.apply(null, args);\n        } else {\n          if (Object.prototype.toString.apply(result.message) === '[object Function]') {\n            message = result.message();\n          } else {\n            message = result.message;\n          }\n        }\n      }\n\n      if (expected.length == 1) {\n        expected = expected[0];\n      }\n\n      // TODO: how many of these params are needed?\n      this.addExpectationResult(\n        result.pass,\n        {\n          matcherName: name,\n          passed: result.pass,\n          message: message,\n          actual: this.actual,\n          expected: expected // TODO: this may need to be arrayified/sliced\n        }\n      );\n    };\n  };\n\n  Expectation.addCoreMatchers = function(matchers) {\n    var prototype = Expectation.prototype;\n    for (var matcherName in matchers) {\n      var matcher = matchers[matcherName];\n      prototype[matcherName] = prototype.wrapCompare(matcherName, matcher);\n    }\n  };\n\n  Expectation.Factory = function(options) {\n    options = options || {};\n\n    var expect = new Expectation(options);\n\n    // TODO: this would be nice as its own Object - NegativeExpectation\n    // TODO: copy instead of mutate options\n    options.isNot = true;\n    expect.not = new Expectation(options);\n\n    return expect;\n  };\n\n  return Expectation;\n};\n\n//TODO: expectation result may make more sense as a presentation of an expectation.\ngetJasmineRequireObj().buildExpectationResult = function() {\n  function buildExpectationResult(options) {\n    var messageFormatter = options.messageFormatter || function() {},\n      stackFormatter = options.stackFormatter || function() {};\n\n    var result = {\n      matcherName: options.matcherName,\n      message: message(),\n      stack: stack(),\n      passed: options.passed\n    };\n\n    if(!result.passed) {\n      result.expected = options.expected;\n      result.actual = options.actual;\n    }\n\n    return result;\n\n    function message() {\n      if (options.passed) {\n        return 'Passed.';\n      } else if (options.message) {\n        return options.message;\n      } else if (options.error) {\n        return messageFormatter(options.error);\n      }\n      return '';\n    }\n\n    function stack() {\n      if (options.passed) {\n        return '';\n      }\n\n      var error = options.error;\n      if (!error) {\n        try {\n          throw new Error(message());\n        } catch (e) {\n          error = e;\n        }\n      }\n      return stackFormatter(error);\n    }\n  }\n\n  return buildExpectationResult;\n};\n\ngetJasmineRequireObj().MockDate = function() {\n  function MockDate(global) {\n    var self = this;\n    var currentTime = 0;\n\n    if (!global || !global.Date) {\n      self.install = function() {};\n      self.tick = function() {};\n      self.uninstall = function() {};\n      return self;\n    }\n\n    var GlobalDate = global.Date;\n\n    self.install = function(mockDate) {\n      if (mockDate instanceof GlobalDate) {\n        currentTime = mockDate.getTime();\n      } else {\n        currentTime = new GlobalDate().getTime();\n      }\n\n      global.Date = FakeDate;\n    };\n\n    self.tick = function(millis) {\n      millis = millis || 0;\n      currentTime = currentTime + millis;\n    };\n\n    self.uninstall = function() {\n      currentTime = 0;\n      global.Date = GlobalDate;\n    };\n\n    createDateProperties();\n\n    return self;\n\n    function FakeDate() {\n      switch(arguments.length) {\n        case 0:\n          return new GlobalDate(currentTime);\n        case 1:\n          return new GlobalDate(arguments[0]);\n        case 2:\n          return new GlobalDate(arguments[0], arguments[1]);\n        case 3:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2]);\n        case 4:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3]);\n        case 5:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],\n                                arguments[4]);\n        case 6:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],\n                                arguments[4], arguments[5]);\n        default:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],\n                                arguments[4], arguments[5], arguments[6]);\n      }\n    }\n\n    function createDateProperties() {\n      FakeDate.prototype = GlobalDate.prototype;\n\n      FakeDate.now = function() {\n        if (GlobalDate.now) {\n          return currentTime;\n        } else {\n          throw new Error('Browser does not support Date.now()');\n        }\n      };\n\n      FakeDate.toSource = GlobalDate.toSource;\n      FakeDate.toString = GlobalDate.toString;\n      FakeDate.parse = GlobalDate.parse;\n      FakeDate.UTC = GlobalDate.UTC;\n    }\n\t}\n\n  return MockDate;\n};\n\ngetJasmineRequireObj().pp = function(j$) {\n\n  function PrettyPrinter() {\n    this.ppNestLevel_ = 0;\n    this.seen = [];\n  }\n\n  PrettyPrinter.prototype.format = function(value) {\n    this.ppNestLevel_++;\n    try {\n      if (j$.util.isUndefined(value)) {\n        this.emitScalar('undefined');\n      } else if (value === null) {\n        this.emitScalar('null');\n      } else if (value === 0 && 1/value === -Infinity) {\n        this.emitScalar('-0');\n      } else if (value === j$.getGlobal()) {\n        this.emitScalar('<global>');\n      } else if (value.jasmineToString) {\n        this.emitScalar(value.jasmineToString());\n      } else if (typeof value === 'string') {\n        this.emitString(value);\n      } else if (j$.isSpy(value)) {\n        this.emitScalar('spy on ' + value.and.identity());\n      } else if (value instanceof RegExp) {\n        this.emitScalar(value.toString());\n      } else if (typeof value === 'function') {\n        this.emitScalar('Function');\n      } else if (typeof value.nodeType === 'number') {\n        this.emitScalar('HTMLNode');\n      } else if (value instanceof Date) {\n        this.emitScalar('Date(' + value + ')');\n      } else if (j$.util.arrayContains(this.seen, value)) {\n        this.emitScalar('<circular reference: ' + (j$.isArray_(value) ? 'Array' : 'Object') + '>');\n      } else if (j$.isArray_(value) || j$.isA_('Object', value)) {\n        this.seen.push(value);\n        if (j$.isArray_(value)) {\n          this.emitArray(value);\n        } else {\n          this.emitObject(value);\n        }\n        this.seen.pop();\n      } else {\n        this.emitScalar(value.toString());\n      }\n    } finally {\n      this.ppNestLevel_--;\n    }\n  };\n\n  PrettyPrinter.prototype.iterateObject = function(obj, fn) {\n    for (var property in obj) {\n      if (!Object.prototype.hasOwnProperty.call(obj, property)) { continue; }\n      fn(property, obj.__lookupGetter__ ? (!j$.util.isUndefined(obj.__lookupGetter__(property)) &&\n          obj.__lookupGetter__(property) !== null) : false);\n    }\n  };\n\n  PrettyPrinter.prototype.emitArray = j$.unimplementedMethod_;\n  PrettyPrinter.prototype.emitObject = j$.unimplementedMethod_;\n  PrettyPrinter.prototype.emitScalar = j$.unimplementedMethod_;\n  PrettyPrinter.prototype.emitString = j$.unimplementedMethod_;\n\n  function StringPrettyPrinter() {\n    PrettyPrinter.call(this);\n\n    this.string = '';\n  }\n\n  j$.util.inherit(StringPrettyPrinter, PrettyPrinter);\n\n  StringPrettyPrinter.prototype.emitScalar = function(value) {\n    this.append(value);\n  };\n\n  StringPrettyPrinter.prototype.emitString = function(value) {\n    this.append('\\'' + value + '\\'');\n  };\n\n  StringPrettyPrinter.prototype.emitArray = function(array) {\n    if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {\n      this.append('Array');\n      return;\n    }\n    var length = Math.min(array.length, j$.MAX_PRETTY_PRINT_ARRAY_LENGTH);\n    this.append('[ ');\n    for (var i = 0; i < length; i++) {\n      if (i > 0) {\n        this.append(', ');\n      }\n      this.format(array[i]);\n    }\n    if(array.length > length){\n      this.append(', ...');\n    }\n    this.append(' ]');\n  };\n\n  StringPrettyPrinter.prototype.emitObject = function(obj) {\n    var constructorName = obj.constructor ? j$.fnNameFor(obj.constructor) : 'null';\n    this.append(constructorName);\n\n    if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {\n      return;\n    }\n\n    var self = this;\n    this.append('({ ');\n    var first = true;\n\n    this.iterateObject(obj, function(property, isGetter) {\n      if (first) {\n        first = false;\n      } else {\n        self.append(', ');\n      }\n\n      self.append(property);\n      self.append(': ');\n      if (isGetter) {\n        self.append('<getter>');\n      } else {\n        self.format(obj[property]);\n      }\n    });\n\n    this.append(' })');\n  };\n\n  StringPrettyPrinter.prototype.append = function(value) {\n    this.string += value;\n  };\n\n  return function(value) {\n    var stringPrettyPrinter = new StringPrettyPrinter();\n    stringPrettyPrinter.format(value);\n    return stringPrettyPrinter.string;\n  };\n};\n\ngetJasmineRequireObj().QueueRunner = function(j$) {\n\n  function once(fn) {\n    var called = false;\n    return function() {\n      if (!called) {\n        called = true;\n        fn();\n      }\n    };\n  }\n\n  function QueueRunner(attrs) {\n    this.queueableFns = attrs.queueableFns || [];\n    this.onComplete = attrs.onComplete || function() {};\n    this.clearStack = attrs.clearStack || function(fn) {fn();};\n    this.onException = attrs.onException || function() {};\n    this.catchException = attrs.catchException || function() { return true; };\n    this.userContext = attrs.userContext || {};\n    this.timer = attrs.timeout || {setTimeout: setTimeout, clearTimeout: clearTimeout};\n    this.fail = attrs.fail || function() {};\n  }\n\n  QueueRunner.prototype.execute = function() {\n    this.run(this.queueableFns, 0);\n  };\n\n  QueueRunner.prototype.run = function(queueableFns, recursiveIndex) {\n    var length = queueableFns.length,\n      self = this,\n      iterativeIndex;\n\n\n    for(iterativeIndex = recursiveIndex; iterativeIndex < length; iterativeIndex++) {\n      var queueableFn = queueableFns[iterativeIndex];\n      if (queueableFn.fn.length > 0) {\n        attemptAsync(queueableFn);\n        return;\n      } else {\n        attemptSync(queueableFn);\n      }\n    }\n\n    var runnerDone = iterativeIndex >= length;\n\n    if (runnerDone) {\n      this.clearStack(this.onComplete);\n    }\n\n    function attemptSync(queueableFn) {\n      try {\n        queueableFn.fn.call(self.userContext);\n      } catch (e) {\n        handleException(e, queueableFn);\n      }\n    }\n\n    function attemptAsync(queueableFn) {\n      var clearTimeout = function () {\n          Function.prototype.apply.apply(self.timer.clearTimeout, [j$.getGlobal(), [timeoutId]]);\n        },\n        next = once(function () {\n          clearTimeout(timeoutId);\n          self.run(queueableFns, iterativeIndex + 1);\n        }),\n        timeoutId;\n\n      next.fail = function() {\n        self.fail.apply(null, arguments);\n        next();\n      };\n\n      if (queueableFn.timeout) {\n        timeoutId = Function.prototype.apply.apply(self.timer.setTimeout, [j$.getGlobal(), [function() {\n          var error = new Error('Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.');\n          onException(error, queueableFn);\n          next();\n        }, queueableFn.timeout()]]);\n      }\n\n      try {\n        queueableFn.fn.call(self.userContext, next);\n      } catch (e) {\n        handleException(e, queueableFn);\n        next();\n      }\n    }\n\n    function onException(e, queueableFn) {\n      self.onException(e);\n    }\n\n    function handleException(e, queueableFn) {\n      onException(e, queueableFn);\n      if (!self.catchException(e)) {\n        //TODO: set a var when we catch an exception and\n        //use a finally block to close the loop in a nice way..\n        throw e;\n      }\n    }\n  };\n\n  return QueueRunner;\n};\n\ngetJasmineRequireObj().ReportDispatcher = function() {\n  function ReportDispatcher(methods) {\n\n    var dispatchedMethods = methods || [];\n\n    for (var i = 0; i < dispatchedMethods.length; i++) {\n      var method = dispatchedMethods[i];\n      this[method] = (function(m) {\n        return function() {\n          dispatch(m, arguments);\n        };\n      }(method));\n    }\n\n    var reporters = [];\n\n    this.addReporter = function(reporter) {\n      reporters.push(reporter);\n    };\n\n    return this;\n\n    function dispatch(method, args) {\n      for (var i = 0; i < reporters.length; i++) {\n        var reporter = reporters[i];\n        if (reporter[method]) {\n          reporter[method].apply(reporter, args);\n        }\n      }\n    }\n  }\n\n  return ReportDispatcher;\n};\n\n\ngetJasmineRequireObj().SpyRegistry = function(j$) {\n\n  function SpyRegistry(options) {\n    options = options || {};\n    var currentSpies = options.currentSpies || function() { return []; };\n\n    this.spyOn = function(obj, methodName) {\n      if (j$.util.isUndefined(obj)) {\n        throw new Error('spyOn could not find an object to spy upon for ' + methodName + '()');\n      }\n\n      if (j$.util.isUndefined(methodName)) {\n        throw new Error('No method name supplied');\n      }\n\n      if (j$.util.isUndefined(obj[methodName])) {\n        throw new Error(methodName + '() method does not exist');\n      }\n\n      if (obj[methodName] && j$.isSpy(obj[methodName])) {\n        //TODO?: should this return the current spy? Downside: may cause user confusion about spy state\n        throw new Error(methodName + ' has already been spied upon');\n      }\n\n      var spy = j$.createSpy(methodName, obj[methodName]);\n\n      currentSpies().push({\n        spy: spy,\n        baseObj: obj,\n        methodName: methodName,\n        originalValue: obj[methodName]\n      });\n\n      obj[methodName] = spy;\n\n      return spy;\n    };\n\n    this.clearSpies = function() {\n      var spies = currentSpies();\n      for (var i = 0; i < spies.length; i++) {\n        var spyEntry = spies[i];\n        spyEntry.baseObj[spyEntry.methodName] = spyEntry.originalValue;\n      }\n    };\n  }\n\n  return SpyRegistry;\n};\n\ngetJasmineRequireObj().SpyStrategy = function() {\n\n  function SpyStrategy(options) {\n    options = options || {};\n\n    var identity = options.name || 'unknown',\n        originalFn = options.fn || function() {},\n        getSpy = options.getSpy || function() {},\n        plan = function() {};\n\n    this.identity = function() {\n      return identity;\n    };\n\n    this.exec = function() {\n      return plan.apply(this, arguments);\n    };\n\n    this.callThrough = function() {\n      plan = originalFn;\n      return getSpy();\n    };\n\n    this.returnValue = function(value) {\n      plan = function() {\n        return value;\n      };\n      return getSpy();\n    };\n\n    this.returnValues = function() {\n      var values = Array.prototype.slice.call(arguments);\n      plan = function () {\n        return values.shift();\n      };\n      return getSpy();\n    };\n\n    this.throwError = function(something) {\n      var error = (something instanceof Error) ? something : new Error(something);\n      plan = function() {\n        throw error;\n      };\n      return getSpy();\n    };\n\n    this.callFake = function(fn) {\n      plan = fn;\n      return getSpy();\n    };\n\n    this.stub = function(fn) {\n      plan = function() {};\n      return getSpy();\n    };\n  }\n\n  return SpyStrategy;\n};\n\ngetJasmineRequireObj().Suite = function() {\n  function Suite(attrs) {\n    this.env = attrs.env;\n    this.id = attrs.id;\n    this.parentSuite = attrs.parentSuite;\n    this.description = attrs.description;\n    this.onStart = attrs.onStart || function() {};\n    this.resultCallback = attrs.resultCallback || function() {};\n    this.clearStack = attrs.clearStack || function(fn) {fn();};\n    this.expectationFactory = attrs.expectationFactory;\n    this.expectationResultFactory = attrs.expectationResultFactory;\n    this.runnablesExplictlySetGetter = attrs.runnablesExplictlySetGetter || function() {};\n\n    this.beforeFns = [];\n    this.afterFns = [];\n    this.beforeAllFns = [];\n    this.afterAllFns = [];\n    this.queueRunner = attrs.queueRunner || function() {};\n    this.disabled = false;\n\n    this.children = [];\n\n    this.result = {\n      id: this.id,\n      description: this.description,\n      fullName: this.getFullName(),\n      failedExpectations: []\n    };\n  }\n\n  Suite.prototype.expect = function(actual) {\n    return this.expectationFactory(actual, this);\n  };\n\n  Suite.prototype.getFullName = function() {\n    var fullName = this.description;\n    for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {\n      if (parentSuite.parentSuite) {\n        fullName = parentSuite.description + ' ' + fullName;\n      }\n    }\n    return fullName;\n  };\n\n  Suite.prototype.disable = function() {\n    this.disabled = true;\n  };\n\n  Suite.prototype.beforeEach = function(fn) {\n    this.beforeFns.unshift(fn);\n  };\n\n  Suite.prototype.beforeAll = function(fn) {\n    this.beforeAllFns.push(fn);\n  };\n\n  Suite.prototype.afterEach = function(fn) {\n    this.afterFns.unshift(fn);\n  };\n\n  Suite.prototype.afterAll = function(fn) {\n    this.afterAllFns.push(fn);\n  };\n\n  Suite.prototype.addChild = function(child) {\n    this.children.push(child);\n  };\n\n  Suite.prototype.status = function() {\n    if (this.disabled) {\n      return 'disabled';\n    }\n\n    if (this.result.failedExpectations.length > 0) {\n      return 'failed';\n    } else {\n      return 'finished';\n    }\n  };\n\n  Suite.prototype.execute = function(onComplete) {\n    var self = this;\n\n    this.onStart(this);\n\n    if (this.disabled) {\n      complete();\n      return;\n    }\n\n    var allFns = [];\n\n    for (var i = 0; i < this.children.length; i++) {\n      allFns.push(wrapChildAsAsync(this.children[i]));\n    }\n\n    if (this.isExecutable()) {\n      allFns = this.beforeAllFns.concat(allFns);\n      allFns = allFns.concat(this.afterAllFns);\n    }\n\n    this.queueRunner({\n      queueableFns: allFns,\n      onComplete: complete,\n      userContext: this.sharedUserContext(),\n      onException: function() { self.onException.apply(self, arguments); }\n    });\n\n    function complete() {\n      self.result.status = self.status();\n      self.resultCallback(self.result);\n\n      if (onComplete) {\n        onComplete();\n      }\n    }\n\n    function wrapChildAsAsync(child) {\n      return { fn: function(done) { child.execute(done); } };\n    }\n  };\n\n  Suite.prototype.isExecutable = function() {\n    var runnablesExplicitlySet = this.runnablesExplictlySetGetter();\n    return !runnablesExplicitlySet && hasExecutableChild(this.children);\n  };\n\n  Suite.prototype.sharedUserContext = function() {\n    if (!this.sharedContext) {\n      this.sharedContext = this.parentSuite ? clone(this.parentSuite.sharedUserContext()) : {};\n    }\n\n    return this.sharedContext;\n  };\n\n  Suite.prototype.clonedSharedUserContext = function() {\n    return clone(this.sharedUserContext());\n  };\n\n  Suite.prototype.onException = function() {\n    if(isAfterAll(this.children)) {\n      var data = {\n        matcherName: '',\n        passed: false,\n        expected: '',\n        actual: '',\n        error: arguments[0]\n      };\n      this.result.failedExpectations.push(this.expectationResultFactory(data));\n    } else {\n      for (var i = 0; i < this.children.length; i++) {\n        var child = this.children[i];\n        child.onException.apply(child, arguments);\n      }\n    }\n  };\n\n  Suite.prototype.addExpectationResult = function () {\n    if(isAfterAll(this.children) && isFailure(arguments)){\n      var data = arguments[1];\n      this.result.failedExpectations.push(this.expectationResultFactory(data));\n    } else {\n      for (var i = 0; i < this.children.length; i++) {\n        var child = this.children[i];\n        child.addExpectationResult.apply(child, arguments);\n      }\n    }\n  };\n\n  function isAfterAll(children) {\n    return children && children[0].result.status;\n  }\n\n  function isFailure(args) {\n    return !args[0];\n  }\n\n  function hasExecutableChild(children) {\n    var foundActive = false;\n    for (var i = 0; i < children.length; i++) {\n      if (children[i].isExecutable()) {\n        foundActive = true;\n        break;\n      }\n    }\n    return foundActive;\n  }\n\n  function clone(obj) {\n    var clonedObj = {};\n    for (var prop in obj) {\n      if (obj.hasOwnProperty(prop)) {\n        clonedObj[prop] = obj[prop];\n      }\n    }\n\n    return clonedObj;\n  }\n\n  return Suite;\n};\n\nif (typeof window == void 0 && typeof exports == 'object') {\n  exports.Suite = jasmineRequire.Suite;\n}\n\ngetJasmineRequireObj().Timer = function() {\n  var defaultNow = (function(Date) {\n    return function() { return new Date().getTime(); };\n  })(Date);\n\n  function Timer(options) {\n    options = options || {};\n\n    var now = options.now || defaultNow,\n      startTime;\n\n    this.start = function() {\n      startTime = now();\n    };\n\n    this.elapsed = function() {\n      return now() - startTime;\n    };\n  }\n\n  return Timer;\n};\n\ngetJasmineRequireObj().Any = function() {\n\n  function Any(expectedObject) {\n    this.expectedObject = expectedObject;\n  }\n\n  Any.prototype.asymmetricMatch = function(other) {\n    if (this.expectedObject == String) {\n      return typeof other == 'string' || other instanceof String;\n    }\n\n    if (this.expectedObject == Number) {\n      return typeof other == 'number' || other instanceof Number;\n    }\n\n    if (this.expectedObject == Function) {\n      return typeof other == 'function' || other instanceof Function;\n    }\n\n    if (this.expectedObject == Object) {\n      return typeof other == 'object';\n    }\n\n    if (this.expectedObject == Boolean) {\n      return typeof other == 'boolean';\n    }\n\n    return other instanceof this.expectedObject;\n  };\n\n  Any.prototype.jasmineToString = function() {\n    return '<jasmine.any(' + this.expectedObject + ')>';\n  };\n\n  return Any;\n};\n\ngetJasmineRequireObj().Anything = function(j$) {\n\n  function Anything() {}\n\n  Anything.prototype.asymmetricMatch = function(other) {\n    return !j$.util.isUndefined(other) && other !== null;\n  };\n\n  Anything.prototype.jasmineToString = function() {\n    return '<jasmine.anything>';\n  };\n\n  return Anything;\n};\n\ngetJasmineRequireObj().ArrayContaining = function(j$) {\n  function ArrayContaining(sample) {\n    this.sample = sample;\n  }\n\n  ArrayContaining.prototype.asymmetricMatch = function(other) {\n    var className = Object.prototype.toString.call(this.sample);\n    if (className !== '[object Array]') { throw new Error('You must provide an array to arrayContaining, not \\'' + this.sample + '\\'.'); }\n\n    for (var i = 0; i < this.sample.length; i++) {\n      var item = this.sample[i];\n      if (!j$.matchersUtil.contains(other, item)) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n  ArrayContaining.prototype.jasmineToString = function () {\n    return '<jasmine.arrayContaining(' + jasmine.pp(this.sample) +')>';\n  };\n\n  return ArrayContaining;\n};\n\ngetJasmineRequireObj().ObjectContaining = function(j$) {\n\n  function ObjectContaining(sample) {\n    this.sample = sample;\n  }\n\n  ObjectContaining.prototype.asymmetricMatch = function(other) {\n    if (typeof(this.sample) !== 'object') { throw new Error('You must provide an object to objectContaining, not \\''+this.sample+'\\'.'); }\n\n    for (var property in this.sample) {\n      if (!Object.prototype.hasOwnProperty.call(other, property) ||\n          !j$.matchersUtil.equals(this.sample[property], other[property])) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n  ObjectContaining.prototype.jasmineToString = function() {\n    return '<jasmine.objectContaining(' + j$.pp(this.sample) + ')>';\n  };\n\n  return ObjectContaining;\n};\n\ngetJasmineRequireObj().StringMatching = function(j$) {\n\n  function StringMatching(expected) {\n    if (!j$.isString_(expected) && !j$.isA_('RegExp', expected)) {\n      throw new Error('Expected is not a String or a RegExp');\n    }\n\n    this.regexp = new RegExp(expected);\n  }\n\n  StringMatching.prototype.asymmetricMatch = function(other) {\n    return this.regexp.test(other);\n  };\n\n  StringMatching.prototype.jasmineToString = function() {\n    return '<jasmine.stringMatching(' + this.regexp + ')>';\n  };\n\n  return StringMatching;\n};\n\ngetJasmineRequireObj().matchersUtil = function(j$) {\n  // TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter?\n\n  return {\n    equals: function(a, b, customTesters) {\n      customTesters = customTesters || [];\n\n      return eq(a, b, [], [], customTesters);\n    },\n\n    contains: function(haystack, needle, customTesters) {\n      customTesters = customTesters || [];\n\n      if ((Object.prototype.toString.apply(haystack) === '[object Array]') ||\n        (!!haystack && !haystack.indexOf))\n      {\n        for (var i = 0; i < haystack.length; i++) {\n          if (eq(haystack[i], needle, [], [], customTesters)) {\n            return true;\n          }\n        }\n        return false;\n      }\n\n      return !!haystack && haystack.indexOf(needle) >= 0;\n    },\n\n    buildFailureMessage: function() {\n      var args = Array.prototype.slice.call(arguments, 0),\n        matcherName = args[0],\n        isNot = args[1],\n        actual = args[2],\n        expected = args.slice(3),\n        englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });\n\n      var message = 'Expected ' +\n        j$.pp(actual) +\n        (isNot ? ' not ' : ' ') +\n        englishyPredicate;\n\n      if (expected.length > 0) {\n        for (var i = 0; i < expected.length; i++) {\n          if (i > 0) {\n            message += ',';\n          }\n          message += ' ' + j$.pp(expected[i]);\n        }\n      }\n\n      return message + '.';\n    }\n  };\n\n  function isAsymmetric(obj) {\n    return obj && j$.isA_('Function', obj.asymmetricMatch);\n  }\n\n  function asymmetricMatch(a, b) {\n    var asymmetricA = isAsymmetric(a),\n        asymmetricB = isAsymmetric(b);\n\n    if (asymmetricA && asymmetricB) {\n      return undefined;\n    }\n\n    if (asymmetricA) {\n      return a.asymmetricMatch(b);\n    }\n\n    if (asymmetricB) {\n      return b.asymmetricMatch(a);\n    }\n  }\n\n  // Equality function lovingly adapted from isEqual in\n  //   [Underscore](http://underscorejs.org)\n  function eq(a, b, aStack, bStack, customTesters) {\n    var result = true;\n\n    var asymmetricResult = asymmetricMatch(a, b);\n    if (!j$.util.isUndefined(asymmetricResult)) {\n      return asymmetricResult;\n    }\n\n    for (var i = 0; i < customTesters.length; i++) {\n      var customTesterResult = customTesters[i](a, b);\n      if (!j$.util.isUndefined(customTesterResult)) {\n        return customTesterResult;\n      }\n    }\n\n    if (a instanceof Error && b instanceof Error) {\n      return a.message == b.message;\n    }\n\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n    if (a === b) { return a !== 0 || 1 / a == 1 / b; }\n    // A strict comparison is necessary because `null == undefined`.\n    if (a === null || b === null) { return a === b; }\n    var className = Object.prototype.toString.call(a);\n    if (className != Object.prototype.toString.call(b)) { return false; }\n    switch (className) {\n      // Strings, numbers, dates, and booleans are compared by value.\n      case '[object String]':\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n        // equivalent to `new String(\"5\")`.\n        return a == String(b);\n      case '[object Number]':\n        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n        // other numeric values.\n        return a != +a ? b != +b : (a === 0 ? 1 / a == 1 / b : a == +b);\n      case '[object Date]':\n      case '[object Boolean]':\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n        // millisecond representations. Note that invalid dates with millisecond representations\n        // of `NaN` are not equivalent.\n        return +a == +b;\n      // RegExps are compared by their source patterns and flags.\n      case '[object RegExp]':\n        return a.source == b.source &&\n          a.global == b.global &&\n          a.multiline == b.multiline &&\n          a.ignoreCase == b.ignoreCase;\n    }\n    if (typeof a != 'object' || typeof b != 'object') { return false; }\n\n    var aIsDomNode = j$.isDomNode(a);\n    var bIsDomNode = j$.isDomNode(b);\n    if (aIsDomNode && bIsDomNode) {\n      // At first try to use DOM3 method isEqualNode\n      if (a.isEqualNode) {\n        return a.isEqualNode(b);\n      }\n      // IE8 doesn't support isEqualNode, try to use outerHTML && innerText\n      var aIsElement = a instanceof Element;\n      var bIsElement = b instanceof Element;\n      if (aIsElement && bIsElement) {\n        return a.outerHTML == b.outerHTML;\n      }\n      if (aIsElement || bIsElement) {\n        return false;\n      }\n      return a.innerText == b.innerText && a.textContent == b.textContent;\n    }\n    if (aIsDomNode || bIsDomNode) {\n      return false;\n    }\n\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n    var length = aStack.length;\n    while (length--) {\n      // Linear search. Performance is inversely proportional to the number of\n      // unique nested structures.\n      if (aStack[length] == a) { return bStack[length] == b; }\n    }\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a);\n    bStack.push(b);\n    var size = 0;\n    // Recursively compare objects and arrays.\n    // Compare array lengths to determine if a deep comparison is necessary.\n    if (className == '[object Array]' && a.length !== b.length) {\n      result = false;\n    }\n\n    if (result) {\n      // Objects with different constructors are not equivalent, but `Object`s\n      // from different frames are.\n      var aCtor = a.constructor, bCtor = b.constructor;\n      if (aCtor !== bCtor && !(isFunction(aCtor) && (aCtor instanceof aCtor) &&\n        isFunction(bCtor) && (bCtor instanceof bCtor))) {\n        return false;\n      }\n      // Deep compare objects.\n      for (var key in a) {\n        if (has(a, key)) {\n          // Count the expected number of properties.\n          size++;\n          // Deep compare each member.\n          if (!(result = has(b, key) && eq(a[key], b[key], aStack, bStack, customTesters))) { break; }\n        }\n      }\n      // Ensure that both objects contain the same number of properties.\n      if (result) {\n        for (key in b) {\n          if (has(b, key) && !(size--)) { break; }\n        }\n        result = !size;\n      }\n    }\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop();\n    bStack.pop();\n\n    return result;\n\n    function has(obj, key) {\n      return Object.prototype.hasOwnProperty.call(obj, key);\n    }\n\n    function isFunction(obj) {\n      return typeof obj === 'function';\n    }\n  }\n};\n\ngetJasmineRequireObj().toBe = function() {\n  function toBe() {\n    return {\n      compare: function(actual, expected) {\n        return {\n          pass: actual === expected\n        };\n      }\n    };\n  }\n\n  return toBe;\n};\n\ngetJasmineRequireObj().toBeCloseTo = function() {\n\n  function toBeCloseTo() {\n    return {\n      compare: function(actual, expected, precision) {\n        if (precision !== 0) {\n          precision = precision || 2;\n        }\n\n        return {\n          pass: Math.abs(expected - actual) < (Math.pow(10, -precision) / 2)\n        };\n      }\n    };\n  }\n\n  return toBeCloseTo;\n};\n\ngetJasmineRequireObj().toBeDefined = function() {\n  function toBeDefined() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: (void 0 !== actual)\n        };\n      }\n    };\n  }\n\n  return toBeDefined;\n};\n\ngetJasmineRequireObj().toBeFalsy = function() {\n  function toBeFalsy() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: !!!actual\n        };\n      }\n    };\n  }\n\n  return toBeFalsy;\n};\n\ngetJasmineRequireObj().toBeGreaterThan = function() {\n\n  function toBeGreaterThan() {\n    return {\n      compare: function(actual, expected) {\n        return {\n          pass: actual > expected\n        };\n      }\n    };\n  }\n\n  return toBeGreaterThan;\n};\n\n\ngetJasmineRequireObj().toBeLessThan = function() {\n  function toBeLessThan() {\n    return {\n\n      compare: function(actual, expected) {\n        return {\n          pass: actual < expected\n        };\n      }\n    };\n  }\n\n  return toBeLessThan;\n};\ngetJasmineRequireObj().toBeNaN = function(j$) {\n\n  function toBeNaN() {\n    return {\n      compare: function(actual) {\n        var result = {\n          pass: (actual !== actual)\n        };\n\n        if (result.pass) {\n          result.message = 'Expected actual not to be NaN.';\n        } else {\n          result.message = function() { return 'Expected ' + j$.pp(actual) + ' to be NaN.'; };\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toBeNaN;\n};\n\ngetJasmineRequireObj().toBeNull = function() {\n\n  function toBeNull() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: actual === null\n        };\n      }\n    };\n  }\n\n  return toBeNull;\n};\n\ngetJasmineRequireObj().toBeTruthy = function() {\n\n  function toBeTruthy() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: !!actual\n        };\n      }\n    };\n  }\n\n  return toBeTruthy;\n};\n\ngetJasmineRequireObj().toBeUndefined = function() {\n\n  function toBeUndefined() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: void 0 === actual\n        };\n      }\n    };\n  }\n\n  return toBeUndefined;\n};\n\ngetJasmineRequireObj().toContain = function() {\n  function toContain(util, customEqualityTesters) {\n    customEqualityTesters = customEqualityTesters || [];\n\n    return {\n      compare: function(actual, expected) {\n\n        return {\n          pass: util.contains(actual, expected, customEqualityTesters)\n        };\n      }\n    };\n  }\n\n  return toContain;\n};\n\ngetJasmineRequireObj().toEqual = function() {\n\n  function toEqual(util, customEqualityTesters) {\n    customEqualityTesters = customEqualityTesters || [];\n\n    return {\n      compare: function(actual, expected) {\n        var result = {\n          pass: false\n        };\n\n        result.pass = util.equals(actual, expected, customEqualityTesters);\n\n        return result;\n      }\n    };\n  }\n\n  return toEqual;\n};\n\ngetJasmineRequireObj().toHaveBeenCalled = function(j$) {\n\n  function toHaveBeenCalled() {\n    return {\n      compare: function(actual) {\n        var result = {};\n\n        if (!j$.isSpy(actual)) {\n          throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.');\n        }\n\n        if (arguments.length > 1) {\n          throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');\n        }\n\n        result.pass = actual.calls.any();\n\n        result.message = result.pass ?\n          'Expected spy ' + actual.and.identity() + ' not to have been called.' :\n          'Expected spy ' + actual.and.identity() + ' to have been called.';\n\n        return result;\n      }\n    };\n  }\n\n  return toHaveBeenCalled;\n};\n\ngetJasmineRequireObj().toHaveBeenCalledWith = function(j$) {\n\n  function toHaveBeenCalledWith(util, customEqualityTesters) {\n    return {\n      compare: function() {\n        var args = Array.prototype.slice.call(arguments, 0),\n          actual = args[0],\n          expectedArgs = args.slice(1),\n          result = { pass: false };\n\n        if (!j$.isSpy(actual)) {\n          throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.');\n        }\n\n        if (!actual.calls.any()) {\n          result.message = function() { return 'Expected spy ' + actual.and.identity() + ' to have been called with ' + j$.pp(expectedArgs) + ' but it was never called.'; };\n          return result;\n        }\n\n        if (util.contains(actual.calls.allArgs(), expectedArgs, customEqualityTesters)) {\n          result.pass = true;\n          result.message = function() { return 'Expected spy ' + actual.and.identity() + ' not to have been called with ' + j$.pp(expectedArgs) + ' but it was.'; };\n        } else {\n          result.message = function() { return 'Expected spy ' + actual.and.identity() + ' to have been called with ' + j$.pp(expectedArgs) + ' but actual calls were ' + j$.pp(actual.calls.allArgs()).replace(/^\\[ | \\]$/g, '') + '.'; };\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toHaveBeenCalledWith;\n};\n\ngetJasmineRequireObj().toMatch = function(j$) {\n\n  function toMatch() {\n    return {\n      compare: function(actual, expected) {\n        if (!j$.isString_(expected) && !j$.isA_('RegExp', expected)) {\n          throw new Error('Expected is not a String or a RegExp');\n        }\n\n        var regexp = new RegExp(expected);\n\n        return {\n          pass: regexp.test(actual)\n        };\n      }\n    };\n  }\n\n  return toMatch;\n};\n\ngetJasmineRequireObj().toThrow = function(j$) {\n\n  function toThrow(util) {\n    return {\n      compare: function(actual, expected) {\n        var result = { pass: false },\n          threw = false,\n          thrown;\n\n        if (typeof actual != 'function') {\n          throw new Error('Actual is not a Function');\n        }\n\n        try {\n          actual();\n        } catch (e) {\n          threw = true;\n          thrown = e;\n        }\n\n        if (!threw) {\n          result.message = 'Expected function to throw an exception.';\n          return result;\n        }\n\n        if (arguments.length == 1) {\n          result.pass = true;\n          result.message = function() { return 'Expected function not to throw, but it threw ' + j$.pp(thrown) + '.'; };\n\n          return result;\n        }\n\n        if (util.equals(thrown, expected)) {\n          result.pass = true;\n          result.message = function() { return 'Expected function not to throw ' + j$.pp(expected) + '.'; };\n        } else {\n          result.message = function() { return 'Expected function to throw ' + j$.pp(expected) + ', but it threw ' +  j$.pp(thrown) + '.'; };\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toThrow;\n};\n\ngetJasmineRequireObj().toThrowError = function(j$) {\n  function toThrowError (util) {\n    return {\n      compare: function(actual) {\n        var threw = false,\n          pass = {pass: true},\n          fail = {pass: false},\n          thrown;\n\n        if (typeof actual != 'function') {\n          throw new Error('Actual is not a Function');\n        }\n\n        var errorMatcher = getMatcher.apply(null, arguments);\n\n        try {\n          actual();\n        } catch (e) {\n          threw = true;\n          thrown = e;\n        }\n\n        if (!threw) {\n          fail.message = 'Expected function to throw an Error.';\n          return fail;\n        }\n\n        if (!(thrown instanceof Error)) {\n          fail.message = function() { return 'Expected function to throw an Error, but it threw ' + j$.pp(thrown) + '.'; };\n          return fail;\n        }\n\n        if (errorMatcher.hasNoSpecifics()) {\n          pass.message = 'Expected function not to throw an Error, but it threw ' + j$.fnNameFor(thrown) + '.';\n          return pass;\n        }\n\n        if (errorMatcher.matches(thrown)) {\n          pass.message = function() {\n            return 'Expected function not to throw ' + errorMatcher.errorTypeDescription + errorMatcher.messageDescription() + '.';\n          };\n          return pass;\n        } else {\n          fail.message = function() {\n            return 'Expected function to throw ' + errorMatcher.errorTypeDescription + errorMatcher.messageDescription() +\n              ', but it threw ' + errorMatcher.thrownDescription(thrown) + '.';\n          };\n          return fail;\n        }\n      }\n    };\n\n    function getMatcher() {\n      var expected = null,\n          errorType = null;\n\n      if (arguments.length == 2) {\n        expected = arguments[1];\n        if (isAnErrorType(expected)) {\n          errorType = expected;\n          expected = null;\n        }\n      } else if (arguments.length > 2) {\n        errorType = arguments[1];\n        expected = arguments[2];\n        if (!isAnErrorType(errorType)) {\n          throw new Error('Expected error type is not an Error.');\n        }\n      }\n\n      if (expected && !isStringOrRegExp(expected)) {\n        if (errorType) {\n          throw new Error('Expected error message is not a string or RegExp.');\n        } else {\n          throw new Error('Expected is not an Error, string, or RegExp.');\n        }\n      }\n\n      function messageMatch(message) {\n        if (typeof expected == 'string') {\n          return expected == message;\n        } else {\n          return expected.test(message);\n        }\n      }\n\n      return {\n        errorTypeDescription: errorType ? j$.fnNameFor(errorType) : 'an exception',\n        thrownDescription: function(thrown) {\n          var thrownName = errorType ? j$.fnNameFor(thrown.constructor) : 'an exception',\n              thrownMessage = '';\n\n          if (expected) {\n            thrownMessage = ' with message ' + j$.pp(thrown.message);\n          }\n\n          return thrownName + thrownMessage;\n        },\n        messageDescription: function() {\n          if (expected === null) {\n            return '';\n          } else if (expected instanceof RegExp) {\n            return ' with a message matching ' + j$.pp(expected);\n          } else {\n            return ' with message ' + j$.pp(expected);\n          }\n        },\n        hasNoSpecifics: function() {\n          return expected === null && errorType === null;\n        },\n        matches: function(error) {\n          return (errorType === null || error.constructor === errorType) &&\n            (expected === null || messageMatch(error.message));\n        }\n      };\n    }\n\n    function isStringOrRegExp(potential) {\n      return potential instanceof RegExp || (typeof potential == 'string');\n    }\n\n    function isAnErrorType(type) {\n      if (typeof type !== 'function') {\n        return false;\n      }\n\n      var Surrogate = function() {};\n      Surrogate.prototype = type.prototype;\n      return (new Surrogate()) instanceof Error;\n    }\n  }\n\n  return toThrowError;\n};\n\ngetJasmineRequireObj().interface = function(jasmine, env) {\n  var jasmineInterface = {\n    describe: function(description, specDefinitions) {\n      return env.describe(description, specDefinitions);\n    },\n\n    xdescribe: function(description, specDefinitions) {\n      return env.xdescribe(description, specDefinitions);\n    },\n\n    fdescribe: function(description, specDefinitions) {\n      return env.fdescribe(description, specDefinitions);\n    },\n\n    it: function() {\n      return env.it.apply(env, arguments);\n    },\n\n    xit: function() {\n      return env.xit.apply(env, arguments);\n    },\n\n    fit: function() {\n      return env.fit.apply(env, arguments);\n    },\n\n    beforeEach: function() {\n      return env.beforeEach.apply(env, arguments);\n    },\n\n    afterEach: function() {\n      return env.afterEach.apply(env, arguments);\n    },\n\n    beforeAll: function() {\n      return env.beforeAll.apply(env, arguments);\n    },\n\n    afterAll: function() {\n      return env.afterAll.apply(env, arguments);\n    },\n\n    expect: function(actual) {\n      return env.expect(actual);\n    },\n\n    pending: function() {\n      return env.pending.apply(env, arguments);\n    },\n\n    fail: function() {\n      return env.fail.apply(env, arguments);\n    },\n\n    spyOn: function(obj, methodName) {\n      return env.spyOn(obj, methodName);\n    },\n\n    jsApiReporter: new jasmine.JsApiReporter({\n      timer: new jasmine.Timer()\n    }),\n\n    jasmine: jasmine\n  };\n\n  jasmine.addCustomEqualityTester = function(tester) {\n    env.addCustomEqualityTester(tester);\n  };\n\n  jasmine.addMatchers = function(matchers) {\n    return env.addMatchers(matchers);\n  };\n\n  jasmine.clock = function() {\n    return env.clock;\n  };\n\n  return jasmineInterface;\n};\n\ngetJasmineRequireObj().version = function() {\n  return '2.2.0';\n};\n"
  },
  {
    "path": "tests/plugins.js",
    "content": "waitsForAndRuns = function(escapeFunction, runFunction, escapeTime) {\n  // check the escapeFunction every millisecond so as soon as it is met we can escape the function\n  var interval = setInterval(function() {\n    if (escapeFunction()) {\n      clearMe();\n      runFunction();\n    }\n  }, 1);\n \n  // in case we never reach the escapeFunction, we will time out\n  // at the escapeTime\n  var timeOut = setTimeout(function() {\n    clearMe();\n    runFunction();\n  }, escapeTime);\n \n  // clear the interval and the timeout\n  function clearMe(){\n    clearInterval(interval);\n    clearTimeout(timeOut);\n  }\n};"
  },
  {
    "path": "tests/spec/adUnitSpec.js",
    "content": "describe('Ad units', function () {\n\n    var cleanup = function () {\n        $('.adunit').remove();\n        $('script[src*=\"gpt.js\"]').remove();\n        window.googletag = undefined;\n    };\n    beforeEach(cleanup);\n    afterEach(cleanup);\n\n    it('Call to DFP with dfpID in adunit name', function (done) {\n        var id = 'xxxxxxx';\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n\n        $('body').append('<div class=\"adunit\" data-adunit=\"/' + id + '/Leader\"></div>');\n        $.dfp({\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect($('.adunit').data('googleAdUnit').getName()).toEqual('/' + id + '/Leader');\n            done();\n        }, 5000);\n\n    });\n\n    it('Auto generate an ID for the ad unit if no ID provided', function (done) {\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n\n        $('body').append('<div class=\"adunit\" data-adunit=\"Leader\"></div>');\n        $.dfp({\n            dfpID: 'xxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function') {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect($('.adunit').attr('id')).toMatch(/Leader-auto-gen-id-\\d+/i);\n            done();\n        }, 5000);\n\n    });\n\n    it('Google ad unit object get attached to the ad unit container', function (done) {\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n\n        $('body').append('<div class=\"adunit\" data-adunit=\"Leader\"></div>');\n        $.dfp({\n            dfpID: 'xxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect($('.adunit').data('googleAdUnit').getName()).toEqual('/xxxxxxx/Leader');\n            done();\n        }, 5000);\n\n    });\n\n    it('Google ad unit object get attached to the ad unit container (with namespace)', function (done) {\n        var namespace = 'my-long-namespace';\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n\n        $('body').append('<div class=\"adunit\"></div>');\n        $.dfp({\n            dfpID: 'xxxxxxx',\n            googletag: dummyTag,\n            namespace: namespace\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect($('.adunit').data('googleAdUnit').getName()).toEqual('/xxxxxxx/' + namespace);\n            done();\n        }, 5000);\n\n    });\n\n});\n"
  },
  {
    "path": "tests/spec/callBacksSpec.js",
    "content": "describe('Callbacks', function () {\n\n    var cleanup = function () {\n        $('.adunit').remove();\n        $('script[src*=\"gpt.js\"]').remove();\n        window.googletag = undefined;\n    };\n\n    beforeEach(cleanup);\n    afterEach(cleanup);\n\n    it('slotRenderEnded event listener is added', function (done) {\n        var mock = {};\n        mock.addEventListener = function (param) { };\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                addEventListener: mock.addEventListener\n            };\n        };\n\n        dummyTag.enableServices = function() {};\n\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n        spyOn(mock, 'addEventListener').and.callThrough();\n\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (dummyTag.enableServices.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.addEventListener).toHaveBeenCalled();\n            expect(mock.addEventListener.calls.count()).toEqual(1);\n            expect(mock.addEventListener.calls.argsFor(0).length).toEqual(2);\n            expect(mock.addEventListener.calls.argsFor(0)[0]).toEqual('slotRenderEnded');\n            done();\n        }, 5000);\n    });\n\n    it('afterEachAdLoaded callback is called once (single ad unit)', function (done) {\n        var mock = {};\n        mock.afterEachAdLoaded = function (param) { };\n\n        spyOn(mock, 'afterEachAdLoaded').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.display = function () {\n            mock.afterEachAdLoaded();\n        };\n\n        $('body').append('<div class=\"adunit\" data-adunit=\"Leader\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxx',\n            afterEachAdLoaded: mock.afterEachAdLoaded,\n            googletag: dummyTag,\n        });\n\n        waitsForAndRuns(function () {\n            if (mock.afterEachAdLoaded.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.afterEachAdLoaded).toHaveBeenCalled();\n            expect(mock.afterEachAdLoaded.calls.count()).toEqual(1);\n            done();\n        }, 5000);\n    });\n\n    it('afterEachAdLoaded callback is called twice (two ad units)', function (done) {\n        var mock = {};\n        mock.slotRenderEnded = function () {};\n        mock.addEventListener = function (event, func) {\n            mock.slotRenderEnded = func;\n        };\n        mock.afterEachAdLoaded = function (param) { };\n\n        spyOn(mock, 'afterEachAdLoaded').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                addEventListener: mock.addEventListener\n            };\n        };\n\n        dummyTag.display = function(id) {\n\n            var dummyEvent = {\n                slot: {\n                    getSlotId: function () {\n                        return {\n                            getDomId: function () {\n                                return 'Leader';\n                            }\n                        };\n                    }\n                },\n                isEmpty: false\n            };\n\n            mock.slotRenderEnded(dummyEvent);\n        };\n        dummyTag.enableServices = function() {};\n\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n\n        $('body').append('<div class=\"adunit\" data-adunit=\"Leader\"></div>');\n        $('body').append('<div class=\"adunit\" data-adunit=\"Leader\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            afterEachAdLoaded: mock.afterEachAdLoaded\n        });\n\n        waitsForAndRuns(function () {\n            if (mock.afterEachAdLoaded.calls.count() > 0) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.afterEachAdLoaded).toHaveBeenCalled();\n            expect(mock.afterEachAdLoaded.calls.count()).toEqual(2);\n            done();\n        }, 5000);\n    });\n\n    it('afterAllAdsLoaded callback is called once (single ad unit)', function (done) {\n        var mock = {};\n        mock.afterAllAdsLoaded = function (param) { };\n\n        spyOn(mock, 'afterAllAdsLoaded').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.display = function () {\n            mock.afterAllAdsLoaded();\n        };\n\n        $('body').append('<div class=\"adunit\" data-adunit=\"Leader\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxx',\n            afterAllAdsLoaded: mock.afterAllAdsLoaded,\n            googletag: dummyTag,\n        });\n\n        waitsForAndRuns(function () {\n            if (mock.afterAllAdsLoaded.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.afterAllAdsLoaded).toHaveBeenCalled();\n            expect(mock.afterAllAdsLoaded.calls.count()).toEqual(1);\n            done();\n        }, 5000);\n    });\n\n    it('afterAllAdsLoaded callback is called once (two ad units)', function (done) {\n        var mock = {};\n        mock.slotRenderEnded = function () {};\n        mock.addEventListener = function (event, func) {\n            mock.slotRenderEnded = func;\n        };\n        mock.afterAllAdsLoaded = function (param) { };\n\n        spyOn(mock, 'afterAllAdsLoaded').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                addEventListener: mock.addEventListener\n            };\n        };\n\n        dummyTag.display = function(id) {\n\n            var dummyEvent = {\n                slot: {\n                    getSlotId: function () {\n                        return {\n                            getDomId: function () {\n                                return 'Leader';\n                            }\n                        };\n                    }\n                },\n                isEmpty: false\n            };\n\n            mock.slotRenderEnded(dummyEvent);\n        };\n        dummyTag.enableServices = function() {};\n\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n\n        $('body').append('<div class=\"adunit\" data-adunit=\"Leader\"></div>');\n        $('body').append('<div class=\"adunit\" data-adunit=\"Leader\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            afterAllAdsLoaded: mock.afterAllAdsLoaded\n        });\n\n        waitsForAndRuns(function () {\n            if (mock.afterAllAdsLoaded.calls.count() > 0) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.afterAllAdsLoaded).toHaveBeenCalled();\n            expect(mock.afterAllAdsLoaded.calls.count()).toEqual(1);\n            done();\n        }, 5000);\n    });\n\n    it('Alter the ad unit name using callback', function (done) {\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n\n        $('body').append('<div class=\"adunit\" data-adunit=\"Bike\" id=\"leader-123\" data-model=\"BMX\"></div>');\n        $.dfp({\n            dfpID: 'xxxxxxx',\n            googletag: dummyTag,\n            alterAdUnitName: function(adUnitName,adUnit) {\n                return 'PREFIX_' + $(adUnit).data('model') + '_' + adUnitName + '_SUFFIX';\n            }\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect($('.adunit').data('googleAdUnit').getName()).toEqual('/xxxxxxx/PREFIX_BMX_Bike_SUFFIX');\n            done();\n        }, 5000);\n    });\n\n});\n"
  },
  {
    "path": "tests/spec/categoryExclusionSpec.js",
    "content": "describe('Category Exclusion', function () {\n\n    var cleanup = function () {\n        $('.adunit').remove();\n        $('script[src*=\"gpt.js\"]').remove();\n        window.googletag = undefined;\n    };\n    beforeEach(cleanup);\n    afterEach(cleanup);\n\n    it('Gets called correctly (ad unit)', function (done) {\n        var mockAdunit = {\n            setCategoryExclusion: function (param) { }\n        };\n\n        spyOn(mockAdunit, 'setCategoryExclusion').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.defineSlot = function () {\n            return {\n                addService: function () {\n                    return mockAdunit;\n                }\n            };\n        };\n\n        jQuery('body').append('<div class=\"adunit\" id=\"Ad_unit_id\" data-exclusions=\"firstcategory, secondcategory\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mockAdunit.setCategoryExclusion).toHaveBeenCalled();\n            expect(mockAdunit.setCategoryExclusion.calls.count()).toEqual(2);\n            expect(mockAdunit.setCategoryExclusion.calls.argsFor(0)[0]).toEqual('firstcategory');\n            expect(mockAdunit.setCategoryExclusion.calls.argsFor(1)[0]).toEqual('secondcategory');\n            done();\n        }, 5000);\n    });\n\n    it('Deals with extra comma (ad unit)', function (done) {\n        var mockAdunit = {\n            setCategoryExclusion: function (param) { }\n        };\n\n        spyOn(mockAdunit, 'setCategoryExclusion').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.defineSlot = function () {\n            return {\n                addService: function () {\n                    return mockAdunit;\n                }\n            };\n        };\n\n        jQuery('body').append('<div class=\"adunit\" id=\"Ad_unit_id\" data-exclusions=\"firstcategory, \"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mockAdunit.setCategoryExclusion).toHaveBeenCalled();\n            expect(mockAdunit.setCategoryExclusion.calls.count()).toEqual(1);\n            expect(mockAdunit.setCategoryExclusion.calls.argsFor(0)[0]).toEqual('firstcategory');\n            done();\n        }, 5000);\n    });\n\n    it('Deals with one value and no commas (ad unit)', function (done) {\n        var mockAdunit = {\n            setCategoryExclusion: function (param) { }\n        };\n\n        spyOn(mockAdunit, 'setCategoryExclusion').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.defineSlot = function () {\n            return {\n                addService: function () {\n                    return mockAdunit;\n                }\n            };\n        };\n\n        jQuery('body').append('<div class=\"adunit\" id=\"Ad_unit_id\" data-exclusions=\"firstcategory\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mockAdunit.setCategoryExclusion).toHaveBeenCalled();\n            expect(mockAdunit.setCategoryExclusion.calls.count()).toEqual(1);\n            expect(mockAdunit.setCategoryExclusion.calls.argsFor(0)[0]).toEqual('firstcategory');\n            done();\n        }, 5000);\n    });\n\n    it('Gets called correctly (page)', function (done) {\n        var mock = {};\n        mock.setCategoryExclusion = function (param) {\n        };\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                setCategoryExclusion: mock.setCategoryExclusion\n            };\n        };\n\n        spyOn(mock, 'setCategoryExclusion').and.callThrough();\n\n        jQuery('body').append('<div class=\"adunit\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            setCategoryExclusion: 'firstcategory, secondcategory'\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setCategoryExclusion).toHaveBeenCalled();\n            expect(mock.setCategoryExclusion.calls.count()).toEqual(2);\n            expect(mock.setCategoryExclusion.calls.argsFor(0)[0]).toEqual('firstcategory');\n            expect(mock.setCategoryExclusion.calls.argsFor(1)[0]).toEqual('secondcategory');\n            done();\n        }, 5000);\n    });\n\n    it('Deals with extra comma (page)', function (done) {\n        var mock = {};\n        mock.setCategoryExclusion = function (param) {\n        };\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                setCategoryExclusion: mock.setCategoryExclusion\n            };\n        };\n\n        spyOn(mock, 'setCategoryExclusion').and.callThrough();\n\n        jQuery('body').append('<div class=\"adunit\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            setCategoryExclusion: 'firstcategory, '\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setCategoryExclusion).toHaveBeenCalled();\n            expect(mock.setCategoryExclusion.calls.count()).toEqual(1);\n            expect(mock.setCategoryExclusion.calls.argsFor(0)[0]).toEqual('firstcategory');\n            done();\n        }, 5000);\n    });\n\n    it('Deals with one value and no commas (page)', function (done) {\n        var mock = {};\n        mock.setCategoryExclusion = function (param) {\n        };\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                setCategoryExclusion: mock.setCategoryExclusion\n            };\n        };\n\n        spyOn(mock, 'setCategoryExclusion').and.callThrough();\n\n        jQuery('body').append('<div class=\"adunit\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            setCategoryExclusion: 'firstcategory'\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setCategoryExclusion).toHaveBeenCalled();\n            expect(mock.setCategoryExclusion.calls.count()).toEqual(1);\n            expect(mock.setCategoryExclusion.calls.argsFor(0)[0]).toEqual('firstcategory');\n            done();\n        }, 5000);\n    });\n\n});\n"
  },
  {
    "path": "tests/spec/loadingPhaseSpec.js",
    "content": "describe('Loading Phase', function () {\n\n    var cleanup = function () {\n        $('script[src*=\"gpt.js\"]').remove();\n        $('#testdiv').remove();\n        window.googletag = undefined;\n    };\n    beforeEach(cleanup);\n    afterEach(cleanup);\n\n    it('Script Appended', function (done) {\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n\n        $.dfp({\n            dfpID: 'xxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function') {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect($('script[src*=\"googletagservices.com/tag/js/gpt.js\"]').length).toEqual(1);\n            done();\n        }, 1000);\n    });\n\n    it('DFP Script Loaded', function (done) {\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n\n        $.dfp({\n            dfpID: 'xxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function') {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(window.googletag.getVersion()).toBeGreaterThan('23');\n            done();\n        }, 5000);\n    });\n\n    it('DFP Selector default option', function (done) {\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.defineSlot = function() {};\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n        spyOn(dummyTag, 'defineSlot').and.callThrough();\n\n        $('body').append('<div id=\"testdiv\"><div class=\"adunit\"></div><div class=\"adunit\"></div></div>');\n\n        $.dfp({\n            dfpID: 'xxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if(dummyTag.enableServices.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(dummyTag.defineSlot.calls.count()).toEqual(2);\n            done();\n        }, 5000);\n    });\n\n    it('Override DFP Selector', function (done) {\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.defineSlot = function() {};\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n        spyOn(dummyTag, \"defineSlot\").and.callThrough();\n\n        $('body').append('<div id=\"testdiv\"><div class=\"otherselector\"></div><div class=\"otherselector\"></div></div>');\n\n        $('.otherselector').dfp({\n            dfpID: 'xxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if(dummyTag.enableServices.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(1).toEqual(1);\n            expect(dummyTag.defineSlot.calls.count()).toEqual(2);\n            done();\n        }, 5000);\n    });\n});\n"
  },
  {
    "path": "tests/spec/setLocationSpec.js",
    "content": "describe('SetLocation', function () {\n\n    var cleanup = function () {\n        $('script[src*=\"gpt.js\"]').remove();\n        window.googletag = undefined;\n    };\n\n    beforeEach(cleanup);\n\n    it('setLocation method called correctly with latitude and longitude', function (done) {\n        var mock = {};\n        mock.setLocation = function (param) { };\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                addEventListener: function () {},\n                setLocation: mock.setLocation\n            };\n        };\n\n        dummyTag.enableServices = function() {};\n\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n        spyOn(mock, 'setLocation').and.callThrough();\n\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            setLocation: { latitude: 34, longitude: -45.12 }\n        });\n\n        waitsForAndRuns(function () {\n            if (dummyTag.enableServices.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setLocation).toHaveBeenCalled();\n            expect(mock.setLocation.calls.count()).toEqual(1);\n            expect(mock.setLocation.calls.argsFor(0).length).toEqual(2);\n            expect(mock.setLocation.calls.argsFor(0)[0]).toEqual(34);\n            expect(mock.setLocation.calls.argsFor(0)[1]).toEqual(-45.12);\n            done();\n        }, 5000);\n    });\n\n    it('setLocation method called correctly with latitude, longitude and precision', function (done) {\n        var mock = {};\n        mock.setLocation = function (param) { };\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                addEventListener: function () {},\n                setLocation: mock.setLocation\n            };\n        };\n\n        dummyTag.enableServices = function() {};\n\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n        spyOn(mock, 'setLocation').and.callThrough();\n\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            setLocation: { latitude: 34, longitude: -45.12, precision: 1000 }\n        });\n\n        waitsForAndRuns(function () {\n            if (dummyTag.enableServices.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setLocation).toHaveBeenCalled();\n            expect(mock.setLocation.calls.count()).toEqual(1);\n            expect(mock.setLocation.calls.argsFor(0).length).toEqual(3);\n            expect(mock.setLocation.calls.argsFor(0)[0]).toEqual(34);\n            expect(mock.setLocation.calls.argsFor(0)[1]).toEqual(-45.12);\n            expect(mock.setLocation.calls.argsFor(0)[2]).toEqual(1000);\n            done();\n        }, 5000);\n    });\n\n    it('setLocation method not called with latitude missing', function (done) {\n        var mock = {};\n        mock.setLocation = function (param) { };\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                addEventListener: function () {},\n                setLocation: mock.setLocation\n            };\n        };\n\n        dummyTag.enableServices = function() {};\n\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n        spyOn(mock, 'setLocation').and.callThrough();\n\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            setLocation: { longitude: -45.12, precision: 1000 }\n        });\n\n        waitsForAndRuns(function () {\n            if (dummyTag.enableServices.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setLocation).not.toHaveBeenCalled();\n            done();\n        }, 5000);\n    });\n\n    it('setLocation string variable type not accepted', function (done) {\n        var mock = {};\n        mock.setLocation = function (param) { };\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: function () {},\n                collapseEmptyDivs: function () {},\n                addEventListener: function () {},\n                setLocation: mock.setLocation\n            };\n        };\n\n        dummyTag.enableServices = function() {};\n\n        spyOn(dummyTag, 'enableServices').and.callThrough();\n        spyOn(mock, 'setLocation').and.callThrough();\n\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            setLocation: { latitude: '34', longitude: -45.12, precision: 1000 }\n        });\n\n        waitsForAndRuns(function () {\n            if (dummyTag.enableServices.calls.count() === 1) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setLocation).not.toHaveBeenCalled();\n            done();\n        }, 5000);\n    });\n});\n"
  },
  {
    "path": "tests/spec/sizeMappingSpec.js",
    "content": "describe('SizeMapping', function () {\n\n    var cleanup = function () {\n        $('.adunit').remove();\n        $('script[src*=\"gpt.js\"]').remove();\n        window.googletag = undefined;\n    };\n    beforeEach(cleanup);\n    afterEach(cleanup);\n\n    it('Gets called correctly (ad unit)', function (done) {\n        var mockAdunit = {\n            defineSizeMapping: function (param) { }\n        };\n\n        spyOn(mockAdunit, 'defineSizeMapping').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.defineSlot = function () {\n            return {\n                addService: function () {\n                    return mockAdunit;\n                }\n            };\n        };\n\n        jQuery('body').append('<div class=\"adunit\" id=\"Ad_unit_id\" data-size-mapping=\"my-size-mapping\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            sizeMapping: {\n                'my-size-mapping': [\n                    {browser: [1024, 768], ad_sizes: [980, 185]},\n                    {browser: [ 980, 600], ad_sizes: [[728, 90], [640, 480]]}\n                ]\n            }\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mockAdunit.defineSizeMapping).toHaveBeenCalled();\n            expect(mockAdunit.defineSizeMapping.calls.count()).toEqual(1);\n            expect(mockAdunit.defineSizeMapping.calls.argsFor(0)[0]).toEqual([[[1024, 768],[980, 185]],[[ 980, 600],[[728, 90], [640, 480]]]]);\n            done();\n        }, 5000);\n    });\n\n    it('Deals with name mismatch (ad unit)', function (done) {\n        var mockAdunit = {\n            defineSizeMapping: function (param) { }\n        };\n\n        spyOn(mockAdunit, 'defineSizeMapping').and.callThrough();\n\n        var dummyTag = {};\n        dummyTag.enableServices = function() {};\n        dummyTag.defineSlot = function () {\n            return {\n                addService: function () {\n                    return mockAdunit;\n                }\n            };\n        };\n\n        jQuery('body').append('<div class=\"adunit\" id=\"Ad_unit_id\" data-size-mapping=\"undefined-size-mapping\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            sizeMapping: {\n                'my-size-mapping': [\n                    {browser: [1024, 768], ad_sizes: [980, 185]},\n                    {browser: [ 980, 600], ad_sizes: [[728, 90], [640, 480]]}\n                ]\n            }\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mockAdunit.defineSizeMapping.calls.count()).toEqual(0);\n            done();\n        }, 5000);\n    });\n\n});\n"
  },
  {
    "path": "tests/spec/targetingSpec.js",
    "content": "describe('Targeting', function () {\n\n    var cleanup = function () {\n        $('.adunit').remove();\n        $('script[src*=\"gpt.js\"]').remove();\n        window.googletag = undefined;\n    };\n    beforeEach(cleanup);\n    afterEach(cleanup);\n\n    it('Default Targeting options are set (page)', function (done) {\n\n        var mock = {};\n        mock.setTargeting = function (param) {};\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: mock.setTargeting,\n                collapseEmptyDivs: function () {}\n            };\n        };\n\n        spyOn(mock, 'setTargeting').and.callThrough();\n\n        jQuery('body').append('<div class=\"adunit\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setTargeting).toHaveBeenCalled();\n            expect(mock.setTargeting.calls.count()).toEqual(3);\n            expect(mock.setTargeting.calls.argsFor(0)[0]).toEqual('UrlHost');\n            expect(mock.setTargeting.calls.argsFor(1)[0]).toEqual('UrlPath');\n            expect(mock.setTargeting.calls.argsFor(2)[0]).toEqual('UrlQuery');\n            done();\n        }, 5000);\n    });\n\n    it('URL Targeting options are not set (page)', function (done) {\n\n        var mock = {};\n        mock.setTargeting = function (param) { };\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () { },\n                setTargeting: mock.setTargeting,\n                collapseEmptyDivs: function () { }\n            };\n        };\n\n        spyOn(mock, 'setTargeting').and.callThrough();\n\n        jQuery('body').append('<div class=\"adunit\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            setUrlTargeting: false,\n            googletag: dummyTag\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setTargeting).not.toHaveBeenCalled();\n            done();\n        }, 5000);\n    });\n\n    it('URL Targeting is correct', function (done) {\n\n        var mock = {};\n        mock.setTargeting = function (param) {};\n\n        var dummyTag = {};\n        dummyTag.pubads = function () {\n            return {\n                enableSingleRequest: function () {},\n                setTargeting: mock.setTargeting,\n                collapseEmptyDivs: function () {}\n            };\n        };\n\n        spyOn(mock, 'setTargeting').and.callThrough();\n\n        jQuery('body').append('<div class=\"adunit\"></div>');\n        jQuery.dfp({\n            dfpID: 'xxxxxxxxx',\n            googletag: dummyTag,\n            url: 'http://www.domain.com/path1/path2?param1=1&param2=2'\n        });\n\n        waitsForAndRuns(function () {\n            if (typeof window.googletag.getVersion === 'function' && $('.adunit').data('googleAdUnit')) {\n                return true;\n            } else {\n                return false;\n            }\n        }, function () {\n            expect(mock.setTargeting).toHaveBeenCalled();\n            expect(mock.setTargeting.calls.count()).toEqual(3);\n            expect(mock.setTargeting.calls.argsFor(0)[0]).toEqual('UrlHost');\n            expect(mock.setTargeting.calls.argsFor(1)[0]).toEqual('UrlPath');\n            expect(mock.setTargeting.calls.argsFor(2)[0]).toEqual('UrlQuery');\n            expect(mock.setTargeting.calls.argsFor(0)[1]).toEqual('www.domain.com');\n            expect(mock.setTargeting.calls.argsFor(1)[1]).toEqual('/path1/path2');\n            expect(mock.setTargeting.calls.argsFor(2)[1]).toEqual(['param1:1', 'param2:2']);\n            done();\n        }, 5000);\n    });\n\n});\n"
  }
]