Title: [141386] trunk/LayoutTests
Revision
141386
Author
[email protected]
Date
2013-01-31 00:33:21 -0800 (Thu, 31 Jan 2013)

Log Message

Add composition-event-constructor.html, which I forgot to add in r141028
https://bugs.webkit.org/show_bug.cgi?id=107919

Reviewed by Adam Barth.

r141028 implemented a CompositionEvent constructor, but I forgot to add a test
when I landed the patch manually. This patch adds the test.

* fast/events/constructors/composition-event-constructor-expected.txt: Added.
* fast/events/constructors/composition-event-constructor.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (141385 => 141386)


--- trunk/LayoutTests/ChangeLog	2013-01-31 08:30:52 UTC (rev 141385)
+++ trunk/LayoutTests/ChangeLog	2013-01-31 08:33:21 UTC (rev 141386)
@@ -1,5 +1,20 @@
 2013-01-31  Kentaro Hara  <[email protected]>
 
+        Add composition-event-constructor.html, which I forgot to add in r141028
+        https://bugs.webkit.org/show_bug.cgi?id=107919
+
+        Reviewed by Adam Barth.
+
+        r141028 implemented a CompositionEvent constructor, but I forgot to add a test
+        when I landed the patch manually. This patch adds the test.
+
+        * fast/events/constructors/composition-event-constructor-expected.txt: Added.
+        * fast/events/constructors/composition-event-constructor.html: Added.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+
+2013-01-31  Kentaro Hara  <[email protected]>
+
         [V8] 'new MouseEvent("click", {relatedTarget: window}).window' should return window
         https://bugs.webkit.org/show_bug.cgi?id=108432
 

Added: trunk/LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt (0 => 141386)


--- trunk/LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt	2013-01-31 08:33:21 UTC (rev 141386)
@@ -0,0 +1,52 @@
+This tests the constructor for the CompositionEvent DOM class.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS new CompositionEvent('eventType').bubbles is false
+PASS new CompositionEvent('eventType').cancelable is false
+PASS new CompositionEvent('eventType').view is null
+PASS new CompositionEvent('eventType').detail is 0
+PASS new CompositionEvent('eventType').data is ""
+PASS new CompositionEvent('eventType', { bubbles: false }).bubbles is false
+PASS new CompositionEvent('eventType', { bubbles: true }).bubbles is true
+PASS new CompositionEvent('eventType', { cancelable: false }).cancelable is false
+PASS new CompositionEvent('eventType', { cancelable: true }).cancelable is true
+PASS new CompositionEvent('eventType', { view: window }).view is window
+PASS new CompositionEvent('eventType', { view: this }).view is this
+PASS new CompositionEvent('eventType', { view: testObject }).view is null
+PASS new CompositionEvent('eventType', { view: document }).view is null
+PASS new CompositionEvent('eventType', { view: undefined }).view is null
+PASS new CompositionEvent('eventType', { view: null }).view is null
+PASS new CompositionEvent('eventType', { view: false }).view is null
+PASS new CompositionEvent('eventType', { view: true }).view is null
+PASS new CompositionEvent('eventType', { view: '' }).view is null
+PASS new CompositionEvent('eventType', { view: 'chocolate' }).view is null
+PASS new CompositionEvent('eventType', { view: 12345 }).view is null
+PASS new CompositionEvent('eventType', { view: 18446744073709551615 }).view is null
+PASS new CompositionEvent('eventType', { view: NaN }).view is null
+PASS new CompositionEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window is false
+PASS new CompositionEvent('eventType', { get view() { return 123; } }).view is null
+PASS new CompositionEvent('eventType', { get view() { throw 'CompositionEvent Error'; } }) threw exception CompositionEvent Error.
+PASS new CompositionEvent('eventType', { data: 'koakuma' }).data is "koakuma"
+PASS new CompositionEvent('eventType', { data: '' }).data is ""
+PASS new CompositionEvent('eventType', { data: undefined }).data is "undefined"
+PASS new CompositionEvent('eventType', { data: null }).data is "null"
+PASS new CompositionEvent('eventType', { data: false }).data is "false"
+PASS new CompositionEvent('eventType', { data: true }).data is "true"
+PASS new CompositionEvent('eventType', { data: 12345 }).data is "12345"
+PASS new CompositionEvent('eventType', { data: 18446744073709551615 }).data is "18446744073709552000"
+PASS new CompositionEvent('eventType', { data: NaN }).data is "NaN"
+PASS new CompositionEvent('eventType', { data: [] }).data is ""
+PASS new CompositionEvent('eventType', { data: [1, 2, 3] }).data is "1,2,3"
+PASS new CompositionEvent('eventType', { data: {koakuma: 12345} }).data is "[object Object]"
+PASS new CompositionEvent('eventType', { data: {valueOf: function () { return 'koakuma'; } } }).data is "[object Object]"
+PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).bubbles is true
+PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).cancelable is true
+PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).view is window
+PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).detail is 111
+PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).data is "koakuma"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/events/constructors/composition-event-constructor.html (0 => 141386)


