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

Side by Side Diff: appengine/config_service/ui/bower_components/webcomponentsjs/tests/integration-es5.html

Issue 2923973003: Added base template for config ui. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
3 @license
4 Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
5 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
8 Code distributed by Google as part of the polymer project is also
9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
10 -->
11 <html>
12 <head>
13 <title>Integration Test</title>
14 <script src="../custom-elements-es5-adapter.js"></script>
15 <script src="../webcomponents-loader.js"></script>
16 <script src="../../web-component-tester/browser.js"></script>
17 <link rel="import" href="imports/simple-element-es5.html">
18 </head>
19 <body>
20
21 <!-- Don't break this into multiple lines or you'll have to count text nodes -->
22 <simple-element id="basic"><span>Light DOM</span></simple-element>
23
24 <script>
25 suite('integration es5', function() {
26 var el;
27
28 setup(function() {
29 el = document.querySelector('#basic');
30 });
31
32 test('element is imported & upgraded', function() {
33 assert.equal(el.bestName, 'batman',
34 'doesn\'t have property set in constructor');
35 });
36
37 test('element has shadow DOM content', function() {
38 var shadowRoot = el.shadowRoot;
39
40 assert.ok(shadowRoot, 'does not have a shadow root');
41 assert.equal(shadowRoot.querySelector('p').textContent, 'Shadow DOM',
42 'does not have <p> in the shadow dom');
43 assert.equal(getComputedStyle(shadowRoot.querySelector('p')).color, 'r gb(255, 0, 0)',
44 'does not style <p> in the shadow dom');
45 });
46
47 test('element has distributed content', function() {
48 var slot = el.shadowRoot.querySelector('slot');
49 assert.ok(slot, 'does not have a slot');
50
51 var distributedNodes = slot.assignedNodes()
52 assert.equal(distributedNodes.length, 1,
53 'does not have exactly one element distributed');
54 assert.equal(distributedNodes[0].textContent, 'Light DOM',
55 'does not have the right content distributed');
56 assert.equal(getComputedStyle(distributedNodes[0]).color, 'rgb(0, 0, 2 55)',
57 'does not style light dom');
58 });
59 });
60 </script>
61 </body>
62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698