-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from kumatronik/submissions/kumatronik2
Add RefTest for ShadowTree/nested_shadow_tree
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
shadow-dom/shadow-trees/nested-shadow-trees/nested_tree_reftest-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" > | ||
<title>Shadow DOM Test Ref file - Tests nested shadow tree.</title> | ||
<link rel="author" title="shingo.miyazawa" href="mailto:kumatronik@gmail.com" > | ||
<script src="../../testcommon.js"></script> | ||
<meta name="assert" content="nested shadow tree style is valid." > | ||
<style> | ||
#host { | ||
width: 100px; | ||
height: 100px; | ||
background-color: red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>The test passes if there is a green square. Test failed if there is a red square.</p> | ||
<div id='host'> | ||
<div id="sub" style="width: 100%;height:100%;"> | ||
<div style="width:100%; height:100%;background-color: green;"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
30 changes: 30 additions & 0 deletions
30
shadow-dom/shadow-trees/nested-shadow-trees/nested_tree_reftest.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" > | ||
<title>Shadow DOM Test - Tests nested shadow tree.</title> | ||
<link rel="match" href="nested_tree_reftest-ref.html" > | ||
<link rel="author" title="shingo.miyazawa" href="mailto:kumatronik@gmail.com" > | ||
<link rel="help" href="https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#nested-shadow-trees" > | ||
<script src="../../testcommon.js"></script> | ||
<meta name="assert" content="nested shadow tree style is valid." > | ||
<style> | ||
#host { | ||
width: 100px; | ||
height: 100px; | ||
background-color: red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>The test passes if there is a green square. Test failed if there is a red square.</p> | ||
<div id='host'> | ||
</div> | ||
<script> | ||
var shadowRoot = createSR(document.getElementById('host')); | ||
shadowRoot.innerHTML = '<div id="sub" style="width: 100%;height:100%;"></div>'; | ||
var nestedRoot = createSR(shadowRoot.getElementById('sub')); | ||
nestedRoot.innerHTML = '<div style="width:100%; height:100%;background-color: green;"></div>'; | ||
</script> | ||
</body> | ||
</html> |