From 9b2165631462039e05ee47c7effc1f391a83093a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 7 Jul 2013 16:24:26 -0700 Subject: [PATCH] Allow switching the module loader in the unit tests. Former-commit-id: 8521e92925cbca8ff73adf3f1a350caa662e27f7 --- perf/perf-ui.js | 4 ++-- test/index.html | 31 ++++++++++++++---------- test/test-ui.js | 64 ++++++++++++++++++++++++++++++++++--------------- test/test.js | 11 ++++++--- 4 files changed, 74 insertions(+), 36 deletions(-) diff --git a/perf/perf-ui.js b/perf/perf-ui.js index e706359dc..ac1f07b41 100644 --- a/perf/perf-ui.js +++ b/perf/perf-ui.js @@ -24,7 +24,7 @@ * @param {Function} handler The event handler. * @returns {Element} The element. */ - function addListener(element, eventName, handler) { + function addEvent(element, eventName, handler) { if (typeof element.addEventListener != 'undefined') { element.addEventListener(eventName, handler, false); } else if (typeof element.attachEvent != 'undefined') { @@ -71,7 +71,7 @@ }()); // initialize controls - addListener(window, 'load', function() { + addEvent(window, 'load', function() { function eventHandler(event) { var search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, ''); if (event.stopPropagation) { diff --git a/test/index.html b/test/index.html index d813aa57f..1016a16ac 100644 --- a/test/index.html +++ b/test/index.html @@ -36,9 +36,9 @@ document.write('