--- trunk/LayoutTests/fast/events/constructors/composition-event-constructor.html	                        (rev 0)
+++ trunk/LayoutTests/fast/events/constructors/composition-event-constructor.html	2013-01-31 08:33:21 UTC (rev 141386)
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script>
+
+description("This tests the constructor for the CompositionEvent DOM class.");
+
+var testObject = {nyannyan: 123};
+
+// No initializer is passed.
+shouldBe("new CompositionEvent('eventType').bubbles", "false");
+shouldBe("new CompositionEvent('eventType').cancelable", "false");
+shouldBe("new CompositionEvent('eventType').view", "null");
+shouldBe("new CompositionEvent('eventType').detail", "0");
+shouldBeEqualToString("new CompositionEvent('eventType').data", "");
+
+// bubbles is passed.
+shouldBe("new CompositionEvent('eventType', { bubbles: false }).bubbles", "false");
+shouldBe("new CompositionEvent('eventType', { bubbles: true }).bubbles", "true");
+
+// cancelable is passed.
+shouldBe("new CompositionEvent('eventType', { cancelable: false }).cancelable", "false");
+shouldBe("new CompositionEvent('eventType', { cancelable: true }).cancelable", "true");
+
+// view is passed.
+// Window objects.
+shouldBe("new CompositionEvent('eventType', { view: window }).view", "window");
+shouldBe("new CompositionEvent('eventType', { view: this }).view", "this");
+
+// Non-window objects.
+shouldBe("new CompositionEvent('eventType', { view: testObject }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: document }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: undefined }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: null }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: false }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: true }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: '' }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: 'chocolate' }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: 12345 }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: 18446744073709551615 }).view", "null");
+shouldBe("new CompositionEvent('eventType', { view: NaN }).view", "null");
+// Note that valueOf() is not called, when the left hand side is evaluated.
+shouldBeFalse("new CompositionEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window");
+shouldBe("new CompositionEvent('eventType', { get view() { return 123; } }).view", "null");
+shouldThrow("new CompositionEvent('eventType', { get view() { throw 'CompositionEvent Error'; } })");
+
+// data is passed.
+// Strings.
+shouldBeEqualToString("new CompositionEvent('eventType', { data: 'koakuma' }).data", "koakuma");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: '' }).data", "");
+
+// Non-strings.
+shouldBeEqualToString("new CompositionEvent('eventType', { data: undefined }).data", "undefined");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: null }).data", "null");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: false }).data", "false");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: true }).data", "true");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: 12345 }).data", "12345");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: 18446744073709551615 }).data", "18446744073709552000");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: NaN }).data", "NaN");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: [] }).data", "");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: [1, 2, 3] }).data", "1,2,3");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: {koakuma: 12345} }).data", "[object Object]");
+shouldBeEqualToString("new CompositionEvent('eventType', { data: {valueOf: function () { return 'koakuma'; } } }).data", "[object Object]");
+
+// All initializers are passed.
+shouldBe("new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).bubbles", "true");
+shouldBe("new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).cancelable", "true");
+shouldBe("new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).view", "window");
+shouldBe("new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).detail", "111");
+shouldBeEqualToString("new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).data", "koakuma");
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/efl/TestExpectations (141385 => 141386)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-01-31 08:30:52 UTC (rev 141385)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-01-31 08:33:21 UTC (rev 141386)
@@ -1233,6 +1233,7 @@
 webkit.org/b/107428 fast/events/constructors/mouse-event-constructor.html [ Skip ]
 webkit.org/b/107428 fast/events/constructors/wheel-event-constructor.html [ Skip ]
 webkit.org/b/107428 fast/events/constructors/keyboard-event-constructor.html [ Skip ]
+webkit.org/b/107428 fast/events/constructors/composition-event-constructor.html [ Skip ]
 
 # Requires support for Web notifications
 webkit.org/b/73544 fast/notifications [ Skip ]

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (141385 => 141386)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-01-31 08:30:52 UTC (rev 141385)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-01-31 08:33:21 UTC (rev 141386)
@@ -393,6 +393,7 @@
 webkit.org/b/107428 fast/events/constructors/mouse-event-constructor.html [ Skip ]
 webkit.org/b/107428 fast/events/constructors/wheel-event-constructor.html [ Skip ]
 webkit.org/b/107428 fast/events/constructors/keyboard-event-constructor.html [ Skip ]
+webkit.org/b/107428 fast/events/constructors/composition-event-constructor.html [ Skip ]
 
 # No CORS support for media elements is implemented yet.
 webkit.org/b/99037 http/tests/security/video-cross-origin-readback.html [ Failure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to