From 01b089d9be046db1253cb3bb90e8635b50fddd84 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 4 Dec 2009 12:36:00 -0500 Subject: Added minify plugin --- .../minify/min_unit_tests/_test_files/js/before.js | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 plugins/Minify/extlib/minify/min_unit_tests/_test_files/js/before.js (limited to 'plugins/Minify/extlib/minify/min_unit_tests/_test_files/js/before.js') diff --git a/plugins/Minify/extlib/minify/min_unit_tests/_test_files/js/before.js b/plugins/Minify/extlib/minify/min_unit_tests/_test_files/js/before.js new file mode 100644 index 000000000..cccdb9706 --- /dev/null +++ b/plugins/Minify/extlib/minify/min_unit_tests/_test_files/js/before.js @@ -0,0 +1,57 @@ +/*! is.js + + (c) 2001 Douglas Crockford + 2001 June 3 +*/ + +// is + +// The -is- object is used to identify the browser. Every browser edition +// identifies itself, but there is no standard way of doing it, and some of +// the identification is deceptive. This is because the authors of web +// browsers are liars. For example, Microsoft's IE browsers claim to be +// Mozilla 4. Netscape 6 claims to be version 5. + +var is = { + ie: navigator.appName == 'Microsoft Internet Explorer', + java: navigator.javaEnabled(), + ns: navigator.appName == 'Netscape', + ua: navigator.userAgent.toLowerCase(), + version: parseFloat(navigator.appVersion.substr(21)) || + parseFloat(navigator.appVersion), + win: navigator.platform == 'Win32' +} +/*!* + * preserve this comment, too + */ +is.mac = is.ua.indexOf('mac') >= 0; +if (is.ua.indexOf('opera') >= 0) { + is.ie = is.ns = false; + is.opera = true; +} +if (is.ua.indexOf('gecko') >= 0) { + is.ie = is.ns = false; + is.gecko = true; +} + +/*@cc_on + /*@if (@_win32) + if (is.ie && is.win) + document.write("PASS: IE/win honored conditional comment.
"); + @else @*/ + if (is.ie && is.win) + document.write("FAIL: IE/win did not honor multi-line conditional comment.
"); + else + document.write("PASS: Non-IE/win browser ignores multi-line conditional comment.
"); + /*@end +@*/ + +var recognizesCondComm = true; +//@cc_on/* +recognizesCondComm = false; +//@cc_on*/ + +if ((is.ie && is.win) == recognizesCondComm) + document.write("PASS: IE/win honored single-line conditional comment.
"); +else + document.write("FAIL: Non-IE/win browser did not ignore single-line conditional comment.
"); -- cgit v1.2.3-54-g00ecf