Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 519177 - [All] update Browser.getText() javadoc to reflect platform specific behavior of returned html (ex Windows)
Summary: [All] update Browser.getText() javadoc to reflect platform specific behavior ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Leo Ufimtsev CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-04 11:53 EDT by Leo Ufimtsev CLA
Modified: 2017-08-01 10:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev CLA 2017-07-04 11:53:57 EDT
While working on:
Bug 514719 – [Browser][Webkit2] port Browser.getText() to webkit2

I found that getText() behaves differently depending on platform.

On Windows, the returned html is the *processed* html. I.e, the html after a webpage has loaded.
On Linux Webki1, Webkit2 and Cocoa, the returned html is the *original* html.

Ex 1:
Input: helloWorld
Output Windows : <html><head></head><body>helloWorld</body></html>
Output Lin/Coca: <same as input>

Ex 2:
Input: <html><head></head><body>hello World<script>document.body.style.backgroundColor = \"red\";</script></body></html>";
Output Windows: "<html><head></head><body style=\"background-color: red;\">hello World<script>document.body.style.backgroundColor = \"red\";</script></body></html>"
Otupt Lin/Coca: <same as input>

Please see jUnits:
https://git.eclipse.org/r/#/c/100648/

Unless someone wants to update Window's underlying browser implementation, I will update Browser.getText() api to say that returned html is platform dependent.
Comment 1 Eclipse Genie CLA 2017-07-04 11:59:55 EDT
New Gerrit change created: https://git.eclipse.org/r/100652