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

Side by Side Diff: Tools/GardeningServer/ui/test/ct-popout-iframe.html

Issue 559843006: SheriffOMatic: Add ct-popout-iframe and switch test output iframes to use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6
7 <link rel="import" href="../ct-popout-iframe.html">
8
9 <script>
10 (function() {
11
12 var assert = chai.assert;
13
14 describe('ct-popout-iframe', function() {
15 it('has iframe and link', function() {
16 var elem = document.createElement('ct-popout-iframe');
17
18 var iframes = elem.shadowRoot.getElementsByTagName('iframe');
ojan 2014/09/12 00:22:17 Use querySelectorAll. It's more modern and less cr
Robert Sesek 2014/09/12 13:58:59 Done.
19 assert.lengthOf(iframes, 1);
20
21 var links = elem.shadowRoot.getElementsByTagName('a');
22 assert.lengthOf(links, 1);
23
24 var thisHref = location.href;
25 assert.lengthOf(iframes[0].src, thisHref.length);
26 assert.lengthOf(links[0].href, thisHref.length);
ojan 2014/09/12 00:22:16 Why check lengthOf instead of equal? Probably dese
Robert Sesek 2014/09/12 13:58:59 Switched to just .equal().
27
28 var url = 'http://example.com/results.txt';
29 elem.src = url;
30
31 describe('src', function() {
32 it('set to a URL', function() {
33 assert.equal(iframes[0].src, url);
34 assert.equal(links[0].href, url);
35 });
36 });
37 });
38 });
39
40 })();
41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698