summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-02 16:43:35 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-02 16:43:35 +0000
commit1bac460adb2a617c58f537a1bb70731f8a05fd92 (patch)
treed07c246c5f03713a3c4df78293ec8234d5b57d20 /chrome_frame
parent4c969b4111a92c6f08d57b0da984c747dda7679a (diff)
downloadchromium_src-1bac460adb2a617c58f537a1bb70731f8a05fd92.zip
chromium_src-1bac460adb2a617c58f537a1bb70731f8a05fd92.tar.gz
chromium_src-1bac460adb2a617c58f537a1bb70731f8a05fd92.tar.bz2
The function to check whether the page is running in Chrome was incorrectly flagging
pages running in IE as running in Chrome. This was because the function was checking for the presence of the string chrome in the user agent. In ChromeFrame with host networking enabled the IE user agent contains the string chromeframe, which causes this function to fail. This caused the chromeframe unit tests to fail randomly on my machine. TBR=slightlyoff Review URL: http://codereview.chromium.org/519027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/data/chrome_frame_tester_helpers.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome_frame/test/data/chrome_frame_tester_helpers.js b/chrome_frame/test/data/chrome_frame_tester_helpers.js
index e7f2a83..159b00b 100644
--- a/chrome_frame/test/data/chrome_frame_tester_helpers.js
+++ b/chrome_frame/test/data/chrome_frame_tester_helpers.js
@@ -145,6 +145,9 @@ function reloadUsingCFProtocol() {
}
function isRunningInChrome() {
+ var is_chrome_frame = /chromeframe/.test(navigator.userAgent.toLowerCase());
+ if (is_chrome_frame)
+ return 0;
var is_chrome = /chrome/.test(navigator.userAgent.toLowerCase());
return is_chrome;
}