From: Seongjun Yim Date: Tue, 9 Apr 2013 05:45:50 +0000 (+0900) Subject: fix TC fails X-Git-Tag: 2.1b_release~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d229bf0ce50b10cb6df637941177775c26795690;p=platform%2Fframework%2Fnative%2Fweb.git fix TC fails Change-Id: I67a47677b472d24fd8c084a98579bdabae625fd0 Signed-off-by: Seongjun Yim --- diff --git a/src/controls/FWebCtrl_WebImpl.cpp b/src/controls/FWebCtrl_WebImpl.cpp index b3f1aa1..e88ea04 100755 --- a/src/controls/FWebCtrl_WebImpl.cpp +++ b/src/controls/FWebCtrl_WebImpl.cpp @@ -783,13 +783,13 @@ OnLoadingRequested(void* pUserData, Evas_Object* pView, void* pEventInfo) } } - String currentUrl = pImpl->GetUrl(); - - String redirectUrl = pImpl->GetProtocolFromUri(url, currentUrl); - if (redirectUrl != null) + String currentUrl(pImpl->GetUrl()); + String redirectUrl(pImpl->GetProtocolFromUri(url, currentUrl)); + if (redirectUrl != L"") { pImpl->LoadUrl(redirectUrl); ewk_policy_decision_ignore(pPolicy); + return; } @@ -966,15 +966,16 @@ OnWebDataReceived(void* pUserData, Evas_Object* pView, void* pEventInfo) { case WEB_DECISION_CONTINUE: { - - String currentUrl = pImpl->GetUrl(); - String redirectUrl = pImpl->GetRedirectUri(url, currentUrl, mime); + String currentUrl(pImpl->GetUrl()); + String redirectUrl(pImpl->GetRedirectUri(url, currentUrl, mime)); if (redirectUrl != L"") { pImpl->LoadUrl(redirectUrl); ewk_policy_decision_ignore(pPolicy); + return; } + if (pImpl->IsMimeSupported(mime) || mime == L"") { break; @@ -4529,6 +4530,7 @@ _WebImpl::GetInstance(const Web* pWeb) return dynamic_cast< const _WebImpl* >(_ControlImpl::GetInstance(*pWeb)); } + int _WebImpl::SearchHandler(Ewk_Custom_Handlers_Data* pHandlerData, bool checkmime) { @@ -4573,6 +4575,7 @@ _WebImpl::SearchHandler(Ewk_Custom_Handlers_Data* pHandlerData, bool checkmime) return checkReturn; } + result _WebImpl::UnregistrationHandler(Ewk_Custom_Handlers_Data* pHandlerData, bool checkmime) { @@ -4625,10 +4628,14 @@ _WebImpl::UnregistrationHandler(Ewk_Custom_Handlers_Data* pHandlerData, bool che return E_SUCCESS; } + const Tizen::Base::String _WebImpl::GetProtocolFromUri(const Tizen::Base::String& originUri, const Tizen::Base::String& currentUri) { - SysAssertf(currentUri != null, "Failed to get currenturi"); + if (originUri == L"" || currentUri == L"") + { + return L""; + } result r = E_SUCCESS; String baseUri; @@ -4702,7 +4709,10 @@ _WebImpl::GetProtocolFromUri(const Tizen::Base::String& originUri, const Tizen:: const Tizen::Base::String _WebImpl::GetRedirectUri(const Tizen::Base::String& originUri, const Tizen::Base::String& currentUri, const Tizen::Base::String& mime) { - SysAssertf(currentUri != null, "Failed to get currenturi"); + if (originUri == L"" || currentUri == L"" || mime == L"") + { + return L""; + } result r = E_SUCCESS; String baseUri; @@ -4754,4 +4764,5 @@ _WebImpl::GetRedirectUri(const Tizen::Base::String& originUri, const Tizen::Base return L""; } + }}} // Tizen::Web::Controls