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

Unified Diff: third_party/polymer/components/paper-input/test/paper-input.html

Issue 2113853002: Run bower update (Closed) Base URL: https://github.com/catapult-project/catapult@polymer10-migration
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/components/paper-input/test/paper-input.html
diff --git a/third_party/polymer/components/paper-input/test/paper-input.html b/third_party/polymer/components/paper-input/test/paper-input.html
index aed36807195684a63d85fc7515c20e648aa34bf7..2ed20b372bab1ab2b2230cf0bdfa35401fca53d7 100644
--- a/third_party/polymer/components/paper-input/test/paper-input.html
+++ b/third_party/polymer/components/paper-input/test/paper-input.html
@@ -83,6 +83,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
+ <test-fixture id="type-number-char-counter">
+ <template>
+ <paper-input type="number" char-counter value="1138"></paper-input>
+ </template>
+ </test-fixture>
+
<test-fixture id="always-float-label">
<template>
<paper-input always-float-label label="foo"></paper-input>
@@ -179,6 +185,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.equal(counter._charCounterStr, input.value.length, 'character counter shows the value length');
});
+ test('character counter is correct for type=number', function() {
+ var input = fixture('type-number-char-counter');
+ forceXIfStamp(input);
+ var counter = Polymer.dom(input.root).querySelector('paper-input-char-counter')
+ assert.ok(counter, 'paper-input-char-counter exists');
+ assert.equal(counter._charCounterStr, input.value.toString().length, 'character counter shows the value length');
+ });
+
test('validator is used', function() {
var input = fixture('validator');
assert.ok(input.inputElement.invalid, 'input is invalid');
@@ -251,6 +265,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
MockInteractions.blur(input.inputElement);
assert(!input.focused, 'input is blurred');
});
+
+ test('focusing then bluring with shift-tab removes the focused attribute correctly', function() {
+ MockInteractions.focus(input);
+ assert(input.focused, 'input is focused');
+
+ // Fake a shift-tab induced blur by forcing the flag.
+ input._shiftTabPressed = true;
+ MockInteractions.blur(input.inputElement);
+ assert(!input.focused, 'input is blurred');
+ });
});
suite('focused styling (integration test)', function() {

Powered by Google App Engine
This is Rietveld 408576698