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

Side by Side Diff: LayoutTests/fast/media/mq-append-delete.html

Issue 14620012: Improved parse error handling for CSSMQ. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@query-selector-performance
Patch Set: Let expected result for "and(" be the current implementation. Created 7 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <style type="text/css">@media screen { }</style> 2 <style type="text/css">@media screen { }</style>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <div id=log></div> 5 <div id=log></div>
6 <script> 6 <script>
7 var rules = document.styleSheets[0].cssRules; 7 var rules = document.styleSheets[0].cssRules;
8 var mediaList = rules.item(0).media; 8 var mediaList = rules.item(0).media;
9 9
10 // - appendMedium() 10 // - appendMedium()
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 assert_equals(mediaList.mediaText, "screen, tv"); 70 assert_equals(mediaList.mediaText, "screen, tv");
71 // Ignored; terminate steps. 71 // Ignored; terminate steps.
72 }, "Add '&invalid' to 'screen, tv'"); 72 }, "Add '&invalid' to 'screen, tv'");
73 73
74 test(function () { 74 test(function () {
75 mediaList.mediaText = "screen, tv"; 75 mediaList.mediaText = "screen, tv";
76 mediaList.appendMedium("not all"); 76 mediaList.appendMedium("not all");
77 assert_equals(mediaList.mediaText, "screen, tv, not all"); 77 assert_equals(mediaList.mediaText, "screen, tv, not all");
78 }, "Add 'not all' to 'screen, tv'"); 78 }, "Add 'not all' to 'screen, tv'");
79 79
80 test(function () {
81 mediaList.mediaText = "screen, tv";
82 mediaList.appendMedium("#?:/");
83 assert_equals(mediaList.mediaText, "screen, tv");
84 // Ignored; terminate steps.
85 }, "Add '#?:/' to 'screen, tv'");
86
80 // - deleteMedium() 87 // - deleteMedium()
81 88
82 test(function () { 89 test(function () {
83 mediaList.mediaText = "screen, tv, not all"; 90 mediaList.mediaText = "screen, tv, not all";
84 mediaList.deleteMedium("&invalid"); 91 mediaList.deleteMedium("&invalid");
85 // Ignored; terminate steps. 92 // Ignored; terminate steps.
86 assert_equals(mediaList.mediaText, "screen, tv, not all"); 93 assert_equals(mediaList.mediaText, "screen, tv, not all");
87 }, "Remove '&invalid' from 'screen, tv, not all'"); 94 }, "Remove '&invalid' from 'screen, tv, not all'");
88 95
89 test(function () { 96 test(function () {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // for which comparing the media query returns true. 141 // for which comparing the media query returns true.
135 }, "Remove 'tv' from 'not all, not all, tv, not all'"); 142 }, "Remove 'tv' from 'not all, not all, tv, not all'");
136 143
137 test(function () { 144 test(function () {
138 mediaList.mediaText = "tv, print, screen"; 145 mediaList.mediaText = "tv, print, screen";
139 mediaList.deleteMedium("tv, print"); 146 mediaList.deleteMedium("tv, print");
140 assert_equals(mediaList.mediaText, "tv, print, screen"); 147 assert_equals(mediaList.mediaText, "tv, print, screen");
141 // CSSOM 4.1: Parsing media query returns none as 148 // CSSOM 4.1: Parsing media query returns none as
142 // there are more than one; terminate steps. 149 // there are more than one; terminate steps.
143 }, "Remove 'tv, print' from 'screen, tv, screen'"); 150 }, "Remove 'tv, print' from 'screen, tv, screen'");
151
152 test(function () {
153 mediaList.mediaText = "screen, tv, not all";
154 mediaList.deleteMedium("#?:/");
155 // Ignored; terminate steps.
156 assert_equals(mediaList.mediaText, "screen, tv, not all");
157 }, "Remove '#?:/' from 'screen, tv, not all'");
144 </script> 158 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/media/media-query-list-syntax-expected.txt ('k') | LayoutTests/fast/media/mq-append-delete-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698