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

Side by Side Diff: third_party/polymer/v0_8/components-chromium/iron-media-query/test/basic.html

Issue 1082403004: Import Polymer 0.8 and several key elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rerun reproduce.sh Created 5 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 -->
10
11 <html>
12 <head>
13
14 <title>iron-media-query-basic</title>
15 <meta charset="utf-8">
16 <meta name="viewport" content="width=device-width, initial-scale=1.0">
17
18 <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
19 <script src="../../web-component-tester/browser.js"></script>
20 <script src="../../test-fixture/test-fixture-mocha.js"></script>
21
22 <link rel="import" href="../iron-media-query.html">
23 <link rel="import" href="../../test-fixture/test-fixture.html">
24
25 </head>
26 <body>
27
28 <test-fixture id="basic">
29 <template>
30 <iron-media-query></iron-media-query>
31 </template>
32 </test-fixture>
33
34 <script>
35
36 suite('basic', function() {
37 var mq;
38
39 suite('set query with different values', function() {
40 setup(function () {
41 mq = fixture('basic');
42 });
43
44 test('small min-width value', function() {
45 mq.query = '(min-width: 1px)';
46 assert.equal(mq.queryMatches, true);
47 });
48
49 test('large min-width value', function() {
50 mq.query = '(min-width: 10000px)';
51 assert.equal(mq.queryMatches, false);
52 });
53
54 test('small max-width value', function() {
55 mq.query = '(max-width: 1px)';
56 assert.equal(mq.queryMatches, false);
57 });
58
59 test('large max-width value', function() {
60 mq.query = '(max-width: 10000px)';
61 assert.equal(mq.queryMatches, true);
62 });
63
64 });
65
66 });
67
68 </script>
69
70 </body>
71 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698