Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Commit e64b844

Browse files
sfuquajgraham
authored andcommitted
Add additional fetch_tests_from_window sample.
1 parent a5802df commit e64b844

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

examples/apisample18.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
>
22
<html>
33
<head>
4-
<title>Example with iframe that consolidates tests via fetch_tests_from_windowtitle>
4+
<title>Example with iframe that consolidates errors via fetch_tests_from_windowtitle>
55
<script src="../testharness.js">script>
66
<script src="../testharnessreport.js">script>
77
<script>

examples/apisample19.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
>
2+
<html>
3+
<head>
4+
<title>Example with iframe that consolidates tests via fetch_tests_from_windowtitle>
5+
<script src="../testharness.js">script>
6+
<script src="../testharnessreport.js">script>
7+
<script>
8+
var parent_test = async_test("Test executing in parent context");
9+
script>
10+
head>
11+
<body onload="parent_test.done()">
12+
<h1>Fetching Tests From a Child Contexth1>
13+
<p>This test demonstrates the use of <tt>fetch_tests_from_windowtt> to pull
14+
tests from an <tt>iframett> into the primary document.p>
15+
<p>The test suite will not complete until tests in the child context have finished
16+
executingp>
17+
<div id="log">div>
18+
19+
<iframe id="childContext" src="apisample10.html" style="display:none">iframe>
20+
21+
22+
<script>
23+
var childContext = document.getElementById("childContext");
24+
fetch_tests_from_window(childContext.contentWindow);
25+
script>
26+
body>

0 commit comments

Comments
 (0)