From 6a12f0febe4d54155f55fad0c8c15978fcb3e909 Mon Sep 17 00:00:00 2001 From: "slightlyoff@chromium.org" Date: Mon, 7 Dec 2009 23:59:36 +0000 Subject: Fixes incorrect test against OS version instead of browser version BUG=28038,29193 TEST=on any XP box this should pass: chrome_frame_test.exe --gtest_filter=*CFInstall* Review URL: http://codereview.chromium.org/469012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34020 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/CFInstall.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chrome_frame/CFInstall.js') diff --git a/chrome_frame/CFInstall.js b/chrome_frame/CFInstall.js index bddfe3bb..e8190cb6 100644 --- a/chrome_frame/CFInstall.js +++ b/chrome_frame/CFInstall.js @@ -271,12 +271,12 @@ // We currently only support CF in IE // TODO(slightlyoff): Update this should we support other browsers! var ua = navigator.userAgent; - var ieRe = /MSIE \S+; Windows NT/; + var ieRe = /MSIE (\S+); Windows NT/; var bail = false; if (ieRe.test(ua)) { // We also only support Win2003/XPSP2 or better. See: // http://msdn.microsoft.com/en-us/library/ms537503%28VS.85%29.aspx - if (parseFloat(ua.split(ieRe)[1]) < 6 && + if (parseFloat(ieRe.exec(ua)[1]) < 6 && // 'SV1' indicates SP2, only bail if not SP2 or Win2K3 ua.indexOf('SV1') < 0) { bail = true; -- cgit v1.1