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

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..d844f0446144bb4f65314fddaa88a60e89b7d45d 100644
--- a/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
+++ b/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html
@@ -73,4 +73,20 @@ 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);
+
Ken Rockot(use gerrit already) 2016/02/19 00:23:45 nit: -vspace
Sam McNally 2016/02/19 02:25:37 Done.
+ });
+}, 'Mojo bindings are accessible from iframes');
</script>
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/LayoutTests/harness-tests/resources/mojo-helpers-inner.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698