diff options
author | Russell Brenner <russellbrenner@google.com> | 2012-01-13 14:39:31 -0800 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2012-01-17 10:33:59 -0800 |
commit | 9cff7e8839f4cd5caf01f005647176461f329a8d (patch) | |
tree | a8168d3516465216b855b96668ac8b930ea889b9 | |
parent | c8c13e36333629a06a196f84e75f2cc8ae5df24e (diff) | |
download | external_webkit-9cff7e8839f4cd5caf01f005647176461f329a8d.zip external_webkit-9cff7e8839f4cd5caf01f005647176461f329a8d.tar.gz external_webkit-9cff7e8839f4cd5caf01f005647176461f329a8d.tar.bz2 |
Update unitTest to match current WebHistory
New elements have been added to WebHistory over time without making
corresponding changes to the unitTest code. This brings the test code
in sync with the current WebHistory class.
Change-Id: I8cde579d2820e8f5c72cf34b264ee2e57a4acbd9
-rw-r--r-- | Source/WebKit/android/jni/WebHistory.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/WebKit/android/jni/WebHistory.cpp b/Source/WebKit/android/jni/WebHistory.cpp index f021318..be9ec3b 100644 --- a/Source/WebKit/android/jni/WebHistory.cpp +++ b/Source/WebKit/android/jni/WebHistory.cpp @@ -758,7 +758,10 @@ static void unitTest() ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; ALOG_ASSERT(!readItemRecursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length target should fail!"); - offset += 4; // Scale + offset += 4; // Screen scale + offset += 4; // Text wrap scale + offset += 4; // Scroll pos x + offset += 4; // Scroll pos y // Document state offset += 4; memset(test3, 0, HISTORY_MIN_SIZE); @@ -777,8 +780,8 @@ static void unitTest() ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; ALOG_ASSERT(!readItemRecursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 kids should fail!"); - offset = 36; // Test document state + offset = 40; delete[] test3; test3 = new char[HISTORY_MIN_SIZE + sizeof(unsigned)]; memset(test3, 0, HISTORY_MIN_SIZE + sizeof(unsigned)); @@ -795,6 +798,7 @@ static void unitTest() *(int*)(test3 + offset + 8) = 20; ALOG_ASSERT(!readItemRecursive(testItem, &ptr, HISTORY_MIN_SIZE + 2 * sizeof(unsigned) ), "2 20 length document state string should fail!"); delete[] test3; + ALOGD("Leaving history unit test!"); } #endif |