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

Unified Diff: third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html

Issue 1707233003: Expose mojo bindings to subframes in layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layout-test-mojom
Patch Set: Created 4 years, 10 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/harness-tests/mojo-helpers.html
diff --git a/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html b/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
index 005b8cdc87105a54c20f936509450762abc785ef..b68dda0a71ec111645c27da2f28d69e3d28d346c 100644
--- a/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
+++ b/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
@@ -73,4 +73,19 @@ mojo_test(mojo => {
assert_array_equals(response.handles, []);
});
}, 'Test code can receive response messages from mock services.');
+
+mojo_test(() => {
+ return new Promise(resolve => {
+ let iframe = document.createElement('iframe');
+ let listener = result => {
+ document.body.removeChild(iframe);
+ window.removeEventListener('message', listener);
+ assert_true(result.data);
+ resolve();
+ }
+ window.addEventListener('message', listener);
+ iframe.setAttribute('src', 'resources/mojo-helpers-inner.html');
+ document.body.appendChild(iframe);
+ });
+}, 'Mojo bindings are accessible from iframes');
</script>

Powered by Google App Engine
This is Rietveld 408576698