Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: LayoutTests/fast/events/constructors/media-stream-event-constructor.html

Issue 85263002: Improve handling of dictionary conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have conversion methods take a context argument; elaborate error msgs further. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/constructors/media-stream-event-constructor.html
diff --git a/LayoutTests/fast/events/constructors/media-stream-event-constructor.html b/LayoutTests/fast/events/constructors/media-stream-event-constructor.html
index fd50139110d4021810b58d90198ec65e731b73c0..a7038a59a2273cabc059c277869f8868f5551e02 100644
--- a/LayoutTests/fast/events/constructors/media-stream-event-constructor.html
+++ b/LayoutTests/fast/events/constructors/media-stream-event-constructor.html
@@ -29,20 +29,21 @@ shouldBe("new MediaStreamEvent('eventType', { cancelable: true }).cancelable", "
shouldBe("new MediaStreamEvent('eventType', { stream: mediaStream }).stream", "mediaStream");
// Invalid objects.
-shouldBe("new MediaStreamEvent('eventType', { stream: testObject }).stream", "null");
-shouldBe("new MediaStreamEvent('eventType', { stream: document }).stream", "null");
+shouldThrow("new MediaStreamEvent('eventType', { stream: testObject }).stream");
+shouldThrow("new MediaStreamEvent('eventType', { stream: document }).stream");
shouldBe("new MediaStreamEvent('eventType', { stream: undefined }).stream", "null");
shouldBe("new MediaStreamEvent('eventType', { stream: null }).stream", "null");
-shouldBe("new MediaStreamEvent('eventType', { stream: false }).stream", "null");
-shouldBe("new MediaStreamEvent('eventType', { stream: true }).stream", "null");
-shouldBe("new MediaStreamEvent('eventType', { stream: '' }).stream", "null");
-shouldBe("new MediaStreamEvent('eventType', { stream: 'chocolate' }).stream", "null");
-shouldBe("new MediaStreamEvent('eventType', { stream: 12345 }).stream", "null");
-shouldBe("new MediaStreamEvent('eventType', { stream: 18446744073709551615 }).stream", "null");
-shouldBe("new MediaStreamEvent('eventType', { stream: NaN }).stream", "null");
+shouldThrow("new MediaStreamEvent('eventType', { stream: false }).stream");
+shouldThrow("new MediaStreamEvent('eventType', { stream: true }).stream");
+shouldThrow("new MediaStreamEvent('eventType', { stream: '' }).stream");
+shouldThrow("new MediaStreamEvent('eventType', { stream: 'chocolate' }).stream");
+shouldThrow("new MediaStreamEvent('eventType', { stream: 12345 }).stream");
+shouldThrow("new MediaStreamEvent('eventType', { stream: 18446744073709551615 }).stream");
+shouldThrow("new MediaStreamEvent('eventType', { stream: NaN }).stream");
// Note that valueOf() is not called, when the left hand side is evaluated.
-shouldBeFalse("new MediaStreamEvent('eventType', { stream: {valueOf: function () { return mediaStream; } } }).stream == mediaStream");
-shouldBe("new MediaStreamEvent('eventType', { get stream() { return 123; } }).stream", "null");
+shouldThrow("new MediaStreamEvent('eventType', { stream: {valueOf: function () { return mediaStream; } } }).stream == mediaStream");
+shouldBe("new MediaStreamEvent('eventType', { get stream() { return mediaStream; } }).stream", "mediaStream");
+shouldThrow("new MediaStreamEvent('eventType', { get stream() { return 123; } }).stream");
shouldThrow("new MediaStreamEvent('eventType', { get stream() { throw 'MediaStreamEvent Error'; } })");
// All initializers are passed.

Powered by Google App Engine
This is Rietveld 408576698