Bug 27492 - Web Sockets Test Infrastructure Part 3/3: Example test
Summary: Web Sockets Test Infrastructure Part 3/3: Example test
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-21 01:35 PDT by Yuzo Fujishima
Modified: 2009-11-11 00:45 PST (History)
6 users (show)

See Also:


Attachments
Patch to add example Web Sockets test. (2.80 KB, patch)
2009-07-21 02:08 PDT, Yuzo Fujishima
no flags Details | Formatted Diff | Diff
Example Web Socket Tests, same-origin and cross-origin. (4.91 KB, patch)
2009-08-04 03:26 PDT, Yuzo Fujishima
no flags Details | Formatted Diff | Diff
Add a simple web socket test. (4.01 KB, patch)
2009-10-27 00:26 PDT, Yuzo Fujishima
no flags Details | Formatted Diff | Diff
Add a simple web socket test. (4.87 KB, patch)
2009-10-27 17:59 PDT, Yuzo Fujishima
no flags Details | Formatted Diff | Diff
Add a simple web socket test. (5.48 KB, patch)
2009-11-03 23:02 PST, Yuzo Fujishima
levin: review+
Details | Formatted Diff | Diff
Add a simple web socket test. (7.26 KB, patch)
2009-11-10 22:48 PST, Yuzo Fujishima
no flags Details | Formatted Diff | Diff
Add a simple web socket test. (7.26 KB, patch)
2009-11-11 00:07 PST, Yuzo Fujishima
no flags Details | Formatted Diff | Diff
Add a simple web socket test. (7.26 KB, patch)
2009-11-11 00:09 PST, Yuzo Fujishima
no flags Details | Formatted Diff | Diff
Add a simple web socket test. (7.26 KB, patch)
2009-11-11 00:09 PST, Yuzo Fujishima
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuzo Fujishima 2009-07-21 01:35:01 PDT
Add test infrastructure for Web Sockets (http://www.w3.org/TR/websockets/).

This bug is Part 3/3: Example test.

Other parts are:
Part 1/3: Server
Part 2/3: Patch to run-webkit-tests
Parts must be submitted in the order Part1, Part2, then Part3.

Perhaps Part 3 doesn't need to be submitted.
I create it nonetheless, hoping it will help understanding Part 1 and Part 2.
Comment 1 Yuzo Fujishima 2009-07-21 01:38:32 PDT
Links:

Part 1/3: Server: https://bugs.webkit.org/show_bug.cgi?id=27490
Part 2/3: Patch to run-webkit-tests: https://bugs.webkit.org/show_bug.cgi?id=27491
Part 3/3: Example test: https://bugs.webkit.org/show_bug.cgi?id=27492
Comment 2 Yuzo Fujishima 2009-07-21 02:08:14 PDT
Created attachment 33162 [details]
Patch to add example Web Sockets test.
Comment 3 Yuzo Fujishima 2009-08-04 03:26:11 PDT
Created attachment 34056 [details]
Example Web Socket Tests, same-origin and cross-origin.

New example tests for the new test server.
Comment 4 Eric Seidel (no email) 2009-08-07 12:57:48 PDT
Comment on attachment 34056 [details]
Example Web Socket Tests, same-origin and cross-origin.

You forgot to mark this as a patch.  If you use tools like "bugzilla-tool" it will do all that for you.  "bugzilla-tool post-diff" or "bugzilla-tool post-commits"
Comment 5 Eric Seidel (no email) 2009-08-07 13:01:44 PDT
Comment on attachment 34056 [details]
Example Web Socket Tests, same-origin and cross-origin.

Great that these are js tests!  Bad that you had to copy the files.  We really should  fix bug 25915 instead.

ChangeLog is duplicated.

 13     debug('<span class="pass">TEST COMPLETE</span>');
is instead a testPassed() call.

Style:
 if (window.layoutTestController) {
 4     window.layoutTestController.waitUntilDone();
 5 }

description() is the right call here:
debug("NOOP Web Socket test");

r- for various nits above.
Comment 6 Yuzo Fujishima 2009-10-27 00:26:50 PDT
Created attachment 41933 [details]
Add a simple web socket test.
Comment 7 Yuzo Fujishima 2009-10-27 00:34:07 PDT
Hi, reviewers and committers,

I've updated the example test to suit the latest test framework.

This patch now requires that:
- https://bugs.webkit.org/show_bug.cgi?id=27491 must be committed.
- Web Socket must be functional in the test shell.

So please hold committing this until the above conditions are met,
even if this patch looks good. :)

Yuzo
Comment 8 Eric Seidel (no email) 2009-10-27 14:53:32 PDT
Comment on attachment 41933 [details]
Add a simple web socket test.

Needs a ChagneLog.
Comment 9 Yuzo Fujishima 2009-10-27 17:59:55 PDT
Created attachment 41998 [details]
Add a simple web socket test.
Comment 10 Yuzo Fujishima 2009-10-27 18:02:23 PDT
Sorry for the missing ChangeLog.

Can you take a look again?

Note: This patch requires that:
- https://bugs.webkit.org/show_bug.cgi?id=27491 must be committed before this.
- Web Socket must be functional in the test shell.
Comment 11 David Levin 2009-11-02 11:45:39 PST
Comment on attachment 41998 [details]
Add a simple web socket test.

Just some minor issues to address and this should be fine to go in.

> diff --git a/LayoutTests/websocket/tests/resources/simple.js b/LayoutTests/websocket/tests/resources/simple.js

I think this is in the wrong place after Hamaji's changes.


> diff --git a/LayoutTests/websocket/tests/simple_wsh.py b/LayoutTests/websocket/tests/simple_wsh.py
> new file mode 100755
> index 0000000..5dc71bd
> --- /dev/null
> +++ b/LayoutTests/websocket/tests/simple_wsh.py
> @@ -0,0 +1,42 @@
> +# Copyright 2009, Google Inc.
> +# All rights reserved.

Please use the standard copyright style for WebKit.

Ideally the copyright would be of this format:
   Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
   Copyright (C) 2009 Somebody <email>


> +def web_socket_do_extra_handshake(request):
> +    pass  # Always accept.

In keeping with out Webkit code, please use one space before end of line comments.


> +# vi:sts=4 sw=4 et

No other WebKit sources have this vi formating info. Please remove it.
Comment 12 Yuzo Fujishima 2009-11-03 23:02:41 PST
Created attachment 42452 [details]
Add a simple web socket test.
Comment 13 Yuzo Fujishima 2009-11-03 23:06:17 PST
Thank you for the review.

Can you take another look?

Please commit this after Web Socket is enabled for the test shell.
I'll ping you (or ask someone to commit) when ready.

Yuzo
Comment 14 David Levin 2009-11-04 09:38:34 PST
Comment on attachment 42452 [details]
Add a simple web socket test.

> Please commit this after Web Socket is enabled for the test shell.

Ideally you'd commit this as soon as possible. The tests could always be disabled temporarily for chromium if it isn't ready.
Comment 15 Yuzo Fujishima 2009-11-10 22:48:03 PST
Created attachment 42927 [details]
Add a simple web socket test.
Comment 16 Yuzo Fujishima 2009-11-10 22:52:07 PST
Hi, David,

I've added an entry to each of LayoutTests/platform/*/Skipped files.
Can you review and submit this patch if it looks good?

Yuzo
Comment 17 Yuzo Fujishima 2009-11-11 00:07:49 PST
Created attachment 42933 [details]
Add a simple web socket test.
Comment 18 Yuzo Fujishima 2009-11-11 00:09:26 PST
Created attachment 42934 [details]
Add a simple web socket test.
Comment 19 Yuzo Fujishima 2009-11-11 00:09:53 PST
Created attachment 42935 [details]
Add a simple web socket test.
Comment 20 Yuzo Fujishima 2009-11-11 00:12:07 PST
I've made minor corrections:
- single quote to double quote for a string literal
- added missing semicolons to end of line

Yuzo
Comment 21 WebKit Commit Bot 2009-11-11 00:45:18 PST
Comment on attachment 42935 [details]
Add a simple web socket test.

Clearing flags on attachment: 42935

Committed r50794: <http://trac.webkit.org/changeset/50794>
Comment 22 WebKit Commit Bot 2009-11-11 00:45:24 PST
All reviewed patches have been landed.  Closing bug.