-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for style elements in an element declared in the main docume…
…nt + freshen
- Loading branch information
Showing
8 changed files
with
559 additions
and
69 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,39 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
Copyright 2013 The Polymer Authors. All rights reserved. | ||
Use of this source code is governed by a BSD-style | ||
license that can be found in the LICENSE file. | ||
--> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="initial-scale=1.0"> | ||
<title>loading sheets in elements defined in main document</title> | ||
<script src="../../../polymer.js"></script> | ||
<script src="../../../tools/test/htmltest.js"></script> | ||
<script src="../../../node_modules/chai/chai.js"></script> | ||
</head> | ||
<body> | ||
<x-foo></x-foo> | ||
<div class="red1">red</div> | ||
<element name="x-foo"> | ||
<link rel="stylesheet" polymer-scope="global" href="sheet1.css"> | ||
<link rel="stylesheet" href="sheet1.css"> | ||
<template> | ||
<div id="div" class="red1">Red</div> | ||
</template> | ||
<script>Polymer.register(this);</script> | ||
</element> | ||
<script> | ||
document.addEventListener('WebComponentsReady', function() { | ||
var foo = document.querySelector('x-foo'); | ||
var color = 'rgb(255, 0, 0)'; | ||
chai.assert.equal(getComputedStyle(foo.$.div).backgroundColor, color, | ||
'computed color matches expected color'); | ||
|
||
chai.assert.equal(getComputedStyle(foo.$.div).backgroundColor, color, | ||
'computed color matches expected color'); | ||
done(); | ||
}); | ||
</script> | ||
</body> | ||
</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