Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/common.js

Issue 5090313282519040: Issue 517 - [Typed objects] Make unit tests compatible with Chrome and Safari (Closed)
Patch Set: Created May 19, 2014, 7:52 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « run_tests.py ('k') | test/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/common.js
===================================================================
--- a/test/common.js
+++ b/test/common.js
@@ -10,13 +10,26 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
+function addScript(url)
+{
+ var script = document.createElement("script");
+ script.src = url;
+ if (js17supported)
+ script.type = "text/javascript;version=1.7";
+ else
+ script.src += "?backcompat";
+ script.async = false;
+ document.head.appendChild(script);
+ return script;
+}
+
function require(module)
{
return require.scopes[module];
}
require.scopes = {};
« no previous file with comments | « run_tests.py ('k') | test/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld