https://bugs.webkit.org/show_bug.cgi?id=40899
Patch by Pablo Flouret <pablof@motorola.com> on 2012-01-21
Reviewed by Adam Barth.
Source/WebCore:
Tests: fast/eventsource/eventsource-url-attribute.html
http/tests/websocket/tests/hixie76/url-attribute.html
http/tests/websocket/tests/hybi/url-attribute.html
* page/EventSource.idl:
* websockets/WebSocket.idl:
LayoutTests:
* fast/eventsource/eventsource-url-attribute-expected.txt: Added.
* fast/eventsource/eventsource-url-attribute.html: Added.
* http/tests/websocket/tests/hixie76/url-attribute-expected.txt: Added.
* http/tests/websocket/tests/hixie76/url-attribute.html: Added.
* http/tests/websocket/tests/hybi/url-attribute-expected.txt: Added.
* http/tests/websocket/tests/hybi/url-attribute.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105580
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-21 Pablo Flouret <pablof@motorola.com>
+
+ Add .url attribute alongside .URL in EventSource and WebSocket to comply with the specs but not break existing usage.
+ https://bugs.webkit.org/show_bug.cgi?id=40899
+
+ Reviewed by Adam Barth.
+
+ * fast/eventsource/eventsource-url-attribute-expected.txt: Added.
+ * fast/eventsource/eventsource-url-attribute.html: Added.
+ * http/tests/websocket/tests/hixie76/url-attribute-expected.txt: Added.
+ * http/tests/websocket/tests/hixie76/url-attribute.html: Added.
+ * http/tests/websocket/tests/hybi/url-attribute-expected.txt: Added.
+ * http/tests/websocket/tests/hybi/url-attribute.html: Added.
+
2012-01-21 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Unreviewed weekend gardening. Skip the new failing tests to paint the bots green.
--- /dev/null
+Both .URL and .url should work (for compatibility reasons).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS source.URL is "http://localhost/"
+PASS source.url is "http://localhost/"
+PASS source.URL === source.url is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+
+description("Both .URL and .url should work (for compatibility reasons).");
+
+var url = "http://localhost/";
+var source = new EventSource(url);
+
+shouldBeEqualToString("source.URL", url);
+shouldBeEqualToString("source.url", url);
+shouldBeTrue("source.URL === source.url");
+
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
--- /dev/null
+Both .URL and .url attributes should work (for compatibility reasons).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+PASS ws.url is "ws://127.0.0.1:8880/"
+PASS ws.URL is "ws://127.0.0.1:8880/"
+PASS ws.URL === ws.url is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../js-test-resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script type="text/javascript">
+
+description("Both .URL and .url attributes should work (for compatibility reasons).");
+
+var url = "ws://127.0.0.1:8880/";
+var ws = new WebSocket(url);
+
+shouldBeEqualToString("ws.url", url);
+shouldBeEqualToString("ws.URL", url);
+shouldBeTrue("ws.URL === ws.url");
+
+</script>
+<script src="../../../../js-test-resources/js-test-post.js"></script>
+</body>
+</html>
+
--- /dev/null
+Both .URL and .url attributes should work (for compatibility reasons).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+PASS ws.url is "ws://127.0.0.1:8880/"
+PASS ws.URL is "ws://127.0.0.1:8880/"
+PASS ws.URL === ws.url is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../js-test-resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script type="text/javascript">
+
+description("Both .URL and .url attributes should work (for compatibility reasons).");
+
+if (window.layoutTestController)
+ layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
+
+var url = "ws://127.0.0.1:8880/";
+var ws = new WebSocket(url);
+
+shouldBeEqualToString("ws.url", url);
+shouldBeEqualToString("ws.URL", url);
+shouldBeTrue("ws.URL === ws.url");
+
+</script>
+<script src="../../../../js-test-resources/js-test-post.js"></script>
+</body>
+</html>
+
+2012-01-21 Pablo Flouret <pablof@motorola.com>
+
+ Add .url attribute alongside .URL in EventSource and WebSocket to comply with the specs but not break existing usage.
+ https://bugs.webkit.org/show_bug.cgi?id=40899
+
+ Reviewed by Adam Barth.
+
+ Tests: fast/eventsource/eventsource-url-attribute.html
+ http/tests/websocket/tests/hixie76/url-attribute.html
+ http/tests/websocket/tests/hybi/url-attribute.html
+
+ * page/EventSource.idl:
+ * websockets/WebSocket.idl:
+
2012-01-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r105564.
NoStaticTables
] EventSource {
- readonly attribute DOMString URL;
+ readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
+ readonly attribute DOMString url;
// ready state
const unsigned short CONNECTING = 0;
EventTarget,
NoStaticTables
] WebSocket {
- readonly attribute DOMString URL;
+ readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
+ readonly attribute DOMString url;
// ready state
const unsigned short CONNECTING = 0;