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

Unified Diff: third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/utils.js

Issue 2401013002: Make MediaSession per frame as an attribute of Navigator (Closed)
Patch Set: split mojo tests Created 4 years, 2 months 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: third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/utils.js
diff --git a/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/utils.js b/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/utils.js
new file mode 100644
index 0000000000000000000000000000000000000000..e1cfa6f5eedd4f44772f18bb3b6108a6caab2de6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/utils.js
@@ -0,0 +1,15 @@
+function assert_image_equals(expected, observed) {
+ assert_equals(expected.src, observed.src);
+ assert_equals(expected.type, observed.type);
+ assert_equals(expected.sizes, observed.sizes);
+}
+
+function assert_metadata_equals(expected, observed) {
+ assert_equals(expected.title, observed.title);
+ assert_equals(expected.artist, observed.artist);
+ assert_equals(expected.album, observed.album);
+ assert_equals(expected.artwork.length, observed.artwork.length);
+ for (var i = 0; i < expected.artwork.length; i++) {
+ assert_image_equals(expected.artwork[i], observed.artwork[i]);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698