update components
This commit is contained in:
parent
7dbb1f7535
commit
b447272b19
26 changed files with 478 additions and 107 deletions
78
dashboard-ui/bower_components/paper-drawer-panel/test/focus.html
vendored
Normal file
78
dashboard-ui/bower_components/paper-drawer-panel/test/focus.html
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>paper-drawer-panel tests</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
|
||||
<link rel="import" href="../paper-drawer-panel.html">
|
||||
<link rel="import" href="../../iron-test-helpers/iron-test-helpers.html">
|
||||
|
||||
</head>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
|
||||
<test-fixture id="drawer">
|
||||
<template>
|
||||
<paper-drawer-panel force-narrow>
|
||||
<div drawer>
|
||||
<input id="innerLink1" tabindex="0" value="inside drawer 1">
|
||||
<input id="innerLink2" tabindex="0" value="inside drawer 2">
|
||||
</div>
|
||||
<div main>
|
||||
<input id="outerLink" tabindex="0" value="outside drawer">
|
||||
</div>
|
||||
</paper-drawer-panel>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
function ensureDocumentHasFocus() {
|
||||
window.top && window.top.focus();
|
||||
}
|
||||
|
||||
suite('focus', function() {
|
||||
var drawer, innerLink, outerLink;
|
||||
|
||||
setup(function() {
|
||||
drawer = fixture('drawer');
|
||||
innerLink = drawer.querySelector('#innerLink1');
|
||||
outerLink = drawer.querySelector('#outerLink');
|
||||
ensureDocumentHasFocus();
|
||||
});
|
||||
|
||||
test('should not focus content in drawer if the drawer is closed', function(done) {
|
||||
Polymer.Base.async(function() {
|
||||
expect(Polymer.dom(document).activeElement).to.not.be.equal(innerLink);
|
||||
done();
|
||||
}, 1);
|
||||
MockInteractions.focus(innerLink);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue