Index: LayoutTests/fast/events/constructors/ui-event-constructor.html |
diff --git a/LayoutTests/fast/events/constructors/ui-event-constructor.html b/LayoutTests/fast/events/constructors/ui-event-constructor.html |
index 2b2169f30be003a4f5e9d51b0dd730c91908bcf7..03f8b5b2e27c368c6d171d881b180cc3034374b5 100644 |
--- a/LayoutTests/fast/events/constructors/ui-event-constructor.html |
+++ b/LayoutTests/fast/events/constructors/ui-event-constructor.html |
@@ -30,20 +30,21 @@ shouldBe("new UIEvent('eventType', { view: window }).view", "window"); |
shouldBe("new UIEvent('eventType', { view: this }).view", "this"); |
// Non-window objects. |
-shouldBe("new UIEvent('eventType', { view: testObject }).view", "null"); |
-shouldBe("new UIEvent('eventType', { view: document }).view", "null"); |
+shouldThrow("new UIEvent('eventType', { view: testObject }).view"); |
+shouldThrow("new UIEvent('eventType', { view: document }).view"); |
shouldBe("new UIEvent('eventType', { view: undefined }).view", "null"); |
shouldBe("new UIEvent('eventType', { view: null }).view", "null"); |
-shouldBe("new UIEvent('eventType', { view: false }).view", "null"); |
-shouldBe("new UIEvent('eventType', { view: true }).view", "null"); |
-shouldBe("new UIEvent('eventType', { view: '' }).view", "null"); |
-shouldBe("new UIEvent('eventType', { view: 'chocolate' }).view", "null"); |
-shouldBe("new UIEvent('eventType', { view: 12345 }).view", "null"); |
-shouldBe("new UIEvent('eventType', { view: 18446744073709551615 }).view", "null"); |
-shouldBe("new UIEvent('eventType', { view: NaN }).view", "null"); |
+shouldThrow("new UIEvent('eventType', { view: false }).view"); |
+shouldThrow("new UIEvent('eventType', { view: true }).view"); |
+shouldThrow("new UIEvent('eventType', { view: '' }).view"); |
+shouldThrow("new UIEvent('eventType', { view: 'chocolate' }).view"); |
+shouldThrow("new UIEvent('eventType', { view: 12345 }).view"); |
+shouldThrow("new UIEvent('eventType', { view: 18446744073709551615 }).view"); |
+shouldThrow("new UIEvent('eventType', { view: NaN }).view"); |
// Note that valueOf() is not called, when the left hand side is evaluated. |
-shouldBeFalse("new UIEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window"); |
-shouldBe("new UIEvent('eventType', { get view() { return 123; } }).view", "null"); |
+shouldThrow("new UIEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window"); |
+shouldBe("new UIEvent('eventType', { get view() { return window; } }).view", "window"); |
+shouldThrow("new UIEvent('eventType', { get view() { return 123; } }).view"); |
shouldThrow("new UIEvent('eventType', { get view() { throw 'UIEvent Error'; } })"); |
// detail is passed. |