forked from Polymer/web-component-tester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowser.js.map
1 lines (1 loc) · 107 KB
/
browser.js.map
1
{"version":3,"file":"browser.js.map","sources":["browser/util.js","browser/childrunner.js","browser/config.js","browser/suites.js","browser/environment/errors.js","browser/mocha/extend.js","browser/mocha/fixture.js","browser/mocha/stub.js","browser/mocha/replace.js","browser/mocha.js","browser/reporters/console.js","browser/reporters/html.js","browser/reporters/multi.js","browser/reporters/title.js","browser/reporters.js","browser/environment.js","browser/clisocket.js","browser/environment/helpers.js","browser/index.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport * as config from './config.js';\n\n/**\n * @param {function()} callback A function to call when the active web component\n * frameworks have loaded.\n */\nexport function whenFrameworksReady(callback) {\n debug('whenFrameworksReady');\n var done = function() {\n debug('whenFrameworksReady done');\n callback();\n };\n\n function whenWebComponentsReady() {\n debug('WebComponentsReady?');\n if (window.WebComponents && WebComponents.whenReady) {\n WebComponents.whenReady(function() {\n debug('WebComponents Ready');\n done();\n });\n } else {\n var after = function after() {\n window.removeEventListener('WebComponentsReady', after);\n debug('WebComponentsReady');\n done();\n };\n window.addEventListener('WebComponentsReady', after);\n }\n }\n\n function importsReady() {\n // handle Polymer 0.5 readiness\n debug('Polymer ready?');\n if (window.Polymer && Polymer.whenReady) {\n Polymer.whenReady(function() {\n debug('Polymer ready');\n done();\n });\n } else {\n whenWebComponentsReady();\n }\n }\n\n // All our supported framework configurations depend on imports.\n if (!window.HTMLImports) {\n done();\n } else if (HTMLImports.ready) {\n debug('HTMLImports ready');\n importsReady();\n } else if (HTMLImports.whenReady) {\n HTMLImports.whenReady(function() {\n debug('HTMLImports.whenReady ready');\n importsReady();\n });\n } else {\n whenWebComponentsReady();\n }\n}\n\n/**\n * @param {number} count\n * @param {string} kind\n * @return {string} '<count> <kind> tests' or '<count> <kind> test'.\n */\nexport function pluralizedStat(count, kind) {\n if (count === 1) {\n return count + ' ' + kind + ' test';\n } else {\n return count + ' ' + kind + ' tests';\n }\n}\n\n/**\n * @param {string} path The URI of the script to load.\n * @param {function} done\n */\nexport function loadScript(path, done) {\n var script = document.createElement('script');\n script.src = path;\n if (done) {\n script.onload = done.bind(null, null);\n script.onerror = done.bind(null, 'Failed to load script ' + script.src);\n }\n document.head.appendChild(script);\n}\n\n/**\n * @param {string} path The URI of the stylesheet to load.\n * @param {function} done\n */\nexport function loadStyle(path, done) {\n var link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = path;\n if (done) {\n link.onload = done.bind(null, null);\n link.onerror = done.bind(null, 'Failed to load stylesheet ' + link.href);\n }\n document.head.appendChild(link);\n}\n\n/**\n * @param {...*} var_args Logs values to the console when the `debug`\n * configuration option is true.\n */\nexport function debug(var_args) {\n if (!config.get('verbose')) return;\n var args = [window.location.pathname];\n args.push.apply(args, arguments);\n (console.debug || console.log).apply(console, args);\n}\n\n// URL Processing\n\n/**\n * @param {string} url\n * @return {{base: string, params: string}}\n */\nexport function parseUrl(url) {\n var parts = url.match(/^(.*?)(?:\\?(.*))?$/);\n return {\n base: parts[1],\n params: getParams(parts[2] || ''),\n };\n}\n\n/**\n * Expands a URL that may or may not be relative to `base`.\n *\n * @param {string} url\n * @param {string} base\n * @return {string}\n */\nexport function expandUrl(url, base) {\n if (!base) return url;\n if (url.match(/^(\\/|https?:\\/\\/)/)) return url;\n if (base.substr(base.length - 1) !== '/') {\n base = base + '/';\n }\n return base + url;\n}\n\n/**\n * @param {string=} opt_query A query string to parse.\n * @return {!Object<string, !Array<string>>} All params on the URL's query.\n */\nexport function getParams(opt_query) {\n var query = typeof opt_query === 'string' ? opt_query : window.location.search;\n if (query.substring(0, 1) === '?') {\n query = query.substring(1);\n }\n // python's SimpleHTTPServer tacks a `/` on the end of query strings :(\n if (query.slice(-1) === '/') {\n query = query.substring(0, query.length - 1);\n }\n if (query === '') return {};\n\n var result = {};\n query.split('&').forEach(function(part) {\n var pair = part.split('=');\n if (pair.length !== 2) {\n console.warn('Invalid URL query part:', part);\n return;\n }\n var key = decodeURIComponent(pair[0]);\n var value = decodeURIComponent(pair[1]);\n\n if (!result[key]) {\n result[key] = [];\n }\n result[key].push(value);\n });\n\n return result;\n}\n\n/**\n * Merges params from `source` into `target` (mutating `target`).\n *\n * @param {!Object<string, !Array<string>>} target\n * @param {!Object<string, !Array<string>>} source\n */\nexport function mergeParams(target, source) {\n Object.keys(source).forEach(function(key) {\n if (!(key in target)) {\n target[key] = [];\n }\n target[key] = target[key].concat(source[key]);\n });\n}\n\n/**\n * @param {string} param The param to return a value for.\n * @return {?string} The first value for `param`, if found.\n */\nexport function getParam(param) {\n var params = getParams();\n return params[param] ? params[param][0] : null;\n}\n\n/**\n * @param {!Object<string, !Array<string>>} params\n * @return {string} `params` encoded as a URI query.\n */\nexport function paramsToQuery(params) {\n var pairs = [];\n Object.keys(params).forEach(function(key) {\n params[key].forEach(function(value) {\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n });\n });\n return (pairs.length > 0) ? ('?' + pairs.join('&')) : '';\n}\n\n/**\n * @param {!Location|string} location\n * @return {string}\n */\nexport function basePath(location) {\n return (location.pathname || location).match(/^.*\\//)[0];\n}\n\n/**\n * @param {!Location|string} location\n * @param {string} basePath\n * @return {string}\n */\nexport function relativeLocation(location, basePath) {\n var path = location.pathname || location;\n if (path.indexOf(basePath) === 0) {\n path = path.substring(basePath.length);\n }\n return path;\n}\n\n/**\n * @param {!Location|string} location\n * @return {string}\n */\nexport function cleanLocation(location) {\n var path = location.pathname || location;\n if (path.slice(-11) === '/index.html') {\n path = path.slice(0, path.length - 10);\n }\n return path;\n}\n\n/**\n * Like `async.parallelLimit`, but our own so that we don't force a dependency\n * on downstream code.\n *\n * @param {!Array<function(function(*))>} runners Runners that call their given\n * Node-style callback when done.\n * @param {number|function(*)} limit Maximum number of concurrent runners.\n * (optional).\n * @param {?function(*)} done Callback that should be triggered once all runners\n * have completed, or encountered an error.\n */\nexport function parallel(runners, limit, done) {\n if (typeof limit !== 'number') {\n done = limit;\n limit = 0;\n }\n if (!runners.length) return done();\n\n var called = false;\n var total = runners.length;\n var numActive = 0;\n var numDone = 0;\n\n function runnerDone(error) {\n if (called) return;\n numDone = numDone + 1;\n numActive = numActive - 1;\n\n if (error || numDone >= total) {\n called = true;\n done(error);\n } else {\n runOne();\n }\n }\n\n function runOne() {\n if (limit && numActive >= limit) return;\n if (!runners.length) return;\n numActive = numActive + 1;\n runners.shift()(runnerDone);\n }\n runners.forEach(runOne);\n}\n\n/**\n * Finds the directory that a loaded script is hosted on.\n *\n * @param {string} filename\n * @return {string?}\n */\nexport function scriptPrefix(filename) {\n var scripts = document.querySelectorAll('script[src*=\"' + filename + '\"]');\n if (scripts.length !== 1) return null;\n var script = scripts[0].src;\n return script.substring(0, script.indexOf(filename));\n}\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as util from './util.js';\n\n// TODO(thedeeno): Consider renaming subsuite. IIRC, childRunner is entirely\n// distinct from mocha suite, which tripped me up badly when trying to add\n// plugin support. Perhaps something like 'batch', or 'bundle'. Something that\n// has no mocha correlate. This may also eliminate the need for root/non-root\n// suite distinctions.\n\n/**\n * A Mocha suite (or suites) run within a child iframe, but reported as if they\n * are part of the current context.\n */\nexport default function ChildRunner(url, parentScope) {\n var urlBits = util.parseUrl(url);\n util.mergeParams(\n urlBits.params, util.getParams(parentScope.location.search));\n delete urlBits.params.cli_browser_id;\n\n this.url = urlBits.base + util.paramsToQuery(urlBits.params);\n this.parentScope = parentScope;\n\n this.state = 'initializing';\n}\n\n// ChildRunners get a pretty generous load timeout by default.\nChildRunner.loadTimeout = 60000;\n\n// We can't maintain properties on iframe elements in Firefox/Safari/???, so we\n// track childRunners by URL.\nChildRunner._byUrl = {};\n\n/**\n * @return {ChildRunner} The `ChildRunner` that was registered for this window.\n */\nChildRunner.current = function() {\n return ChildRunner.get(window);\n};\n\n/**\n * @param {!Window} target A window to find the ChildRunner of.\n * @param {boolean} traversal Whether this is a traversal from a child window.\n * @return {ChildRunner} The `ChildRunner` that was registered for `target`.\n */\nChildRunner.get = function(target, traversal) {\n var childRunner = ChildRunner._byUrl[target.location.href];\n if (childRunner) return childRunner;\n if (window.parent === window) { // Top window.\n if (traversal) {\n console.warn('Subsuite loaded but was never registered. This most likely is due to wonky history behavior. Reloading...');\n window.location.reload();\n }\n return null;\n }\n // Otherwise, traverse.\n return window.parent.WCT._ChildRunner.get(target, true);\n};\n\n/**\n * Loads and runs the subsuite.\n *\n * @param {function} done Node-style callback.\n */\nChildRunner.prototype.run = function(done) {\n util.debug('ChildRunner#run', this.url);\n this.state = 'loading';\n this.onRunComplete = done;\n\n this.iframe = document.createElement('iframe');\n this.iframe.src = this.url;\n this.iframe.classList.add('subsuite');\n\n var container = document.getElementById('subsuites');\n if (!container) {\n container = document.createElement('div');\n container.id = 'subsuites';\n document.body.appendChild(container);\n }\n container.appendChild(this.iframe);\n\n // let the iframe expand the URL for us.\n this.url = this.iframe.src;\n ChildRunner._byUrl[this.url] = this;\n\n this.timeoutId = setTimeout(\n this.loaded.bind(this, new Error('Timed out loading ' + this.url)), ChildRunner.loadTimeout);\n\n this.iframe.addEventListener('error',\n this.loaded.bind(this, new Error('Failed to load document ' + this.url)));\n\n this.iframe.contentWindow.addEventListener('DOMContentLoaded', this.loaded.bind(this, null));\n};\n\n/**\n * Called when the sub suite's iframe has loaded (or errored during load).\n *\n * @param {*} error The error that occured, if any.\n */\nChildRunner.prototype.loaded = function(error) {\n util.debug('ChildRunner#loaded', this.url, error);\n\n // Not all targets have WCT loaded (compatiblity mode)\n if (this.iframe.contentWindow.WCT) {\n this.share = this.iframe.contentWindow.WCT.share;\n }\n\n if (error) {\n this.signalRunComplete(error);\n this.done();\n }\n};\n\n/**\n * Called in mocha/run.js when all dependencies have loaded, and the child is\n * ready to start running tests\n *\n * @param {*} error The error that occured, if any.\n */\nChildRunner.prototype.ready = function(error) {\n util.debug('ChildRunner#ready', this.url, error);\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n if (error) {\n this.signalRunComplete(error);\n this.done();\n }\n};\n\n/** Called when the sub suite's tests are complete, so that it can clean up. */\nChildRunner.prototype.done = function done() {\n util.debug('ChildRunner#done', this.url, arguments);\n\n // make sure to clear that timeout\n this.ready();\n this.signalRunComplete();\n\n if (!this.iframe) return;\n // Be safe and avoid potential browser crashes when logic attempts to interact\n // with the removed iframe.\n setTimeout(function() {\n this.iframe.parentNode.removeChild(this.iframe);\n this.iframe = null;\n }.bind(this), 1);\n};\n\nChildRunner.prototype.signalRunComplete = function signalRunComplete(error) {\n if (!this.onRunComplete) return;\n this.state = 'complete';\n this.onRunComplete(error);\n this.onRunComplete = null;\n};\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as util from './util.js';\nimport ChildRunner from './childrunner.js';\n\n/**\n * The global configuration state for WCT's browser client.\n */\nexport var _config = {\n /**\n * `.js` scripts to be loaded (synchronously) before WCT starts in earnest.\n *\n * Paths are relative to `scriptPrefix`.\n */\n environmentScripts: [\n 'stacky/browser.js',\n 'async/lib/async.js',\n 'lodash/lodash.js',\n 'mocha/mocha.js',\n 'chai/chai.js',\n 'sinonjs/sinon.js',\n 'sinon-chai/lib/sinon-chai.js',\n 'accessibility-developer-tools/dist/js/axs_testing.js'\n ],\n\n environmentImports: [\n 'test-fixture/test-fixture.html'\n ],\n\n /** Absolute root for client scripts. Detected in `setup()` if not set. */\n root: null,\n\n /** By default, we wait for any web component frameworks to load. */\n waitForFrameworks: true,\n\n /** Alternate callback for waiting for tests.\n * `this` for the callback will be the window currently running tests.\n */\n waitFor: null,\n\n /** How many `.html` suites that can be concurrently loaded & run. */\n numConcurrentSuites: 1,\n\n /** Whether `console.error` should be treated as a test failure. */\n trackConsoleError: true,\n\n /** Configuration passed to mocha.setup. */\n mochaOptions: {\n timeout: 10 * 1000\n },\n\n /** Whether WCT should emit (extremely verbose) debugging log messages. */\n verbose: false,\n};\n\n/**\n * Merges initial `options` into WCT's global configuration.\n *\n * @param {Object} options The options to merge. See `browser/config.js` for a\n * reference.\n */\nexport function setup(options) {\n var childRunner = ChildRunner.current();\n if (childRunner) {\n _deepMerge(_config, childRunner.parentScope.WCT._config);\n // But do not force the mocha UI\n delete _config.mochaOptions.ui;\n }\n\n if (options && typeof options === 'object') {\n _deepMerge(_config, options);\n }\n\n if (!_config.root) {\n // Sibling dependencies.\n var root = util.scriptPrefix('browser.js');\n _config.root = util.basePath(root.substr(0, root.length - 1));\n if (!_config.root) {\n throw new Error('Unable to detect root URL for WCT sources. Please set WCT.root before including browser.js');\n }\n }\n}\n\n/**\n * Retrieves a configuration value.\n *\n * @param {string} key\n * @return {*}\n */\nexport function get(key) {\n return _config[key];\n}\n\n// Internal\n\nfunction _deepMerge(target, source) {\n Object.keys(source).forEach(function(key) {\n if (target[key] !== null && typeof target[key] === 'object' && !Array.isArray(target[key])) {\n _deepMerge(target[key], source[key]);\n } else {\n target[key] = source[key];\n }\n });\n}\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as config from './config.js';\nimport * as util from './util.js';\nimport ChildRunner from './childrunner.js';\n\nexport var htmlSuites = [];\nexport var jsSuites = [];\n\n// We process grep ourselves to avoid loading suites that will be filtered.\nvar GREP = util.getParam('grep');\n\n/**\n * Loads suites of tests, supporting both `.js` and `.html` files.\n *\n * @param {!Array.<string>} files The files to load.\n */\nexport function loadSuites(files) {\n files.forEach(function(file) {\n if (/\\.js(\\?.*)?$/.test(file)) {\n jsSuites.push(file);\n } else if (/\\.html(\\?.*)?$/.test(file)) {\n htmlSuites.push(file);\n } else {\n throw new Error('Unknown resource type: ' + file);\n }\n });\n}\n\n/**\n * @return {!Array.<string>} The child suites that should be loaded, ignoring\n * those that would not match `GREP`.\n */\nexport function activeChildSuites() {\n var subsuites = htmlSuites;\n if (GREP) {\n var cleanSubsuites = [];\n for (var i = 0, subsuite; subsuite = subsuites[i]; i++) {\n if (GREP.indexOf(util.cleanLocation(subsuite)) !== -1) {\n cleanSubsuites.push(subsuite);\n }\n }\n subsuites = cleanSubsuites;\n }\n return subsuites;\n}\n\n/**\n * Loads all `.js` sources requested by the current suite.\n *\n * @param {!MultiReporter} reporter\n * @param {function} done\n */\nexport function loadJsSuites(reporter, done) {\n util.debug('loadJsSuites', jsSuites);\n\n var loaders = jsSuites.map(function(file) {\n // We only support `.js` dependencies for now.\n return util.loadScript.bind(util, file);\n });\n\n util.parallel(loaders, done);\n}\n\n/**\n * @param {!MultiReporter} reporter\n * @param {!Array.<string>} childSuites\n * @param {function} done\n */\nexport function runSuites(reporter, childSuites, done) {\n util.debug('runSuites');\n\n var suiteRunners = [\n // Run the local tests (if any) first, not stopping on error;\n _runMocha.bind(null, reporter),\n ];\n\n // As well as any sub suites. Again, don't stop on error.\n childSuites.forEach(function(file) {\n suiteRunners.push(function(next) {\n var childRunner = new ChildRunner(file, window);\n reporter.emit('childRunner start', childRunner);\n childRunner.run(function(error) {\n reporter.emit('childRunner end', childRunner);\n if (error) reporter.emitOutOfBandTest(file, error);\n next();\n });\n });\n });\n\n util.parallel(suiteRunners, config.get('numConcurrentSuites'), function(error) {\n reporter.done();\n done(error);\n });\n}\n\n/**\n * Kicks off a mocha run, waiting for frameworks to load if necessary.\n *\n * @param {!MultiReporter} reporter Where to send Mocha's events.\n * @param {function} done A callback fired, _no error is passed_.\n */\nfunction _runMocha(reporter, done, waited) {\n if (config.get('waitForFrameworks') && !waited) {\n var waitFor = (config.get('waitFor') || util.whenFrameworksReady).bind(window);\n waitFor(_runMocha.bind(null, reporter, done, true));\n return;\n }\n util.debug('_runMocha');\n var mocha = window.mocha;\n var Mocha = window.Mocha;\n\n mocha.reporter(reporter.childReporter(window.location));\n mocha.suite.title = reporter.suiteTitle(window.location);\n mocha.grep(GREP);\n\n // We can't use `mocha.run` because it bashes over grep, invert, and friends.\n // See https://github.com/visionmedia/mocha/blob/master/support/tail.js#L137\n var runner = Mocha.prototype.run.call(mocha, function(error) {\n if (document.getElementById('mocha')) {\n Mocha.utils.highlightTags('code');\n }\n done(); // We ignore the Mocha failure count.\n });\n\n // Mocha's default `onerror` handling strips the stack (to support really old\n // browsers). We upgrade this to get better stacks for async errors.\n //\n // TODO(nevir): Can we expand support to other browsers?\n if (navigator.userAgent.match(/chrome/i)) {\n window.onerror = null;\n window.addEventListener('error', function(event) {\n if (!event.error) return;\n if (event.error.ignore) return;\n runner.uncaught(event.error);\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as config from '../config.js';\n\n// We may encounter errors during initialization (for example, syntax errors in\n// a test file). Hang onto those (and more) until we are ready to report them.\nexport var globalErrors = [];\n\n/**\n * Hook the environment to pick up on global errors.\n */\nexport function listenForErrors() {\n window.addEventListener('error', function(event) {\n globalErrors.push(event.error);\n });\n\n // Also, we treat `console.error` as a test failure. Unless you prefer not.\n var origConsole = console;\n var origError = console.error;\n console.error = function wctShimmedError() {\n origError.apply(origConsole, arguments);\n if (config.get('trackConsoleError')) {\n throw 'console.error: ' + Array.prototype.join.call(arguments, ' ');\n }\n };\n}\n","\nvar interfaceExtensions = [];\n\n/**\n * Registers an extension that extends the global `Mocha` implementation\n * with new helper methods. These helper methods will be added to the `window`\n * when tests run for both BDD and TDD interfaces.\n */\nexport function extendInterfaces(helperName, helperFactory) {\n interfaceExtensions.push(function() {\n var Mocha = window.Mocha;\n // For all Mocha interfaces (probably just TDD and BDD):\n Object.keys(Mocha.interfaces).forEach(function(interfaceName) {\n // This is the original callback that defines the interface (TDD or BDD):\n var originalInterface = Mocha.interfaces[interfaceName];\n // This is the name of the \"teardown\" or \"afterEach\" property for the\n // current interface:\n var teardownProperty = interfaceName === 'tdd' ? 'teardown' : 'afterEach';\n // The original callback is monkey patched with a new one that appends to\n // the global context however we want it to:\n Mocha.interfaces[interfaceName] = function(suite) {\n // Call back to the original callback so that we get the base interface:\n originalInterface.apply(this, arguments);\n // Register a listener so that we can further extend the base interface:\n suite.on('pre-require', function(context, file, mocha) {\n // Capture a bound reference to the teardown function as a convenience:\n var teardown = context[teardownProperty].bind(context);\n // Add our new helper to the testing context. The helper is generated\n // by a factory method that receives the context, the teardown function\n // and the interface name and returns the new method to be added to\n // that context:\n context[helperName] = helperFactory(context, teardown, interfaceName);\n });\n };\n });\n });\n}\n\n/**\n * Applies any registered interface extensions. The extensions will be applied\n * as many times as this function is called, so don't call it more than once.\n */\nexport function applyExtensions() {\n interfaceExtensions.forEach(function(applyExtension) {\n applyExtension();\n });\n}\n","import { extendInterfaces } from './extend';\n\nextendInterfaces('fixture', function(context, teardown) {\n\n // Return context.fixture if it is already a thing, for backwards\n // compatibility with `test-fixture-mocha.js`:\n return context.fixture || function fixture(fixtureId, model) {\n\n // Automatically register a teardown callback that will restore the\n // test-fixture:\n teardown(function() {\n document.getElementById(fixtureId).restore();\n });\n\n // Find the test-fixture with the provided ID and create it, returning\n // the results:\n return document.getElementById(fixtureId).create(model);\n };\n});\n","import { extendInterfaces } from './extend';\n\n/**\n * stub\n *\n * The stub addon allows the tester to partially replace the implementation of\n * an element with some custom implementation. Usage example:\n *\n * beforeEach(function() {\n * stub('x-foo', {\n * attached: function() {\n * // Custom implementation of the `attached` method of element `x-foo`..\n * },\n * otherMethod: function() {\n * // More custom implementation..\n * },\n * // etc..\n * });\n * });\n */\nextendInterfaces('stub', function(context, teardown) {\n\n return function stub(tagName, implementation) {\n // Find the prototype of the element being stubbed:\n var proto = document.createElement(tagName).constructor.prototype;\n\n // For all keys in the implementation to stub with..\n var keys = Object.keys(implementation);\n keys.forEach(function(key) {\n // Stub the method on the element prototype with Sinon:\n sinon.stub(proto, key, implementation[key]);\n });\n\n // After all tests..\n teardown(function() {\n // For all of the keys in the implementation we stubbed..\n keys.forEach(function(key) {\n // Restore the stub:\n if (proto[key].isSinonProxy) {\n proto[key].restore();\n }\n });\n });\n };\n});\n","import { extendInterfaces } from './extend';\n\n/**\n * replace\n *\n * The replace addon allows the tester to replace all usages of one element with\n * another element within all Polymer elements created within the time span of\n * the test. Usage example:\n *\n * beforeEach(function() {\n * replace('x-foo').with('x-fake-foo');\n * });\n *\n * All annotations and attributes will be set on the placement element the way\n * they were set for the original element.\n */\nextendInterfaces('replace', function(context, teardown) {\n return function replace(oldTagName) {\n return {\n with: function(tagName) {\n // Keep a reference to the original `Polymer.Base.instanceTemplate`\n // implementation for later:\n var originalInstanceTemplate = Polymer.Base.instanceTemplate;\n\n // Use Sinon to stub `Polymer.Base.instanceTemplate`:\n sinon.stub(Polymer.Base, 'instanceTemplate', function(template) {\n // The DOM to replace is the result of calling the \"original\"\n // `instanceTemplate` implementation:\n var dom = originalInstanceTemplate.apply(this, arguments);\n\n // The nodes to replace are queried from the DOM chunk:\n var nodes = Array.prototype.slice.call(dom.querySelectorAll(oldTagName));\n\n // For all of the nodes we want to place...\n nodes.forEach(function(node) {\n\n // Create a replacement:\n var replacement = document.createElement(tagName);\n\n // For all attributes in the original node..\n for (var index = 0; index < node.attributes.length; ++index) {\n // Set that attribute on the replacement:\n replacement.setAttribute(\n node.attributes[index].name, node.attributes[index].value);\n }\n\n // Replace the original node with the replacement node:\n node.parentNode.replaceChild(replacement, node);\n });\n\n return dom;\n });\n\n // After each test...\n teardown(function() {\n // Restore the stubbed version of `Polymer.Base.instanceTemplate`:\n if (Polymer.Base.instanceTemplate.isSinonProxy) {\n Polymer.Base.instanceTemplate.restore();\n }\n });\n }\n };\n };\n});\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as config from './config.js';\n\nimport './mocha/fixture.js';\nimport './mocha/stub.js';\nimport './mocha/replace.js';\nimport { applyExtensions } from './mocha/extend.js';\n\n// Mocha global helpers, broken out by testing method.\n//\n// Keys are the method for a particular interface; values are their analog in\n// the opposite interface.\nvar MOCHA_EXPORTS = {\n // https://github.com/visionmedia/mocha/blob/master/lib/interfaces/tdd.js\n tdd: {\n 'setup': '\"before\"',\n 'teardown': '\"after\"',\n 'suiteSetup': '\"beforeEach\"',\n 'suiteTeardown': '\"afterEach\"',\n 'suite': '\"describe\" or \"context\"',\n 'test': '\"it\" or \"specify\"',\n },\n // https://github.com/visionmedia/mocha/blob/master/lib/interfaces/bdd.js\n bdd: {\n 'before': '\"setup\"',\n 'after': '\"teardown\"',\n 'beforeEach': '\"suiteSetup\"',\n 'afterEach': '\"suiteTeardown\"',\n 'describe': '\"suite\"',\n 'context': '\"suite\"',\n 'xdescribe': '\"suite.skip\"',\n 'xcontext': '\"suite.skip\"',\n 'it': '\"test\"',\n 'xit': '\"test.skip\"',\n 'specify': '\"test\"',\n 'xspecify': '\"test.skip\"',\n },\n};\n\n/**\n * Exposes all Mocha methods up front, configuring and running mocha\n * automatically when you call them.\n *\n * The assumption is that it is a one-off (sub-)suite of tests being run.\n */\nexport function stubInterfaces() {\n Object.keys(MOCHA_EXPORTS).forEach(function(ui) {\n Object.keys(MOCHA_EXPORTS[ui]).forEach(function(key) {\n window[key] = function wrappedMochaFunction() {\n _setupMocha(ui, key, MOCHA_EXPORTS[ui][key]);\n if (!window[key] || window[key] === wrappedMochaFunction) {\n throw new Error('Expected mocha.setup to define ' + key);\n }\n window[key].apply(window, arguments);\n };\n });\n });\n}\n\n// Whether we've called `mocha.setup`\nvar _mochaIsSetup = false;\n\n/**\n * @param {string} ui Sets up mocha to run `ui`-style tests.\n * @param {string} key The method called that triggered this.\n * @param {string} alternate The matching method in the opposite interface.\n */\nfunction _setupMocha(ui, key, alternate) {\n var mochaOptions = config.get('mochaOptions');\n if (mochaOptions.ui && mochaOptions.ui !== ui) {\n var message = 'Mixing ' + mochaOptions.ui + ' and ' + ui + ' Mocha styles is not supported. ' +\n 'You called \"' + key + '\". Did you mean ' + alternate + '?';\n throw new Error(message);\n }\n if (_mochaIsSetup) return;\n\n applyExtensions();\n mochaOptions.ui = ui;\n mocha.setup(mochaOptions); // Note that the reporter is configured in run.js.\n}\n\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as util from '../util.js';\n\n// We capture console events when running tests; so make sure we have a\n// reference to the original one.\nvar console = window.console;\n\nvar FONT = ';font: normal 13px \"Roboto\", \"Helvetica Neue\", \"Helvetica\", sans-serif;';\nvar STYLES = {\n plain: FONT,\n suite: 'color: #5c6bc0' + FONT,\n test: FONT,\n passing: 'color: #259b24' + FONT,\n pending: 'color: #e65100' + FONT,\n failing: 'color: #c41411' + FONT,\n stack: 'color: #c41411',\n results: FONT + 'font-size: 16px',\n};\n\n// I don't think we can feature detect this one...\nvar userAgent = navigator.userAgent.toLowerCase();\nvar CAN_STYLE_LOG = userAgent.match('firefox') || userAgent.match('webkit');\nvar CAN_STYLE_GROUP = userAgent.match('webkit');\n// Track the indent for faked `console.group`\nvar logIndent = '';\n\nfunction log(text, style) {\n text = text.split('\\n').map(function(l) { return logIndent + l; }).join('\\n');\n if (CAN_STYLE_LOG) {\n console.log('%c' + text, STYLES[style] || STYLES.plain);\n } else {\n console.log(text);\n }\n}\n\nfunction logGroup(text, style) {\n if (CAN_STYLE_GROUP) {\n console.group('%c' + text, STYLES[style] || STYLES.plain);\n } else if (console.group) {\n console.group(text);\n } else {\n logIndent = logIndent + ' ';\n log(text, style);\n }\n}\n\nfunction logGroupEnd() {\n if (console.groupEnd) {\n console.groupEnd();\n } else {\n logIndent = logIndent.substr(0, logIndent.length - 2);\n }\n}\n\nfunction logException(error) {\n log(error.stack || error.message || error, 'stack');\n}\n\n/**\n * A Mocha reporter that logs results out to the web `console`.\n *\n * @param {!Mocha.Runner} runner The runner that is being reported on.\n */\nexport default function Console(runner) {\n Mocha.reporters.Base.call(this, runner);\n\n runner.on('suite', function(suite) {\n if (suite.root) return;\n logGroup(suite.title, 'suite');\n }.bind(this));\n\n runner.on('suite end', function(suite) {\n if (suite.root) return;\n logGroupEnd();\n }.bind(this));\n\n runner.on('test', function(test) {\n logGroup(test.title, 'test');\n }.bind(this));\n\n runner.on('pending', function(test) {\n logGroup(test.title, 'pending');\n }.bind(this));\n\n runner.on('fail', function(test, error) {\n logException(error);\n }.bind(this));\n\n runner.on('test end', function(test) {\n logGroupEnd();\n }.bind(this));\n\n runner.on('end', this.logSummary.bind(this));\n}\n\n/** Prints out a final summary of test results. */\nConsole.prototype.logSummary = function logSummary() {\n logGroup('Test Results', 'results');\n\n if (this.stats.failures > 0) {\n log(util.pluralizedStat(this.stats.failures, 'failing'), 'failing');\n }\n if (this.stats.pending > 0) {\n log(util.pluralizedStat(this.stats.pending, 'pending'), 'pending');\n }\n log(util.pluralizedStat(this.stats.passes, 'passing'));\n\n if (!this.stats.failures) {\n log('test suite passed', 'passing');\n }\n log('Evaluated ' + this.stats.tests + ' tests in ' + this.stats.duration + 'ms.');\n logGroupEnd();\n};\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * WCT-specific behavior on top of Mocha's default HTML reporter.\n *\n * @param {!Mocha.Runner} runner The runner that is being reported on.\n */\nexport default function HTML(runner) {\n var output = document.createElement('div');\n output.id = 'mocha';\n document.body.appendChild(output);\n\n runner.on('suite', function(test) {\n this.total = runner.total;\n }.bind(this));\n\n Mocha.reporters.HTML.call(this, runner);\n}\n\n// Woo! What a hack. This just saves us from adding a bunch of complexity around\n// style loading.\nvar style = document.createElement('style');\nstyle.textContent = 'html, body {' +\n ' position: relative;' +\n ' height: 100%;' +\n ' width: 100%;' +\n ' min-width: 900px;' +\n '}' +\n '#mocha, #subsuites {' +\n ' height: 100%;' +\n ' position: absolute;' +\n ' top: 0;' +\n '}' +\n '#mocha {' +\n ' box-sizing: border-box;' +\n ' margin: 0 !important;' +\n ' overflow-y: auto;' +\n ' padding: 60px 20px;' +\n ' right: 0;' +\n ' left: 500px;' +\n '}' +\n '#subsuites {' +\n ' -ms-flex-direction: column;' +\n ' -webkit-flex-direction: column;' +\n ' display: -ms-flexbox;' +\n ' display: -webkit-flex;' +\n ' display: flex;' +\n ' flex-direction: column;' +\n ' left: 0;' +\n ' width: 500px;' +\n '}' +\n '#subsuites .subsuite {' +\n ' border: 0;' +\n ' width: 100%;' +\n ' height: 100%;' +\n '}' +\n '#mocha .test.pass .duration {' +\n ' color: #555 !important;' +\n '}';\ndocument.head.appendChild(style);\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as util from '../util.js';\n\nvar STACKY_CONFIG = {\n indent: ' ',\n locationStrip: [\n /^https?:\\/\\/[^\\/]+/,\n /\\?.*$/,\n ],\n filter: function(line) {\n return line.location.match(/\\/web-component-tester\\/[^\\/]+(\\?.*)?$/);\n },\n};\n\n// https://github.com/visionmedia/mocha/blob/master/lib/runner.js#L36-46\nvar MOCHA_EVENTS = [\n 'start',\n 'end',\n 'suite',\n 'suite end',\n 'test',\n 'test end',\n 'hook',\n 'hook end',\n 'pass',\n 'fail',\n 'pending',\n 'childRunner end'\n];\n\n// Until a suite has loaded, we assume this many tests in it.\nvar ESTIMATED_TESTS_PER_SUITE = 3;\n\n/**\n * A Mocha-like reporter that combines the output of multiple Mocha suites.\n *\n * @param {number} numSuites The number of suites that will be run, in order to\n * estimate the total number of tests that will be performed.\n * @param {!Array.<!Mocha.reporters.Base>} reporters The set of reporters that\n * should receive the unified event stream.\n * @param {MultiReporter} parent The parent reporter, if present.\n */\nexport default function MultiReporter(numSuites, reporters, parent) {\n this.reporters = reporters.map(function(reporter) {\n return new reporter(this);\n }.bind(this));\n\n this.parent = parent;\n this.basePath = parent && parent.basePath || util.basePath(window.location);\n\n this.total = numSuites * ESTIMATED_TESTS_PER_SUITE;\n // Mocha reporters assume a stream of events, so we have to be careful to only\n // report on one runner at a time...\n this.currentRunner = null;\n // ...while we buffer events for any other active runners.\n this.pendingEvents = [];\n\n this.emit('start');\n}\n\n/**\n * @param {!Location|string} location The location this reporter represents.\n * @return {!Mocha.reporters.Base} A reporter-like \"class\" for each child suite\n * that should be passed to `mocha.run`.\n */\nMultiReporter.prototype.childReporter = function childReporter(location) {\n var name = this.suiteTitle(location);\n // The reporter is used as a constructor, so we can't depend on `this` being\n // properly bound.\n var self = this;\n function reporter(runner) {\n runner.name = name;\n self.bindChildRunner(runner);\n }\n reporter.title = name;\n return reporter;\n};\n\n/** Must be called once all runners have finished. */\nMultiReporter.prototype.done = function done() {\n this.complete = true;\n this.flushPendingEvents();\n this.emit('end');\n};\n\n/**\n * Emit a top level test that is not part of any suite managed by this reporter.\n *\n * Helpful for reporting on global errors, loading issues, etc.\n *\n * @param {string} title The title of the test.\n * @param {*} opt_error An error associated with this test. If falsy, test is\n * considered to be passing.\n * @param {string} opt_suiteTitle Title for the suite that's wrapping the test.\n * @param {?boolean} opt_estimated If this test was included in the original\n * estimate of `numSuites`.\n */\nMultiReporter.prototype.emitOutOfBandTest = function emitOutOfBandTest(title, opt_error, opt_suiteTitle, opt_estimated) {\n util.debug('MultiReporter#emitOutOfBandTest(', arguments, ')');\n var root = new Mocha.Suite();\n root.title = opt_suiteTitle || '';\n var test = new Mocha.Test(title, function() {\n });\n test.parent = root;\n test.state = opt_error ? 'failed' : 'passed';\n test.err = opt_error;\n\n if (!opt_estimated) {\n this.total = this.total + ESTIMATED_TESTS_PER_SUITE;\n }\n\n var runner = {total: 1};\n this.proxyEvent('start', runner);\n this.proxyEvent('suite', runner, root);\n this.proxyEvent('test', runner, test);\n if (opt_error) {\n this.proxyEvent('fail', runner, test, opt_error);\n } else {\n this.proxyEvent('pass', runner, test);\n }\n this.proxyEvent('test end', runner, test);\n this.proxyEvent('suite end', runner, root);\n this.proxyEvent('end', runner);\n};\n\n/**\n * @param {!Location|string} location\n * @return {string}\n */\nMultiReporter.prototype.suiteTitle = function suiteTitle(location) {\n var path = util.relativeLocation(location, this.basePath);\n path = util.cleanLocation(path);\n return path;\n};\n\n// Internal Interface\n\n/** @param {!Mocha.runners.Base} runner The runner to listen to events for. */\nMultiReporter.prototype.bindChildRunner = function bindChildRunner(runner) {\n MOCHA_EVENTS.forEach(function(eventName) {\n runner.on(eventName, this.proxyEvent.bind(this, eventName, runner));\n }.bind(this));\n};\n\n/**\n * Evaluates an event fired by `runner`, proxying it forward or buffering it.\n *\n * @param {string} eventName\n * @param {!Mocha.runners.Base} runner The runner that emitted this event.\n * @param {...*} var_args Any additional data passed as part of the event.\n */\nMultiReporter.prototype.proxyEvent = function proxyEvent(eventName, runner, var_args) {\n var extraArgs = Array.prototype.slice.call(arguments, 2);\n if (this.complete) {\n console.warn('out of order Mocha event for ' + runner.name + ':', eventName, extraArgs);\n return;\n }\n\n if (this.currentRunner && runner !== this.currentRunner) {\n this.pendingEvents.push(arguments);\n return;\n }\n util.debug('MultiReporter#proxyEvent(', arguments, ')');\n\n // This appears to be a Mocha bug: Tests failed by passing an error to their\n // done function don't set `err` properly.\n //\n // TODO(nevir): Track down.\n if (eventName === 'fail' && !extraArgs[0].err) {\n extraArgs[0].err = extraArgs[1];\n }\n\n if (eventName === 'start') {\n this.onRunnerStart(runner);\n } else if (eventName === 'end') {\n this.onRunnerEnd(runner);\n } else {\n this.cleanEvent(eventName, runner, extraArgs);\n this.emit.apply(this, [eventName].concat(extraArgs));\n }\n};\n\n/**\n * Cleans or modifies an event if needed.\n *\n * @param {string} eventName\n * @param {!Mocha.runners.Base} runner The runner that emitted this event.\n * @param {!Array.<*>} extraArgs\n */\nMultiReporter.prototype.cleanEvent = function cleanEvent(eventName, runner, extraArgs) {\n // Suite hierarchy\n if (extraArgs[0]) {\n extraArgs[0] = this.showRootSuite(extraArgs[0]);\n }\n\n // Normalize errors\n if (eventName === 'fail') {\n extraArgs[1] = Stacky.normalize(extraArgs[1], STACKY_CONFIG);\n }\n if (extraArgs[0] && extraArgs[0].err) {\n extraArgs[0].err = Stacky.normalize(extraArgs[0].err, STACKY_CONFIG);\n }\n};\n\n/**\n * We like to show the root suite's title, which requires a little bit of\n * trickery in the suite hierarchy.\n *\n * @param {!Mocha.Runnable} node\n */\nMultiReporter.prototype.showRootSuite = function showRootSuite(node) {\n var leaf = node = Object.create(node);\n while (node && node.parent) {\n var wrappedParent = Object.create(node.parent);\n node.parent = wrappedParent;\n node = wrappedParent;\n }\n node.root = false;\n\n return leaf;\n};\n\n/** @param {!Mocha.runners.Base} runner */\nMultiReporter.prototype.onRunnerStart = function onRunnerStart(runner) {\n util.debug('MultiReporter#onRunnerStart:', runner.name);\n this.total = this.total - ESTIMATED_TESTS_PER_SUITE + runner.total;\n this.currentRunner = runner;\n};\n\n/** @param {!Mocha.runners.Base} runner */\nMultiReporter.prototype.onRunnerEnd = function onRunnerEnd(runner) {\n util.debug('MultiReporter#onRunnerEnd:', runner.name);\n this.currentRunner = null;\n this.flushPendingEvents();\n};\n\n/**\n * Flushes any buffered events and runs them through `proxyEvent`. This will\n * loop until all buffered runners are complete, or we have run out of buffered\n * events.\n */\nMultiReporter.prototype.flushPendingEvents = function flushPendingEvents() {\n var events = this.pendingEvents;\n this.pendingEvents = [];\n events.forEach(function(eventArgs) {\n this.proxyEvent.apply(this, eventArgs);\n }.bind(this));\n};\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as util from '../util.js';\n\nvar ARC_OFFSET = 0; // start at the right.\nvar ARC_WIDTH = 6;\n\n/**\n * A Mocha reporter that updates the document's title and favicon with\n * at-a-glance stats.\n *\n * @param {!Mocha.Runner} runner The runner that is being reported on.\n */\nexport default function Title(runner) {\n Mocha.reporters.Base.call(this, runner);\n\n runner.on('test end', this.report.bind(this));\n}\n\n/** Reports current stats via the page title and favicon. */\nTitle.prototype.report = function report() {\n this.updateTitle();\n this.updateFavicon();\n};\n\n/** Updates the document title with a summary of current stats. */\nTitle.prototype.updateTitle = function updateTitle() {\n if (this.stats.failures > 0) {\n document.title = util.pluralizedStat(this.stats.failures, 'failing');\n } else {\n document.title = util.pluralizedStat(this.stats.passes, 'passing');\n }\n};\n\n/**\n * Draws an arc for the favicon status, relative to the total number of tests.\n *\n * @param {!CanvasRenderingContext2D} context\n * @param {number} total\n * @param {number} start\n * @param {number} length\n * @param {string} color\n */\nfunction drawFaviconArc(context, total, start, length, color) {\n var arcStart = ARC_OFFSET + Math.PI * 2 * (start / total);\n var arcEnd = ARC_OFFSET + Math.PI * 2 * ((start + length) / total);\n\n context.beginPath();\n context.strokeStyle = color;\n context.lineWidth = ARC_WIDTH;\n context.arc(16, 16, 16 - ARC_WIDTH / 2, arcStart, arcEnd);\n context.stroke();\n}\n\n/** Updates the document's favicon w/ a summary of current stats. */\nTitle.prototype.updateFavicon = function updateFavicon() {\n var canvas = document.createElement('canvas');\n canvas.height = canvas.width = 32;\n var context = canvas.getContext('2d');\n\n var passing = this.stats.passes;\n var pending = this.stats.pending;\n var failing = this.stats.failures;\n var total = Math.max(this.runner.total, passing + pending + failing);\n drawFaviconArc(context, total, 0, passing, '#0e9c57');\n drawFaviconArc(context, total, passing, pending, '#f3b300');\n drawFaviconArc(context, total, pending + passing, failing, '#ff5621');\n\n this.setFavicon(canvas.toDataURL());\n};\n\n/** Sets the current favicon by URL. */\nTitle.prototype.setFavicon = function setFavicon(url) {\n var current = document.head.querySelector('link[rel=\"icon\"]');\n if (current) {\n document.head.removeChild(current);\n }\n\n var link = document.createElement('link');\n link.rel = 'icon';\n link.type = 'image/x-icon';\n link.href = url;\n link.setAttribute('sizes', '32x32');\n document.head.appendChild(link);\n};\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as suites from './suites.js';\nimport ConsoleReporter from './reporters/console.js';\nimport HTMLReporter from './reporters/html.js';\nimport MultiReporter from './reporters/multi.js';\nimport TitleReporter from './reporters/title.js';\n\nexport var htmlSuites = [];\nexport var jsSuites = [];\n\n/**\n * @param {CLISocket} socket The CLI socket, if present.\n * @param {MultiReporter} parent The parent reporter, if present.\n * @return {!Array.<!Mocha.reporters.Base} The reporters that should be used.\n */\nexport function determineReporters(socket, parent) {\n // Parents are greedy.\n if (parent) {\n return [parent.childReporter(window.location)];\n }\n\n // Otherwise, we get to run wild without any parental supervision!\n var reporters = [TitleReporter, ConsoleReporter];\n\n if (socket) {\n reporters.push(function(runner) {\n socket.observe(runner);\n });\n }\n\n if (suites.htmlSuites.length > 0 || suites.jsSuites.length > 0) {\n reporters.push(HTMLReporter);\n }\n\n return reporters;\n}\n\n/**\n * Yeah, hideous, but this allows us to be loaded before Mocha, which is handy.\n */\nexport function injectMocha(Mocha) {\n _injectPrototype(ConsoleReporter, Mocha.reporters.Base.prototype);\n _injectPrototype(HTMLReporter, Mocha.reporters.HTML.prototype);\n // Mocha doesn't expose its `EventEmitter` shim directly, so:\n _injectPrototype(MultiReporter, Object.getPrototypeOf(Mocha.Runner.prototype));\n}\n\nfunction _injectPrototype(klass, prototype) {\n var newPrototype = Object.create(prototype);\n // Only support\n Object.keys(klass.prototype).forEach(function(key) {\n newPrototype[key] = klass.prototype[key];\n });\n\n klass.prototype = newPrototype;\n}\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport * as config from './config.js';\nimport * as reporters from './reporters.js';\nimport * as util from './util.js';\n\n/**\n * Loads all environment scripts ...synchronously ...after us.\n */\nexport function loadSync() {\n util.debug('Loading environment scripts:');\n var a11ySuite = 'web-component-tester/data/a11ySuite.js';\n var scripts = config.get('environmentScripts');\n var a11ySuiteWillBeLoaded = window.__generatedByWct || scripts.indexOf(a11ySuite) > -1;\n if (!a11ySuiteWillBeLoaded) {\n // wct is running as a bower dependency, load a11ySuite from data/\n scripts.push(a11ySuite);\n }\n scripts.forEach(function(path) {\n var url = util.expandUrl(path, config.get('root'));\n util.debug('Loading environment script:', url);\n // Synchronous load.\n document.write('<script src=\"' + encodeURI(url) + '\"></script>'); // jshint ignore:line\n });\n util.debug('Environment scripts loaded');\n\n var imports = config.get('environmentImports');\n imports.forEach(function(path) {\n var url = util.expandUrl(path, config.get('root'));\n util.debug('Loading environment import:', url);\n // Synchronous load.\n document.write('<link rel=\"import\" href=\"' + encodeURI(url) + '\">'); // jshint ignore:line\n });\n util.debug('Environment imports loaded');\n}\n\n/**\n * We have some hard dependencies on things that should be loaded via\n * `environmentScripts`, so we assert that they're present here; and do any\n * post-facto setup.\n */\nexport function ensureDependenciesPresent() {\n _ensureMocha();\n _checkChai();\n}\n\nfunction _ensureMocha() {\n var Mocha = window.Mocha;\n if (!Mocha) {\n throw new Error('WCT requires Mocha. Please ensure that it is present in WCT.environmentScripts, or that you load it before loading web-component-tester/browser.js');\n }\n reporters.injectMocha(Mocha);\n // Magic loading of mocha's stylesheet\n var mochaPrefix = util.scriptPrefix('mocha.js');\n // only load mocha stylesheet for the test runner output\n // Not the end of the world, if it doesn't load.\n if (mochaPrefix && window.top === window.self) {\n util.loadStyle(mochaPrefix + 'mocha.css');\n }\n}\n\nfunction _checkChai() {\n if (!window.chai) {\n util.debug('Chai not present; not registering shorthands');\n return;\n }\n\n window.assert = window.chai.assert;\n window.expect = window.chai.expect;\n}\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport ChildRunner from './childrunner.js';\nimport * as util from './util.js';\n\nvar SOCKETIO_ENDPOINT = window.location.protocol + '//' + window.location.host;\nvar SOCKETIO_LIBRARY = SOCKETIO_ENDPOINT + '/socket.io/socket.io.js';\n\n/**\n * A socket for communication between the CLI and browser runners.\n *\n * @param {string} browserId An ID generated by the CLI runner.\n * @param {!io.Socket} socket The socket.io `Socket` to communicate over.\n */\nexport default function CLISocket(browserId, socket) {\n this.browserId = browserId;\n this.socket = socket;\n}\n\n/**\n * @param {!Mocha.Runner} runner The Mocha `Runner` to observe, reporting\n * interesting events back to the CLI runner.\n */\nCLISocket.prototype.observe = function observe(runner) {\n this.emitEvent('browser-start', {\n url: window.location.toString(),\n });\n\n // We only emit a subset of events that we care about, and follow a more\n // general event format that is hopefully applicable to test runners beyond\n // mocha.\n //\n // For all possible mocha events, see:\n // https://github.com/visionmedia/mocha/blob/master/lib/runner.js#L36\n runner.on('test', function(test) {\n this.emitEvent('test-start', {test: getTitles(test)});\n }.bind(this));\n\n runner.on('test end', function(test) {\n this.emitEvent('test-end', {\n state: getState(test),\n test: getTitles(test),\n duration: test.duration,\n error: test.err,\n });\n }.bind(this));\n\n runner.on('childRunner start', function(childRunner) {\n this.emitEvent('sub-suite-start', childRunner.share);\n }.bind(this));\n\n runner.on('childRunner end', function(childRunner) {\n this.emitEvent('sub-suite-end', childRunner.share);\n }.bind(this));\n\n runner.on('end', function() {\n this.emitEvent('browser-end');\n }.bind(this));\n};\n\n/**\n * @param {string} event The name of the event to fire.\n * @param {*} data Additional data to pass with the event.\n */\nCLISocket.prototype.emitEvent = function emitEvent(event, data) {\n this.socket.emit('client-event', {\n browserId: this.browserId,\n event: event,\n data: data,\n });\n};\n\n/**\n * Builds a `CLISocket` if we are within a CLI-run environment; short-circuits\n * otherwise.\n *\n * @param {function(*, CLISocket)} done Node-style callback.\n */\nCLISocket.init = function init(done) {\n var browserId = util.getParam('cli_browser_id');\n if (!browserId) return done();\n // Only fire up the socket for root runners.\n if (ChildRunner.current()) return done();\n\n util.loadScript(SOCKETIO_LIBRARY, function(error) {\n if (error) return done(error);\n\n var socket = io(SOCKETIO_ENDPOINT);\n socket.on('error', function(error) {\n socket.off();\n done(error);\n });\n\n socket.on('connect', function() {\n socket.off();\n done(null, new CLISocket(browserId, socket));\n });\n });\n};\n\n// Misc Utility\n\n/**\n * @param {!Mocha.Runnable} runnable The test or suite to extract titles from.\n * @return {!Array.<string>} The titles of the runnable and its parents.\n */\nfunction getTitles(runnable) {\n var titles = [];\n while (runnable && !runnable.root && runnable.title) {\n titles.unshift(runnable.title);\n runnable = runnable.parent;\n }\n return titles;\n}\n\n/**\n * @param {!Mocha.Runnable} runnable\n * @return {string}\n */\nfunction getState(runnable) {\n if (runnable.state === 'passed') {\n return 'passing';\n } else if (runnable.state == 'failed') {\n return 'failing';\n } else if (runnable.pending) {\n return 'pending';\n } else {\n return 'unknown';\n }\n}\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n// Make sure that we use native timers, in case they're being stubbed out.\nvar setInterval = window.setInterval; // jshint ignore:line\nvar setTimeout = window.setTimeout; // jshint ignore:line\nvar requestAnimationFrame = window.requestAnimationFrame; // jshint ignore:line\n\n/**\n * Runs `stepFn`, catching any error and passing it to `callback` (Node-style).\n * Otherwise, calls `callback` with no arguments on success.\n *\n * @param {function()} callback\n * @param {function()} stepFn\n */\nwindow.safeStep = function safeStep(callback, stepFn) {\n var err;\n try {\n stepFn();\n } catch (error) {\n err = error;\n }\n callback(err);\n};\n\n/**\n * Runs your test at declaration time (before Mocha has begun tests). Handy for\n * when you need to test document initialization.\n *\n * Be aware that any errors thrown asynchronously cannot be tied to your test.\n * You may want to catch them and pass them to the done event, instead. See\n * `safeStep`.\n *\n * @param {string} name The name of the test.\n * @param {function(?function())} testFn The test function. If an argument is\n * accepted, the test will be treated as async, just like Mocha tests.\n */\nwindow.testImmediate = function testImmediate(name, testFn) {\n if (testFn.length > 0) {\n return testImmediateAsync(name, testFn);\n }\n\n var err;\n try {\n testFn();\n } catch (error) {\n err = error;\n }\n\n test(name, function(done) {\n done(err);\n });\n};\n\n/**\n * An async-only variant of `testImmediate`.\n *\n * @param {string} name\n * @param {function(?function())} testFn\n */\nwindow.testImmediateAsync = function testImmediateAsync(name, testFn) {\n var testComplete = false;\n var err;\n\n test(name, function(done) {\n var intervalId = setInterval(function() {\n if (!testComplete) return;\n clearInterval(intervalId);\n done(err);\n }, 10);\n });\n\n try {\n testFn(function(error) {\n if (error) err = error;\n testComplete = true;\n });\n } catch (error) {\n err = error;\n testComplete = true;\n }\n};\n\n/**\n * Triggers a flush of any pending events, observations, etc and calls you back\n * after they have been processed.\n *\n * @param {function()} callback\n */\nwindow.flush = function flush(callback) {\n // Ideally, this function would be a call to Polymer.dom.flush, but that doesn't\n // support a callback yet (https://github.com/Polymer/polymer-dev/issues/851),\n // ...and there's cross-browser flakiness to deal with.\n\n // Make sure that we're invoking the callback with no arguments so that the\n // caller can pass Mocha callbacks, etc.\n var done = function done() { callback(); };\n\n // Because endOfMicrotask is flaky for IE, we perform microtask checkpoints\n // ourselves (https://github.com/Polymer/polymer-dev/issues/114):\n var isIE = navigator.appName == 'Microsoft Internet Explorer';\n if (isIE && window.Platform && window.Platform.performMicrotaskCheckpoint) {\n var reallyDone = done;\n done = function doneIE() {\n Platform.performMicrotaskCheckpoint();\n setTimeout(reallyDone, 0);\n };\n }\n\n // Everyone else gets a regular flush.\n var scope;\n if (window.Polymer && window.Polymer.dom && window.Polymer.dom.flush) {\n scope = window.Polymer.dom;\n } else if (window.Polymer && window.Polymer.flush) {\n scope = window.Polymer;\n } else if (window.WebComponents && window.WebComponents.flush) {\n scope = window.WebComponents;\n }\n if (scope) {\n scope.flush();\n }\n\n // Ensure that we are creating a new _task_ to allow all active microtasks to\n // finish (the code you're testing may be using endOfMicrotask, too).\n setTimeout(done, 0);\n};\n\n/**\n * Advances a single animation frame.\n *\n * Calls `flush`, `requestAnimationFrame`, `flush`, and `callback` sequentially\n * @param {function()} callback\n */\nwindow.animationFrameFlush = function animationFrameFlush(callback) {\n flush(function() {\n requestAnimationFrame(function() {\n flush(callback);\n });\n });\n};\n\n/**\n * DEPRECATED: Use `flush`.\n * @param {function} callback\n */\nwindow.asyncPlatformFlush = function asyncPlatformFlush(callback) {\n console.warn('asyncPlatformFlush is deprecated in favor of the more terse flush()');\n return window.flush(callback);\n};\n\n/**\n *\n */\nwindow.waitFor = function waitFor(fn, next, intervalOrMutationEl, timeout, timeoutTime) {\n timeoutTime = timeoutTime || Date.now() + (timeout || 1000);\n intervalOrMutationEl = intervalOrMutationEl || 32;\n try {\n fn();\n } catch (e) {\n if (Date.now() > timeoutTime) {\n throw e;\n } else {\n if (isNaN(intervalOrMutationEl)) {\n intervalOrMutationEl.onMutation(intervalOrMutationEl, function() {\n waitFor(fn, next, intervalOrMutationEl, timeout, timeoutTime);\n });\n } else {\n setTimeout(function() {\n waitFor(fn, next, intervalOrMutationEl, timeout, timeoutTime);\n }, intervalOrMutationEl);\n }\n return;\n }\n }\n next();\n};\n","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n/**\n * This file is the entry point into `web-component-tester`'s browser client.\n */\nimport * as config from './config.js';\nimport * as environment from './environment.js';\nimport * as errors from './environment/errors.js';\nimport * as mocha from './mocha';\nimport * as reporters from './reporters';\nimport * as suites from './suites.js';\nimport * as util from './util.js';\nimport CLISocket from './clisocket.js';\nimport ChildRunner from './childrunner.js';\nimport MultiReporter from './reporters/multi.js';\n// Registers a bunch of globals:\nimport './environment/helpers.js';\n\n// You can configure WCT before it has loaded by assigning your custom\n// configuration to the global `WCT`.\nconfig.setup(window.WCT);\n\n// Maybe some day we'll expose WCT as a module to whatever module registry you\n// are using (aka the UMD approach), or as an es6 module.\nvar WCT = window.WCT = {};\n// A generic place to hang data about the current suite. This object is reported\n// back via the `sub-suite-start` and `sub-suite-end` events.\nWCT.share = {};\n// Until then, we get to rely on it to expose parent runners to their children.\nWCT._ChildRunner = ChildRunner;\nWCT._config = config._config;\n\n\n// Public Interface\n\n/**\n * Loads suites of tests, supporting both `.js` and `.html` files.\n *\n * @param {!Array.<string>} files The files to load.\n */\nWCT.loadSuites = suites.loadSuites;\n\n\n// Load Process\n\nerrors.listenForErrors();\nmocha.stubInterfaces();\nenvironment.loadSync();\n\n// Give any scripts on the page a chance to declare tests and muck with things.\ndocument.addEventListener('DOMContentLoaded', function() {\n util.debug('DOMContentLoaded');\n\n environment.ensureDependenciesPresent();\n\n // We need the socket built prior to building its reporter.\n CLISocket.init(function(error, socket) {\n if (error) throw error;\n\n // Are we a child of another run?\n var current = ChildRunner.current();\n var parent = current && current.parentScope.WCT._reporter;\n util.debug('parentReporter:', parent);\n\n var childSuites = suites.activeChildSuites();\n var reportersToUse = reporters.determineReporters(socket, parent);\n // +1 for any local tests.\n var reporter = new MultiReporter(childSuites.length + 1, reportersToUse, parent);\n WCT._reporter = reporter; // For environment/compatibility.js\n\n // We need the reporter so that we can report errors during load.\n suites.loadJsSuites(reporter, function(error) {\n // Let our parent know that we're about to start the tests.\n if (current) current.ready(error);\n if (error) throw error;\n\n // Emit any errors we've encountered up til now\n errors.globalErrors.forEach(function onError(error) {\n reporter.emitOutOfBandTest('Test Suite Initialization', error);\n });\n\n suites.runSuites(reporter, childSuites, function(error) {\n // Make sure to let our parent know that we're done.\n if (current) current.done();\n if (error) throw error;\n });\n });\n });\n});\n"],"names":["config.get","util.parseUrl","util.mergeParams","util.getParams","util.paramsToQuery","util.debug","util.scriptPrefix","util.basePath","htmlSuites","jsSuites","util.getParam","util.cleanLocation","util.loadScript","util.parallel","util.whenFrameworksReady","console","util.pluralizedStat","util.relativeLocation","TitleReporter","ConsoleReporter","suites.htmlSuites","suites.jsSuites","HTMLReporter","util.expandUrl","reporters.injectMocha","util.loadStyle","setTimeout","config.setup","config._config","suites.loadSuites","errors.listenForErrors","mocha.stubInterfaces","environment.loadSync","environment.ensureDependenciesPresent","suites.activeChildSuites","reporters.determineReporters","suites.loadJsSuites","errors.globalErrors","suites.runSuites"],"mappings":";;;;;;;;;;;;;;;;AAgBO,SAAS,mBAAmB,CAAC,QAAQ,EAAE;EAC5C,KAAK,CAAC,qBAAqB,CAAC;EAC5B,IAAI,IAAI,GAAG,WAAW;IACpB,KAAK,CAAC,0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