blob: a8fc18a64754773aa9ae582bda3fd18bafe085e8 [file] [log] [blame]
Becky Siegelc9e4a342017-03-10 16:37:17 -08001<!DOCTYPE html>
2<!--
Dave Borowitz8cdc76b2018-03-26 10:04:27 -04003@license
Becky Siegelc9e4a342017-03-10 16:37:17 -08004Copyright (C) 2017 The Android Open Source Project
5
6Licensed under the Apache License, Version 2.0 (the "License");
7you may not use this file except in compliance with the License.
8You may obtain a copy of the License at
9
10http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing, software
13distributed under the License is distributed on an "AS IS" BASIS,
14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15See the License for the specific language governing permissions and
16limitations under the License.
17-->
18<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
Tao Zhoud90e7f42020-04-29 17:07:14 +020019<meta charset="utf-8">
Becky Siegelc9e4a342017-03-10 16:37:17 -080020<title>gr-storage</title>
Tao Zhou8ef16f72019-11-18 14:14:36 -080021
Dmitrii Filippovdaf0ec92020-03-17 11:27:28 +010022<script src="/node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
Becky Siegelc9e4a342017-03-10 16:37:17 -080023
Dmitrii Filippovdaf0ec92020-03-17 11:27:28 +010024<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js"></script>
25<script src="/components/wct-browser-legacy/browser.js"></script>
Viktar Donich29e1ce52017-03-28 17:02:44 -070026
Becky Siegelc9e4a342017-03-10 16:37:17 -080027<test-fixture id="basic">
28 <template>
29 <gr-tooltip-content>
30 </gr-tooltip-content>
31 </template>
32</test-fixture>
33
Dmitrii Filippovdaf0ec92020-03-17 11:27:28 +010034<script type="module">
Dmitrii Filippovdaf0ec92020-03-17 11:27:28 +010035import '../../../test/common-test-setup.js';
36import './gr-tooltip-content.js';
37import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
38suite('gr-tooltip-content tests', () => {
39 let element;
40 setup(() => {
41 element = fixture('basic');
Becky Siegelc9e4a342017-03-10 16:37:17 -080042 });
Dmitrii Filippovdaf0ec92020-03-17 11:27:28 +010043
44 test('icon is not visible by default', () => {
45 assert.equal(dom(element.root)
46 .querySelector('iron-icon').hidden, true);
47 });
48
49 test('position-below attribute is reflected', () => {
50 assert.isFalse(element.hasAttribute('position-below'));
51 element.positionBelow = true;
52 assert.isTrue(element.hasAttribute('position-below'));
53 });
54
55 test('icon is visible with showIcon property', () => {
56 element.showIcon = true;
57 assert.equal(dom(element.root)
58 .querySelector('iron-icon').hidden, false);
59 });
60});
Becky Siegelc9e4a342017-03-10 16:37:17 -080061</script>