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

Unified Diff: chrome/test/data/webui/i18n_process_css_test.html

Issue 1246253002: Convert i18n_process.css to use /deep/ instead of ::shadow and add tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +GN Created 5 years, 5 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: chrome/test/data/webui/i18n_process_css_test.html
diff --git a/chrome/test/data/webui/i18n_process_css_test.html b/chrome/test/data/webui/i18n_process_css_test.html
new file mode 100644
index 0000000000000000000000000000000000000000..a2b93eb1930c0c6f701171d4ad58d11ede0acf4a
--- /dev/null
+++ b/chrome/test/data/webui/i18n_process_css_test.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
esprehn 2015/07/21 23:42:02 You can leave out html and body.
Dan Beam 2015/07/22 00:15:40 Done.
+ <style>
+ <include src="../../../../ui/webui/resources/css/i18n_process.css">
+ </style>
+ <body>
+ <h1 i18n-content="buy"></h1>
+ <span i18n-values=".innerHTML:link"></span>
+ <script>
+function testI18nProcess_NbspPlaceholder() {
+ var h1 = document.querySelector('h1');
+ var span = document.querySelector('span');
+
+ assertFalse(document.documentElement.hasAttribute('i18n-processed'));
+ assertEquals('', h1.textContent);
+ assertEquals('', span.textContent);
+
+ /* We can't check that the non-breaking space hack actually works because it
+ * uses :psuedo-elements that are inaccessible to the DOM. Let's just check
+ * that they're not auto-collapsed. */
+ assertNotEqual(0, h1.offsetHeight);
+ assertNotEqual(0, span.offsetHeight);
+
+ h1.removeAttribute('i18n-content');
+ assertEquals(0, h1.offsetHeight);
+
+ span.removeAttribute('i18n-values');
+ assertEquals(0, span.offsetHeight);
+}
+ </script>
esprehn 2015/07/21 23:42:02 and then not indent any of this
Dan Beam 2015/07/22 00:15:40 Done.
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698