Vishnu We will try to create a sample to try the error redirection page, and blocked website, using shouldInterceptLoadRequest. And check if we could reproduce your problem.
Thanks Jenny From: Vishnu Prakash [mailto:[email protected]] Sent: Wednesday, May 27, 2015 8:13 PM To: Cao, Jenny Q; Xu, Xing; [email protected] Subject: RE: [Crosswalk-help] Ask: x86 vs ARM for XWalk-WebView-11.40.277.7 Hi Crosswalk team, Any help on this. Appreciate!! Vishnu From: Vishnu Prakash [mailto:[email protected]] Sent: Tuesday, May 26, 2015 6:03 PM To: 'Cao, Jenny Q'; 'Xu, Xing'; '[email protected]' Cc: 'Kaushik Sindhu'; '[email protected]'; 'Imninder' Subject: RE: [Crosswalk-help] Ask: x86 vs ARM for XWalk-WebView-11.40.277.7 Hi Jenny, We use our application settings to store data(true/false) based on user preferences. In our app we consume these settings and attempt to override XWalk methods to execute the functionality. We neither use any rooted devices and nor any third party tool. To implement these features we were using our method isCrossDomainActive to check from the settings if we have allowed or not. public boolean isCrossDomainActive(final String url) { return the boolean value true or false based on our business logic. } Eventually based on this returned boolean value, we implement the method which overrides the XWalkResourceClient method. public WebResourceResponse shouldInterceptLoadRequest(final XWalkView view, final String url) { //Basic check If(isCrossDomainActive(url)) return null; return super.shouldInterceptLoadRequest(view, url); } Same code works absolutely fine for the ARM build without any problem but somehow it fails in the x86. Let me know if you need further information. Warm Regards, Vishnu From: Cao, Jenny Q [mailto:[email protected]] Sent: Tuesday, May 26, 2015 12:01 PM To: Vishnu Prakash; Xu, Xing; [email protected]<mailto:[email protected]> Cc: 'Kaushik Sindhu'; [email protected]<mailto:[email protected]>; 'Imninder' Subject: RE: [Crosswalk-help] Ask: x86 vs ARM for XWalk-WebView-11.40.277.7 Vishnu Seems you make the website access options setting on the android system level. And test if the setting is workable or not in webview, right? How did you set the website access options? Do you use a "rooted device" and modify the hosts file? Or use a third party tool? I could not find any way to make such config options from System setting. Thanks Jenny From: Vishnu Prakash [mailto:[email protected]] Sent: Tuesday, May 26, 2015 12:45 PM To: Cao, Jenny Q; Xu, Xing; [email protected]<mailto:[email protected]> Cc: 'Kaushik Sindhu'; [email protected]<mailto:[email protected]>; 'Imninder' Subject: RE: [Crosswalk-help] Ask: x86 vs ARM for XWalk-WebView-11.40.277.7 Dear Jenny, Thank you for your quick response. Here is my detailed repro steps for the scenarios. Let me know if you can reproduce the same, in case not I will share the code for the same. SN Feature Jenny's steps Vishnu's Repro steps 1 Error redirection Redirect to a nonexistent page 1) Please redirect to an existing page. eg Please redirect to http://www.indiabix.com/ 2) If we attempt to navigate to any random site which is not available or internet connectivity is not available, it should redirect to above page. 2 Blocked website Loading site with SSL error Block any website Eg http://www.iitd.ac.in/ .and then attempt to open this above website from google. You should not be able to open this site. 3 Allow only specific page You should not be able to navigate inside any of the link mentioned in this site. http://iitbhu.ac.in/ 4 Allow sub domains When you uncheck this option the sub domains should not open. Eg google.co.in should not open maps.google.co.in which is a subdomain. The above scenarios works exactly as expected in the ARM build. Thanks and Regards, Vishnu From: Cao, Jenny Q [mailto:[email protected]] Sent: Tuesday, May 26, 2015 7:58 AM To: Vishnu Prakash; Xu, Xing; [email protected]<mailto:[email protected]> Cc: 'Kaushik Sindhu'; [email protected]<mailto:[email protected]> Subject: RE: [Crosswalk-help] Ask: x86 vs ARM for XWalk-WebView-11.40.277.7 Hi, Vishnu, For these 2 senario, Error Redirection Blocked websites Error Redirection: we tried to redirect to a not exist page, it get expect result (file or directory not exist ) on x86(zte geek) and arm (nexus 5) Blocked websites: we tried to load a website with ssl error, it get same reslt (page blocked) on x86(zte geek) and arm (nexus 5) What is your test website and methods? Pls share us . What websites are you using for following 2 scenario? Allow only specific page Allow sub domains I guess it may be a security certification issue. We will check if we can reproduce the issue, pls share us your test website. Thanks Jenny From: Crosswalk-help [mailto:[email protected]] On Behalf Of Vishnu Prakash Sent: Monday, May 25, 2015 6:01 PM To: Xu, Xing; [email protected]<mailto:[email protected]> Cc: 'Kaushik Sindhu'; [email protected]<mailto:[email protected]> Subject: [Crosswalk-help] Ask: x86 vs ARM for XWalk-WebView-11.40.277.7 Hi Xing, I will share my observations, thanks for pointing out, while debugging that issue, encountered a very interesting issue. Feature of my sample app crosswalk-webview-11.40.277.7-x86 on Asus(Kitkat) crosswalk-webview-11.40.277.7-arm on Samsung S5. Error Redirection Does not work Works ,redirects to error page Blocked websites Does not work Works, doenot open the blocked site Allow only specific page Does not work Works as expected Allow sub domains Does not work Works as expected Can you please share your thoughts and let me know if you need some more inputs. Is there some inputs I need to be aware of with the x86 and the ARM build? Thank You so much, Vishnu From: Xu, Xing [mailto:[email protected]] Sent: Monday, May 25, 2015 2:28 PM To: Vishnu Prakash; [email protected]<mailto:[email protected]> Cc: Kaushik Sindhu Subject: RE: Ask:: javascript function execution as parameter in load method of XWalk. Hi, Vishnu, Have you try it? What happened? Please refer to https://crosswalk-project.org/jira/browse/XWALK-3014 and have a try. Any feedback will be welcome. From: Vishnu Prakash [mailto:[email protected]] Sent: Monday, May 25, 2015 4:48 PM To: [email protected]<mailto:[email protected]>; Xu, Xing Cc: Kaushik Sindhu Subject: Ask:: javascript function execution as parameter in load method of XWalk. Hi Crosswalk team, Greetings!!! Can we have a javascript function as a parameter inside the load method? For example is this parameter valid for the load method of XWalkView. webView.load("javascript:(function() { " + "document.write(" + "'" + readPage("mysample_html_page.html") + "');" + "document.close(); " + "})()",null); Regards, Vishnu
_______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
