Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 cr.define('md_history.lazy_render_test', function() { | |
| 6 function registerTests() { | |
| 7 suite('history-lazy-render', function() { | |
| 8 | |
| 9 setup(function() { | |
| 10 PolymerTest.clearBody(); | |
| 11 var template = '<template is="history-lazy-render" id="lazy">' + | |
| 12 '<h1>Hello world!</h1>' + | |
| 13 '</template>'; | |
| 14 | |
| 15 document.body.innerHTML = template; | |
| 16 }); | |
| 17 | |
| 18 test('stamps after get()', function() { | |
| 19 var lazy = document.getElementById('lazy'); | |
| 20 | |
| 21 assertFalse(!!document.body.querySelector('h1')); | |
| 22 assertFalse(!!lazy.getIfExists()); | |
| 23 | |
| 24 return lazy.get().then(function(inner) { | |
| 25 assertEquals('H1', inner.nodeName); | |
| 26 assertEquals(inner, document.body.querySelector('h1')); | |
| 27 }); | |
| 28 }); | |
| 29 }); | |
|
calamity
2016/08/12 06:25:04
Any way to ensure path forwarding and notifying wo
tsergeant
2016/08/16 03:49:06
Done.
calamity
2016/08/16 07:00:01
Awesome!
| |
| 30 } | |
| 31 | |
| 32 return { | |
| 33 registerTests: registerTests, | |
| 34 } | |
| 35 }); | |
| OLD | NEW |