mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Persist localStorage data across sessions when a cache path is specified (issue #139).
- Add a localStorage test to cefclient. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@140 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -533,6 +533,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if(browser.get())
|
||||
RunUIPluginTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_LOCALSTORAGE: // Test localStorage
|
||||
if(browser.get())
|
||||
RunLocalStorageTest(browser);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -656,14 +660,20 @@ CefHandler::RetVal ClientHandler::HandleBeforeResourceLoad(
|
||||
resourceStream = CefStreamReader::CreateForData(
|
||||
(void*)dump.c_str(), dump.size() * sizeof(wchar_t));
|
||||
mimeType = L"text/plain";
|
||||
}
|
||||
else if(url == L"http://tests/uiapp") {
|
||||
} else if(url == L"http://tests/uiapp") {
|
||||
// Show the uiapp contents
|
||||
if(LoadBinaryResource(IDS_UIPLUGIN, dwSize, pBytes)) {
|
||||
resourceStream = CefStreamReader::CreateForHandler(
|
||||
new CefByteReadHandler(pBytes, dwSize, NULL));
|
||||
mimeType = L"text/html";
|
||||
}
|
||||
} else if(url == L"http://tests/localstorage") {
|
||||
// Show the localstorage contents
|
||||
if(LoadBinaryResource(IDS_LOCALSTORAGE, dwSize, pBytes)) {
|
||||
resourceStream = CefStreamReader::CreateForHandler(
|
||||
new CefByteReadHandler(pBytes, dwSize, NULL));
|
||||
mimeType = L"text/html";
|
||||
}
|
||||
} else if(wcsstr(url.c_str(), L"/ps_logo2.png") != NULL) {
|
||||
// Any time we find "ps_logo2.png" in the URL substitute in our own image
|
||||
if(LoadBinaryResource(IDS_LOGO, dwSize, pBytes)) {
|
||||
|
Reference in New Issue
Block a user