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.
7 <link rel="import" href="../ct-popout-iframe.html">
12 var assert = chai.assert;
14 describe('ct-popout-iframe', function() {
15 it('has iframe and link', function() {
16 var elem = document.createElement('ct-popout-iframe');
18 var iframes = elem.shadowRoot.querySelectorAll('iframe');
19 assert.lengthOf(iframes, 1);
21 var links = elem.shadowRoot.querySelectorAll('a');
22 assert.lengthOf(links, 1);
24 var thisHref = location.href;
25 assert.equal(iframes[0].src, thisHref);
26 assert.equal(links[0].href, thisHref);
28 var url = 'https://example.com/results.txt';
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);