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

Side by Side Diff: sky/tests/styles/media-queries.sky

Issue 858423002: Don't store a RuleFeatureSet on ScopedStyleResolver. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: better test names. Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/dom/StyleEngine.cpp ('k') | sky/tests/styles/media-queries-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <import src="../resources/chai.sky" />
3 <import src="../resources/mocha.sky" />
4
5 <style media="(max-width: 0px)">
6 #test { color: rgb(255, 0, 0); }
7 </style>
8 <div id="does-not-match">Should not be red.</div>
9
10 <style media="(max-width: 10000px)">
11 #matches { color: rgb(255, 0, 0); }
12 </style>
13
14 <div id="matches">Should be red.</div>
15
16 <script>
17 describe('Media queries', function() {
18 it('should allow sheets to apply when they match', function() {
19 var element = document.getElementById('matches');
20 assert.equal(getComputedStyle(element).color, "rgb(255, 0, 0)");
21 });
22
23 it('should cause sheets to be skipped when they do not match', function() {
24 var element = document.getElementById('does-not-match');
25 assert.equal(getComputedStyle(element).color, "rgb(0, 0, 0)");
26 });
27 });
28 </script>
29 </html>
OLDNEW
« no previous file with comments | « sky/engine/core/dom/StyleEngine.cpp ('k') | sky/tests/styles/media-queries-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698