diff options
Diffstat (limited to 'chromium/third_party/catapult/tracing/tracing/base/unittest')
7 files changed, 110 insertions, 88 deletions
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/html_test_results.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/html_test_results.html index fa65a9e88fb..d648fff082d 100644 --- a/chromium/third_party/catapult/tracing/tracing/base/unittest/html_test_results.html +++ b/chromium/third_party/catapult/tracing/tracing/base/unittest/html_test_results.html @@ -116,10 +116,10 @@ tr.exportTo('tr.b.unittest', function() { var HTMLTestCaseResult = tr.ui.b.define('x-html-test-case-result'); HTMLTestCaseResult.prototype = { - __proto__: HTMLUnknownElement.prototype, + __proto__: HTMLDivElement.prototype, decorate: function() { - this.appendChild(tr.ui.b.instantiateTemplate( + Polymer.dom(this).appendChild(tr.ui.b.instantiateTemplate( '#x-html-test-case-result-template', THIS_DOC)); this.testCase_ = undefined; this.testCaseHRef_ = undefined; @@ -157,61 +157,68 @@ tr.exportTo('tr.b.unittest', function() { this.updateTitle_(); }, updateTitle_: function() { - var titleEl = this.querySelector('#title'); + var titleEl = Polymer.dom(this).querySelector('#title'); if (this.testCase_ === undefined) { - titleEl.textContent = ''; + Polymer.dom(titleEl).textContent = ''; return; } if (this.testCaseHRef_) { - titleEl.innerHTML = '<a href="' + this.testCaseHRef_ + '">' + + Polymer.dom(titleEl).innerHTML = + '<a href="' + this.testCaseHRef_ + '">' + this.testCase_.fullyQualifiedName + '</a>'; } else { - titleEl.textContent = this.testCase_.fullyQualifiedName; + Polymer.dom(titleEl).textContent = this.testCase_.fullyQualifiedName; } }, addError: function(normalizedException) { var errorEl = document.createElement('x-html-test-case-error'); - errorEl.appendChild(tr.ui.b.instantiateTemplate( + Polymer.dom(errorEl).appendChild(tr.ui.b.instantiateTemplate( '#x-html-test-case-error-template', THIS_DOC)); - errorEl.querySelector('#stack').textContent = normalizedException.stack; - this.querySelector('#details').appendChild(errorEl); + Polymer.dom(Polymer.dom(errorEl).querySelector('#stack')). + textContent = normalizedException.stack; + Polymer.dom(Polymer.dom(this).querySelector('#details')).appendChild( + errorEl); this.updateColorAndStatus_(); }, addFlaky: function() { var flakyEl = document.createElement('x-html-test-case-flaky'); - flakyEl.appendChild(tr.ui.b.instantiateTemplate( + Polymer.dom(flakyEl).appendChild(tr.ui.b.instantiateTemplate( '#x-html-test-case-flaky-template', THIS_DOC)); - flakyEl.querySelector('#message').textContent = 'FLAKY'; - this.querySelector('#details').appendChild(flakyEl); + Polymer.dom(Polymer.dom(flakyEl).querySelector('#message')) + .textContent = 'FLAKY'; + Polymer.dom(Polymer.dom(this).querySelector('#details')).appendChild( + flakyEl); this.updateColorAndStatus_(); }, addHTMLOutput: function(element) { var htmlResultEl = document.createElement('x-html-test-case-html-result'); - htmlResultEl.appendChild(element); - this.querySelector('#details').appendChild(htmlResultEl); + Polymer.dom(htmlResultEl).appendChild(element); + Polymer.dom(Polymer.dom(this).querySelector('#details')) + .appendChild(htmlResultEl); }, updateHTMLOutputDisplayState_: function() { - var htmlResults = this.querySelectorAll('x-html-test-case-html-result'); + var htmlResults = + Polymer.dom(this).querySelectorAll('x-html-test-case-html-result'); var display; if (this.showHTMLOutput) display = ''; else - display = (this.testStatus_ == TestStatus.RUNNING) ? '' : 'none'; + display = (this.testStatus_ === TestStatus.RUNNING) ? '' : 'none'; for (var i = 0; i < htmlResults.length; i++) htmlResults[i].style.display = display; }, get hadErrors() { - return !!this.querySelector('x-html-test-case-error'); + return !!Polymer.dom(this).querySelector('x-html-test-case-error'); }, get isFlaky() { - return !!this.querySelector('x-html-test-case-flaky'); + return !!Polymer.dom(this).querySelector('x-html-test-case-flaky'); }, get duration() { @@ -242,10 +249,10 @@ tr.exportTo('tr.b.unittest', function() { } else if (this.isFlaky) { colorCls = 'unittest-flaky'; status = 'flaky'; - } else if (this.testStatus_ == TestStatus.PENDING) { + } else if (this.testStatus_ === TestStatus.PENDING) { colorCls = 'unittest-pending'; status = 'pending'; - } else if (this.testStatus_ == TestStatus.RUNNING) { + } else if (this.testStatus_ === TestStatus.RUNNING) { colorCls = 'unittest-running'; status = 'running'; } else { // DONE_RUNNING and no errors @@ -253,12 +260,12 @@ tr.exportTo('tr.b.unittest', function() { status = 'passed'; } - var statusEl = this.querySelector('#status'); + var statusEl = Polymer.dom(this).querySelector('#status'); if (this.duration_) - statusEl.textContent = status + ' (' + + Polymer.dom(statusEl).textContent = status + ' (' + this.duration_.toFixed(2) + 'ms)'; else - statusEl.textContent = status; + Polymer.dom(statusEl).textContent = status; statusEl.className = colorCls; }, @@ -268,7 +275,8 @@ tr.exportTo('tr.b.unittest', function() { set testReturnValue(testReturnValue) { this.testReturnValue_ = testReturnValue; - this.querySelector('#return-value').textContent = testReturnValue; + Polymer.dom(Polymer.dom(this).querySelector('#return-value')) + .textContent = testReturnValue; } }; @@ -315,7 +323,8 @@ tr.exportTo('tr.b.unittest', function() { set showHTMLOutput(showHTMLOutput) { this.showHTMLOutput_ = showHTMLOutput; - var testCaseResults = this.querySelectorAll('x-html-test-case-result'); + var testCaseResults = + Polymer.dom(this).querySelectorAll('x-html-test-case-result'); for (var i = 0; i < testCaseResults.length; i++) testCaseResults[i].showHTMLOutput = showHTMLOutput; }, @@ -327,7 +336,8 @@ tr.exportTo('tr.b.unittest', function() { set showPendingAndPassedTests(showPendingAndPassedTests) { this.showPendingAndPassedTests_ = showPendingAndPassedTests; - var testCaseResults = this.querySelectorAll('x-html-test-case-result'); + var testCaseResults = + Polymer.dom(this).querySelectorAll('x-html-test-case-result'); for (var i = testCaseResults.length - 1; i >= 0; i--) this.updateDisplayStateForResult_(testCaseResults[i]); }, @@ -335,7 +345,7 @@ tr.exportTo('tr.b.unittest', function() { updateDisplayStateForResult_: function(res) { var display; if (this.showPendingAndPassedTests_) { - if (res.testStatus == TestStatus.RUNNING || + if (res.testStatus === TestStatus.RUNNING || res.hadErrors) { display = ''; } else { @@ -354,14 +364,14 @@ tr.exportTo('tr.b.unittest', function() { testCaseResult.showHTMLOutput = this.showHTMLOutput_; testCaseResult.testCase = testCase; if ((i % 2) === 0) - testCaseResult.classList.add('dark'); + Polymer.dom(testCaseResult).classList.add('dark'); var href = this.getHRefForTestCase(testCase); if (href) testCaseResult.testCaseHRef = href; testCaseResult.testStatus = TestStatus.PENDING; this.testCaseResultsByCaseGUID_[testCase.guid] = testCaseResult; - this.appendChild(testCaseResult); + Polymer.dom(this).appendChild(testCaseResult); this.updateDisplayStateForResult_(testCaseResult); }, this); }, @@ -447,19 +457,19 @@ tr.exportTo('tr.b.unittest', function() { }; }, - notifyTestResultToDevServer_: function(result, extra_msg) { + notifyTestResultToDevServer_: function(result, extraMsg) { var req = new XMLHttpRequest(); var testName = this.currentTestCaseResult_.testCase.fullyQualifiedName; - var data = result + ' ' + testName + ' ' + (extra_msg || ''); + var data = result + ' ' + testName + ' ' + (extraMsg || ''); tr.b.postAsync('/tracing/notify_test_result', data); }, notifyTestCompletionToDevServer_: function() { if (this.numTestsThatPassed_ + this.numTestsThatFailed_ + - this.numFlakyTests_ == 0) { + this.numFlakyTests_ === 0) { return; } - var data = this.numTestsThatFailed_ == 0 ? 'ALL_PASSED' : 'HAD_FAILURES'; + var data = this.numTestsThatFailed_ === 0 ? 'ALL_PASSED' : 'HAD_FAILURES'; data += '\nPassed tests: ' + this.numTestsThatPassed_ + ' Failed tests: ' + this.numTestsThatFailed_ + ' Flaky tests: ' + this.numFlakyTests_; @@ -468,7 +478,6 @@ tr.exportTo('tr.b.unittest', function() { }, log_: function(msg) { - //this.textContent += msg; tr.b.dispatchSimpleEvent(this, 'statschange'); } }; diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/interactive_test_runner.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/interactive_test_runner.html index 79a5649275d..87c5127f57d 100644 --- a/chromium/third_party/catapult/tracing/tracing/base/unittest/interactive_test_runner.html +++ b/chromium/third_party/catapult/tracing/tracing/base/unittest/interactive_test_runner.html @@ -7,9 +7,9 @@ found in the LICENSE file. <link rel="import" href="/tracing/base/base.html"> <link rel="import" href="/tracing/base/unittest.html"> +<link rel="import" href="/tracing/base/unittest/html_test_results.html"> <link rel="import" href="/tracing/base/unittest/suite_loader.html"> <link rel="import" href="/tracing/base/unittest/test_runner.html"> -<link rel="import" href="/tracing/base/unittest/html_test_results.html"> <link rel="import" href="/tracing/ui/base/utils.html"> <style> @@ -162,7 +162,7 @@ tr.exportTo('tr.b.unittest', function() { var InteractiveTestRunner = tr.ui.b.define('x-base-interactive-test-runner'); InteractiveTestRunner.prototype = { - __proto__: HTMLUnknownElement.prototype, + __proto__: HTMLDivElement.prototype, decorate: function() { this.allTests_ = undefined; @@ -184,12 +184,12 @@ tr.exportTo('tr.b.unittest', function() { this.onTestFlaky_ = this.onTestFlaky_.bind(this); this.onTestPassed_ = this.onTestPassed_.bind(this); - this.appendChild(tr.ui.b.instantiateTemplate( + Polymer.dom(this).appendChild(tr.ui.b.instantiateTemplate( '#x-base-interactive-test-runner-template', THIS_DOC)); - this.querySelector( + Polymer.dom(this).querySelector( 'input[name=test-type-to-run][value=unit]').checked = true; - var testTypeToRunEls = tr.b.asArray(this.querySelectorAll( + var testTypeToRunEls = tr.b.asArray(Polymer.dom(this).querySelectorAll( 'input[name=test-type-to-run]')); testTypeToRunEls.forEach( @@ -198,7 +198,7 @@ tr.exportTo('tr.b.unittest', function() { 'click', this.onTestTypeToRunClick_.bind(this)); }, this); - var shortFormatEl = this.querySelector('#short-format'); + var shortFormatEl = Polymer.dom(this).querySelector('#short-format'); shortFormatEl.checked = this.shortFormat_; shortFormatEl.addEventListener( 'click', this.onShortFormatClick_.bind(this)); @@ -209,7 +209,8 @@ tr.exportTo('tr.b.unittest', function() { this.__defineSetter__( 'title', function(title) { - this.querySelector('#title').textContent = title; + Polymer.dom(Polymer.dom(this).querySelector('#title')).textContent = + title; }); }, @@ -227,17 +228,17 @@ tr.exportTo('tr.b.unittest', function() { }, set testLinks(testLinks) { this.testLinks_ = testLinks; - var linksEl = this.querySelector('#links'); - linksEl.textContent = ''; + var linksEl = Polymer.dom(this).querySelector('#links'); + Polymer.dom(linksEl).textContent = ''; this.testLinks_.forEach(function(l) { var link = document.createElement('a'); link.href = l.linkPath; - link.textContent = l.title; + Polymer.dom(link).textContent = l.title; var li = document.createElement('li'); - li.appendChild(link); + Polymer.dom(li).appendChild(link); - linksEl.appendChild(li); + Polymer.dom(linksEl).appendChild(li); }, this); }, @@ -258,7 +259,7 @@ tr.exportTo('tr.b.unittest', function() { set shortFormat(shortFormat) { this.shortFormat_ = shortFormat; - this.querySelector('#short-format').checked = shortFormat; + Polymer.dom(this).querySelector('#short-format').checked = shortFormat; if (this.results_) this.results_.shortFormat = shortFormat; if (!this.suppressStateChange_) @@ -266,7 +267,8 @@ tr.exportTo('tr.b.unittest', function() { }, onShortFormatClick_: function(e) { - this.shortFormat_ = this.querySelector('#short-format').checked; + this.shortFormat_ = + Polymer.dom(this).querySelector('#short-format').checked; this.updateShortFormResultsDisplay_(); this.updateResultsGivenShortFormat_(); if (!this.suppressStateChange_) @@ -275,7 +277,8 @@ tr.exportTo('tr.b.unittest', function() { updateShortFormResultsDisplay_: function() { var display = this.shortFormat_ ? '' : 'none'; - this.querySelector('#shortform-results').style.display = display; + Polymer.dom(this).querySelector('#shortform-results').style.display = + display; }, updateResultsGivenShortFormat_: function() { @@ -309,7 +312,7 @@ tr.exportTo('tr.b.unittest', function() { default: throw new Error('Invalid test type to run: ' + testTypeToRun); } - this.querySelector(sel).checked = true; + Polymer.dom(this).querySelector(sel).checked = true; this.scheduleRerun_(); if (!this.suppressStateChange_) tr.b.dispatchSimpleEvent(this, 'statechange'); @@ -336,31 +339,33 @@ tr.exportTo('tr.b.unittest', function() { }, onTestPassed_: function() { - this.querySelector('#shortform-results'). + Polymer.dom(Polymer.dom(this).querySelector('#shortform-results')). appendChild(document.createTextNode('.')); }, onTestFailed_: function() { var span = document.createElement('span'); - span.classList.add('fail'); - span.appendChild(document.createTextNode('F')); - this.querySelector('#shortform-results').appendChild(span); + Polymer.dom(span).classList.add('fail'); + Polymer.dom(span).appendChild(document.createTextNode('F')); + Polymer.dom(Polymer.dom(this).querySelector('#shortform-results')) + .appendChild(span); }, onTestFlaky_: function() { var span = document.createElement('span'); - span.classList.add('flaky'); - span.appendChild(document.createTextNode('~')); - this.querySelector('#shortform-results').appendChild(span); + Polymer.dom(span).classList.add('flaky'); + Polymer.dom(span).appendChild(document.createTextNode('~')); + Polymer.dom(Polymer.dom(this).querySelector('#shortform-results')) + .appendChild(span); }, onResultsStatsChanged_: function() { - var statsEl = this.querySelector('#stats'); + var statsEl = Polymer.dom(this).querySelector('#stats'); var stats = this.results_.getStats(); var numTestsOverall = this.runner_.testCases.length; var numTestsThatRan = stats.numTestsThatPassed + stats.numTestsThatFailed + stats.numFlakyTests; - statsEl.innerHTML = + Polymer.dom(statsEl).innerHTML = '<span>' + numTestsThatRan + '/' + numTestsOverall + '</span> tests run, ' + '<span class="unittest-failed">' + stats.numTestsThatFailed + @@ -388,7 +393,8 @@ tr.exportTo('tr.b.unittest', function() { }, beginRunning_: function() { - var resultsContainer = this.querySelector('#results-container'); + var resultsContainer = + Polymer.dom(this).querySelector('#results-container'); if (this.results_) { this.results_.removeEventListener('testpassed', this.onTestPassed_); this.results_.removeEventListener('testfailed', this.onTestFailed_); @@ -396,7 +402,7 @@ tr.exportTo('tr.b.unittest', function() { this.results_.removeEventListener('statschange', this.onResultsStatsChanged_); delete this.results_.getHRefForTestCase; - resultsContainer.removeChild(this.results_); + Polymer.dom(resultsContainer).removeChild(this.results_); } this.results_ = new tr.b.unittest.HTMLTestResults(); @@ -410,11 +416,11 @@ tr.exportTo('tr.b.unittest', function() { this.results_.addEventListener('testflaky', this.onTestFlaky_); this.results_.addEventListener('statschange', this.onResultsStatsChanged_); - resultsContainer.appendChild(this.results_); + Polymer.dom(resultsContainer).appendChild(this.results_); var tests = this.allTests_.filter(function(test) { var i = test.fullyQualifiedName.indexOf(this.testFilterString_); - if (i == -1) + if (i === -1) return false; if (this.testTypeToRun_ !== ALL_TEST_TYPES && test.testType !== this.testTypeToRun_) @@ -515,16 +521,16 @@ tr.exportTo('tr.b.unittest', function() { function stateFromSearchString(string) { var state = {}; string.split('&').forEach(function(part) { - if (part == '') + if (part === '') return; var kv = part.split('='); var k, v; - if (kv.length == 1) { + if (kv.length === 1) { k = kv[0]; v = true; } else { k = kv[0]; - if (kv[1] == 'false') + if (kv[1] === 'false') v = false; else v = kv[1]; @@ -570,9 +576,14 @@ tr.exportTo('tr.b.unittest', function() { p = p.then( function() { hideLoadingOverlay(); - Polymer.whenReady(function() { + // FIXME + window.addEventListener('WebComponentsReady', function() { runTests(loader, state); }); + runTests(loader, state); + // Polymer.whenReady(function() { + // runTests(loader, state); + // }); }, function(err) { hideLoadingOverlay(); @@ -600,14 +611,15 @@ tr.exportTo('tr.b.unittest', function() { var element = document.createElement('div'); element.style.flex = '1 1 auto'; element.style.overflow = 'auto'; - overlay.appendChild(element); + Polymer.dom(overlay).appendChild(element); - element.textContent = 'Loading tests...'; - document.body.appendChild(overlay); + Polymer.dom(element).textContent = 'Loading tests...'; + Polymer.dom(document.body).appendChild(overlay); } function hideLoadingOverlay() { - var overlay = document.body.querySelector('#tests-loading-overlay'); - document.body.removeChild(overlay); + var overlay = Polymer.dom(document.body).querySelector( + '#tests-loading-overlay'); + Polymer.dom(document.body).removeChild(overlay); } function updateTitle(state) { @@ -628,7 +640,8 @@ tr.exportTo('tr.b.unittest', function() { if (state.shortFormat) title += '(s)'; document.title = title; - var runner = document.querySelector('x-base-interactive-test-runner'); + var runner = Polymer.dom(document).querySelector( + 'x-base-interactive-test-runner'); if (runner) runner.title = title; } @@ -639,7 +652,7 @@ tr.exportTo('tr.b.unittest', function() { runner.style.height = '100%'; runner.testLinks = runnerConfig.testLinks; runner.allTests = loader.getAllTests(); - document.body.appendChild(runner); + Polymer.dom(document.body).appendChild(runner); runner.setState(state); updateTitle(state); @@ -648,7 +661,7 @@ tr.exportTo('tr.b.unittest', function() { var state = runner.getState(); var stateString = stateToSearchString(runner.getDefaultState(), state); - if (window.location.search.substring(1) == stateString) + if (window.location.search.substring(1) === stateString) return; updateTitle(state); diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/suite_loader.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/suite_loader.html index 08fc7dc5ffa..c5be2b85a2a 100644 --- a/chromium/third_party/catapult/tracing/tracing/base/unittest/suite_loader.html +++ b/chromium/third_party/catapult/tracing/tracing/base/unittest/suite_loader.html @@ -22,8 +22,8 @@ tr.exportTo('tr.b.unittest', function() { return new Promise(function(resolve, reject) { var importEl = document.createElement('link'); importEl.moduleName = moduleName; - importEl.setAttribute('rel', 'import'); - importEl.setAttribute('href', testRelpath); + Polymer.dom(importEl).setAttribute('rel', 'import'); + Polymer.dom(importEl).setAttribute('href', testRelpath); importEl.addEventListener('load', function() { resolve({testRelpath: testRelpath, @@ -34,7 +34,7 @@ tr.exportTo('tr.b.unittest', function() { testRelpath + '"'); }); - tr.doc.head.appendChild(importEl); + Polymer.dom(tr.doc.head).appendChild(importEl); }); }, @@ -52,9 +52,9 @@ tr.exportTo('tr.b.unittest', function() { if (!m) throw new Error('Guessing module name failed'); var path = m[1]; - if (path[0] != '/') + if (path[0] !== '/') throw new Error('malformed path'); - if (path.substring(path.length - 5) != '.html') + if (path.substring(path.length - 5) !== '.html') throw new Error('Cannot define testSuites outside html imports'); var parts = path.substring(1, path.length - 5).split('/'); return parts.join('.'); @@ -228,7 +228,7 @@ tr.exportTo('tr.b.unittest', function() { var suite = this.testSuites[i]; for (var j = 0; j < suite.tests.length; j++) { var test = suite.tests[j]; - if (test.fullyQualifiedName == fullyQualifiedName) + if (test.fullyQualifiedName === fullyQualifiedName) return test; } } diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case.html index f092f2a9461..231ebfde0f7 100644 --- a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case.html +++ b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case.html @@ -29,7 +29,7 @@ tr.exportTo('tr.b.unittest', function() { TestCase.parseFullyQualifiedName = function(fqn) { var i = fqn.lastIndexOf('.'); - if (i == -1) + if (i === -1) throw new Error('FullyQualifiedNames must have a period in them'); return { suiteName: fqn.substr(0, i), diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_runner.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_runner.html index 683372b2c0d..ac3b16f46e1 100644 --- a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_runner.html +++ b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_runner.html @@ -4,9 +4,9 @@ Copyright (c) 2014 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> +<link rel="import" href="/tracing/base/event_target.html"> <link rel="import" href="/tracing/base/raf.html"> <link rel="import" href="/tracing/base/timing.html"> -<link rel="import" href="/tracing/base/event_target.html"> <script> 'use strict'; @@ -139,7 +139,7 @@ tr.exportTo('tr.b.unittest', function() { runOneTestCase_: function() { this.runOneTestCaseScheduled_ = false; - if (this.pendingTestCases_.length == 0) { + if (this.pendingTestCases_.length === 0) { this.didFinishRunningAllTests_(); return; } diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_suite.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_suite.html index 9dbf2ce3358..34f5d0525a0 100644 --- a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_suite.html +++ b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_suite.html @@ -49,7 +49,7 @@ tr.exportTo('tr.b.unittest', function() { var testName = testCaseOrName; var testFn = opt_testFn; var options = opt_options || {}; - if (testFn == undefined) + if (testFn === undefined) throw new Error('Must provide opt_testFn'); // If the test cares about DPI settings then we first push a test diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/text_test_results.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/text_test_results.html index c1cae626aea..3c286d75fbe 100644 --- a/chromium/third_party/catapult/tracing/tracing/base/unittest/text_test_results.html +++ b/chromium/third_party/catapult/tracing/tracing/base/unittest/text_test_results.html @@ -4,8 +4,8 @@ Copyright (c) 2014 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> -<link rel="import" href="/tracing/base/utils.html"> <link rel="import" href="/tracing/base/unittest/constants.html"> +<link rel="import" href="/tracing/base/utils.html"> <link rel="import" href="/tracing/ui/base/ui.html"> <script> 'use strict'; @@ -91,12 +91,12 @@ tr.exportTo('tr.b.unittest', function() { this.write_('Ran ' + this.numTestsThatRan + ' tests\n'); if (this.numTestsThatFailed > 0) { - var flakyString = this.numFlakyTests == 0 ? '' : + var flakyString = this.numFlakyTests === 0 ? '' : ' flaky=' + this.numFlakyTests; this.write_('\nFAILED (errors=' + this.numTestsThatFailed + flakyString + ')'); } else { - var flakyString = this.numFlakyTests == 0 ? '' : + var flakyString = this.numFlakyTests === 0 ? '' : ' (flaky=' + this.numFlakyTests + ')'; this.write_('\nOK' + flakyString); } |