| Index: polymer_1.2.3/bower_components/iron-media-query/test/basic.html
|
| diff --git a/polymer_1.0.4/bower_components/iron-media-query/test/basic.html b/polymer_1.2.3/bower_components/iron-media-query/test/basic.html
|
| similarity index 54%
|
| copy from polymer_1.0.4/bower_components/iron-media-query/test/basic.html
|
| copy to polymer_1.2.3/bower_components/iron-media-query/test/basic.html
|
| index 34346c290dbdea55f54fc45ba14b9311a205aba0..8649ceba3f2b134aae3156914e0a12cf7cf384c4 100644
|
| --- a/polymer_1.0.4/bower_components/iron-media-query/test/basic.html
|
| +++ b/polymer_1.2.3/bower_components/iron-media-query/test/basic.html
|
| @@ -17,11 +17,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
| <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="../iron-media-query.html">
|
| - <link rel="import" href="../../test-fixture/test-fixture.html">
|
| -
|
| +
|
| </head>
|
| <body>
|
|
|
| @@ -61,6 +58,56 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
| assert.equal(mq.queryMatches, true);
|
| });
|
|
|
| + test('automatically wrap with parens', function() {
|
| + mq.query = 'min-width: 1px';
|
| + assert.equal(mq.queryMatches, true);
|
| + });
|
| +
|
| + suite('`full` attribute', function() {
|
| + test('media features without wrapping parentheses no longer match', function() {
|
| + mq.full = true;
|
| + mq.query = 'min-width: 1px';
|
| + assert.equal(mq.queryMatches, false);
|
| + });
|
| +
|
| + test('media queries with both types and features match', function() {
|
| + mq.full = true;
|
| + mq.query = 'all and (min-width: 1px)';
|
| + assert.equal(mq.queryMatches, true);
|
| + });
|
| + });
|
| +
|
| + suite('query does not activate on empty string or null', function() {
|
| +
|
| + test('empty string', function() {
|
| + mq.query = '';
|
| + assert.notOk(mq._mq);
|
| + });
|
| +
|
| + test('null', function() {
|
| + mq.query = null;
|
| + assert.notOk(mq._mq);
|
| + });
|
| +
|
| + });
|
| +
|
| + test('media query destroys on detach', function() {
|
| + mq.query = '(max-width: 800px)';
|
| + mq.parentNode.removeChild(mq);
|
| + Polymer.dom.flush();
|
| + assert.notOk(mq._mq);
|
| + });
|
| +
|
| + test('media query re-enables on attach', function() {
|
| + mq.query = '(max-width: 800px)';
|
| + var parent = mq.parentNode;
|
| + parent.removeChild(mq);
|
| + Polymer.dom.flush();
|
| + parent.appendChild(mq);
|
| + Polymer.dom.flush();
|
| + assert.ok(mq._mq);
|
| + });
|
| +
|
| });
|
|
|
| });
|
|
|