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

Unified Diff: LayoutTests/fast/events/constructors/storage-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/storage-event-constructor.html
diff --git a/LayoutTests/fast/events/constructors/storage-event-constructor.html b/LayoutTests/fast/events/constructors/storage-event-constructor.html
index ef5058a87f5572b816501c374d3775ea0bbc4e60..430f7a7782852dca81f91913bc3dddce037da053 100644
--- a/LayoutTests/fast/events/constructors/storage-event-constructor.html
+++ b/LayoutTests/fast/events/constructors/storage-event-constructor.html
@@ -56,21 +56,22 @@ shouldBe("new StorageEvent('eventType', { storageArea: sessionStorage }).storage
// Non-Storage objects.
var test_object = {abc: 123};
-shouldBe("new StorageEvent('eventType', { storageArea: test_object }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: window }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: document }).storageArea", "null");
+shouldThrow("new StorageEvent('eventType', { storageArea: test_object }).storageArea");
+shouldThrow("new StorageEvent('eventType', { storageArea: window }).storageArea");
+shouldThrow("new StorageEvent('eventType', { storageArea: document }).storageArea");
shouldBe("new StorageEvent('eventType', { storageArea: undefined }).storageArea", "null");
shouldBe("new StorageEvent('eventType', { storageArea: null }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: false }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: true }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: '' }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: 'chocolate' }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: 12345 }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: 18446744073709551615 }).storageArea", "null");
-shouldBe("new StorageEvent('eventType', { storageArea: NaN }).storageArea", "null");
+shouldThrow("new StorageEvent('eventType', { storageArea: false }).storageArea");
+shouldThrow("new StorageEvent('eventType', { storageArea: true }).storageArea");
+shouldThrow("new StorageEvent('eventType', { storageArea: '' }).storageArea");
+shouldThrow("new StorageEvent('eventType', { storageArea: 'chocolate' }).storageArea");
+shouldThrow("new StorageEvent('eventType', { storageArea: 12345 }).storageArea");
+shouldThrow("new StorageEvent('eventType', { storageArea: 18446744073709551615 }).storageArea");
+shouldThrow("new StorageEvent('eventType', { storageArea: NaN }).storageArea");
// Note that valueOf() is not called, when the left hand side is evaluated.
-shouldBeFalse("new StorageEvent('eventType', { storageArea: {valueOf: function () { return window; } } }).storageArea == window");
-shouldBe("new StorageEvent('eventType', { get storageArea() { return 123; } }).storageArea", "null");
+shouldThrow("new StorageEvent('eventType', { storageArea: {valueOf: function () { return window; } } }).storageArea == window");
+shouldBe("new StorageEvent('eventType', { get storageArea() { return localStorage; } }).storageArea", "localStorage");
+shouldThrow("new StorageEvent('eventType', { get storageArea() { return 123; } }).storageArea");
shouldThrow("new StorageEvent('eventType', { get storageArea() { throw 'StorageEvent Error'; } })");
// All initializers are passed.

Powered by Google App Engine
This is Rietveld 408576698