summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 19:51:55 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 19:51:55 +0000
commit4ece1c45a770b1916f0f3eafd41b591e229dbb09 (patch)
tree74ae27a94cc67da9036cd7e9b9873b5142d32950 /chrome_frame/test
parent4512cb5735330f497d018191595d9bd5ce902ac2 (diff)
downloadchromium_src-4ece1c45a770b1916f0f3eafd41b591e229dbb09.zip
chromium_src-4ece1c45a770b1916f0f3eafd41b591e229dbb09.tar.gz
chromium_src-4ece1c45a770b1916f0f3eafd41b591e229dbb09.tar.bz2
Fix a ChromeFrame crash which was reported in the crash server in the helper function to return the path
to the IE temporary internet files folder. The crash occurs because of dereferencing a NULL parent IShellFolder interface. Fix is to bail out and use the SHGetFolderPath function if the SHGetFolderLocation and the SHBindToParent APIs fail for some reason. The SHGetFolderPath function has a limit of MAX_PATH characters. Added a unit test for the GetIETemporaryFilesFolder helper function. Fixes bug http://code.google.com/p/chromium/issues/detail?id=40266 Bug=40266 Review URL: http://codereview.chromium.org/1523010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r--chrome_frame/test/util_unittests.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome_frame/test/util_unittests.cc b/chrome_frame/test/util_unittests.cc
index 6e066a1..c589416 100644
--- a/chrome_frame/test/util_unittests.cc
+++ b/chrome_frame/test/util_unittests.cc
@@ -104,3 +104,8 @@ TEST(UtilTests, GuidToString) {
EXPECT_EQ(0, str_guid.compare(compare));
EXPECT_EQ(static_cast<size_t>(lstrlenW(compare)), str_guid.length());
}
+
+TEST(UtilTests, GetTempInternetFiles) {
+ FilePath path = GetIETemporaryFilesFolder();
+ EXPECT_FALSE(path.empty());
+}