1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

merge from dev

This commit is contained in:
Luke Pulverenti 2015-12-14 10:43:03 -05:00
parent 1c8f02ce0f
commit 33b01d778c
911 changed files with 34157 additions and 57125 deletions

View file

@ -1,5 +1,4 @@
<!doctype html>
<!--
<!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
@ -7,9 +6,7 @@ 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>
--><html><head>
<title>iron-menu-behavior tests</title>
@ -23,13 +20,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<body>
<script>
WCT.loadSuites([
'iron-menu-behavior.html',
'iron-menubar-behavior.html'
'iron-menubar-behavior.html',
'iron-menu-behavior.html?dom=shadow',
'iron-menubar-behavior.html?dom=shadow'
]);
</script>
</body>
</html>
</body></html>

View file

@ -17,12 +17,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../../test-fixture/test-fixture.html">
<script src="../../iron-test-helpers/mock-interactions.js"></script>
<link rel="import" href="test-menu.html">
</head>
@ -48,6 +46,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="nested">
<template>
<test-menu>
<test-menu>
<div>item 1</div>
<div>item 2</div>
<div>item 3</div>
</test-menu>
</test-menu>
</template>
</test-fixture>
<script>
suite('menu a11y tests', function() {
@ -100,6 +111,36 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}, 200);
});
test('keyboard events should not bubble', function(done) {
var menu = fixture('nested');
var keyCounter = 0;
menu.addEventListener('keydown', function(event) {
if (menu.keyboardEventMatchesKeys(event, 'esc')) {
keyCounter++;
}
if (menu.keyboardEventMatchesKeys(event, 'up')) {
keyCounter++;
}
if (menu.keyboardEventMatchesKeys(event, 'down')) {
keyCounter++;
}
});
// up
MockInteractions.keyDownOn(menu.firstElementChild, 38);
// down
MockInteractions.keyDownOn(menu.firstElementChild, 40);
// esc
MockInteractions.keyDownOn(menu.firstElementChild, 27);
setTimeout(function() {
assert.equal(menu.firstElementChild.tagName, 'TEST-MENU');
assert.equal(keyCounter, 0);
done();
}, 200);
});
});
</script>

View file

@ -18,11 +18,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="test-menubar.html">
</head>