Bug 85874 - register-protocol-handler-expected.txt seems wrong.
Summary: register-protocol-handler-expected.txt seems wrong.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-08 01:36 PDT by Dongwoo Joshua Im (dwim)
Modified: 2012-05-16 22:26 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.36 KB, patch)
2012-05-08 01:38 PDT, Dongwoo Joshua Im (dwim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dongwoo Joshua Im (dwim) 2012-05-08 01:36:20 PDT
IMHO, LayoutTests/fast/dom/register-protocol-handler-expected.txt seems wrong.

LayoutTests/fast/dom/register-protocol-handler-expected.txt should be same as LayoutTests/platform/chromium/fast/dom/register-protocol-handler-expected.txt.
Comment 1 Dongwoo Joshua Im (dwim) 2012-05-08 01:38:09 PDT
Created attachment 140693 [details]
Patch
Comment 2 Dongwoo Joshua Im (dwim) 2012-05-08 16:27:49 PDT
I think LayoutTests/fast/dom/register-protocol-handler-expected.txt should have positive test result, 
so that the ports which not support this feature would fail this test case.
Comment 3 Ben Wells 2012-05-08 16:52:36 PDT
I don't understand. It is confusing, but a test pass for ports which don't support rph is to get the failures reported. If a port does not support rph it is expected and desired to get these failures.

Are you suggesting to add in test_expectations or skips? Currently this test is checking that rph is successfully disabled where it should be, so skipping or expecting failure would be a loss of coverage.
Comment 4 Dongwoo Joshua Im (dwim) 2012-05-08 17:08:12 PDT
(In reply to comment #3)
> I don't understand. It is confusing, but a test pass for ports which don't support rph is to get the failures reported. If a port does not support rph it is expected and desired to get these failures.
> 
> Are you suggesting to add in test_expectations or skips? Currently this test is checking that rph is successfully disabled where it should be, so skipping or expecting failure would be a loss of coverage.

IMO, the ports which are not supported the registerProtocolHandler API should add this test case into Skipped file, or fail this case.

As I know, that is how WebKit Layouttest works... isn't it?


If needed, I can fix Skipped file of all of the ports which are not supported the registerProtocolHandler API in this bug as a new patch.
Comment 5 Ben Wells 2012-05-08 17:12:04 PDT
If a port does not support rph, and a site tries to use it, it should give an error. That is the correct behaviour, and it is being tested by this test.

By skipping the test, the test coverage will be reduced. If anyone accidentally enabled rph on a port it would not be noticed.

Perhaps to reduce confusion you could update the test to not say 'pass / fail' everywhere.
Comment 6 Ben Wells 2012-05-08 17:13:32 PDT
BTW The first line of the expected result makes it clear:
"This test makes sure that navigator.registerProtocolHandler throws the proper exceptions and has no-op default implementation."

Maybe this should be updated to say what should happen if registerProtocolHandler is supported.
Comment 7 Dongwoo Joshua Im (dwim) 2012-05-08 17:40:50 PDT
(In reply to comment #6)
> BTW The first line of the expected result makes it clear:
> "This test makes sure that navigator.registerProtocolHandler throws the proper exceptions and has no-op default implementation."
> 
> Maybe this should be updated to say what should happen if registerProtocolHandler is supported.

Actually, I'm implementing the rph on EFL port, so it becomes issue for me.

I'll just add the expected result on EFL port. (same expected result with chromium port)
Comment 8 Dongwoo Joshua Im (dwim) 2012-05-16 22:26:30 PDT
Regarding the Ben's opinion,
I want to close this issue.