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

Side by Side Diff: appengine/config_service/ui/bower_components/webcomponentsjs/tests/load.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) 2014 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></title>
14 <meta charset="UTF-8">
15 <script>
16 window.addEventListener('HTMLImportsLoaded', function() {
17 window.importsOk = true;
18 });
19 window.webComponentsReadyCount = 0;
20 document.addEventListener('WebComponentsReady', function() {
21 window.webComponentsReadyCount++;
22 });
23 </script>
24 <script src="../webcomponents-loader.js"></script>
25 <script src="../../web-component-tester/browser.js"></script>
26 <link rel="import" href="imports/import-file.html">
27 </head>
28 <body>
29 <my-element></my-element>
30 <script>
31 window.addEventListener('WebComponentsReady', () => {
32 class MyElement extends HTMLElement {
33 connectedCallback(){
34 this.textContent = 'upgraded!';
35 }
36 }
37 customElements.define('my-element', MyElement);
38 });
39 suite('Loader', function() {
40 test('expected boot', function() {
41 assert.equal(window.webComponentsReadyCount, 1, 'failed to fire WebCom ponentsReady');
42 if (window.HTMLImports) {
43 assert.ok(window.importsOk, 'WebComponentsReady without HTMLImportsL oaded');
44 }
45 assert.ok(window.importTest, 'import failed to set global value');
46 });
47 test('WebComponentsReady was fired on document and bubbled', function() {
48 assert.equal(document.querySelector('my-element').textContent, 'upgrad ed!');
49 })
50 });
51 </script>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698