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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html b/third_party/WebKit/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html
index 847b5ee696d4eac3db52edaf311cae8c80dd60fa..0551120c61cf11d6a8b9f18dc9f2518c2280bdc3 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html
@@ -4,6 +4,21 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/css-medialist-item.js"></script>
+<script>
+description("This tests indexing outside the range of the media list object.");
+
+var styleElement = document.createElement('style');
+styleElement.setAttribute('media', 'screen, print');
+document.documentElement.appendChild(styleElement)
+var mediaList = document.styleSheets[document.styleSheets.length - 1].media;
+
+shouldEvaluateTo('mediaList.length', 2);
+shouldBeEqualToString('mediaList[0]', 'screen');
+shouldBeEqualToString('mediaList[1]', 'print');
+shouldBeUndefined('mediaList[2]');
+shouldBeUndefined('mediaList[-1]')
+
+document.documentElement.removeChild(styleElement);
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698