diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 23:52:24 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 23:52:24 +0000 |
commit | 26d2f47eba267fc034ae77d0ca1fefdc7cb86135 (patch) | |
tree | b74e28bcd8f16e914b88935bf4ca710bddc64586 /base/pickle_unittest.cc | |
parent | 08173b245a9fbe6381a805cc5987d434a641d96e (diff) | |
download | chromium_src-26d2f47eba267fc034ae77d0ca1fefdc7cb86135.zip chromium_src-26d2f47eba267fc034ae77d0ca1fefdc7cb86135.tar.gz chromium_src-26d2f47eba267fc034ae77d0ca1fefdc7cb86135.tar.bz2 |
Don't allow dragging browser actions between regular and incognito windows.
This fixes a crash.
Also small fix to Pickle::ReadBytes to fix up the iterator if it is NULL.
BUG=39340
Review URL: http://codereview.chromium.org/1542007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/pickle_unittest.cc')
-rw-r--r-- | base/pickle_unittest.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/base/pickle_unittest.cc b/base/pickle_unittest.cc index 1a98cd2..aea3830 100644 --- a/base/pickle_unittest.cc +++ b/base/pickle_unittest.cc @@ -259,3 +259,17 @@ TEST(PickleTest, ZeroLength) { // We can't assert that outdata is NULL. } +// Check that ReadBytes works properly with an iterator initialized to NULL. +TEST(PickleTest, ReadBytes) { + Pickle pickle; + int data = 0x7abcd; + EXPECT_TRUE(pickle.WriteBytes(&data, sizeof(data))); + + void* iter = NULL; + const char* outdata_char; + EXPECT_TRUE(pickle.ReadBytes(&iter, &outdata_char, sizeof(data))); + + int outdata; + memcpy(&outdata, outdata_char, sizeof(outdata)); + EXPECT_EQ(data, outdata); +} |