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

Side by Side Diff: chrome/test/data/webui/md_history/lazy_render_test.js

Issue 2230003002: MD History: Add lazy-render element for simple lazy initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lazy render synced tabs menu Created 4 years, 4 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 // 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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698