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

Unified Diff: chrome/test/data/extensions/api_test/css_l10n/test_paragraph_dir_style.js

Issue 7552028: Injected CSS localization fix (see bug no.) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unnecessary include and added comments to browser test. Created 9 years, 4 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/extensions/api_test/css_l10n/test_paragraph_dir_style.js
diff --git a/chrome/test/data/extensions/api_test/css_l10n/test_paragraph_dir_style.js b/chrome/test/data/extensions/api_test/css_l10n/test_paragraph_dir_style.js
new file mode 100644
index 0000000000000000000000000000000000000000..50c135ad11fc21f72aac35b0ceb4238f26cf2bf3
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/css_l10n/test_paragraph_dir_style.js
@@ -0,0 +1,25 @@
+// Tests that the 'p' element has had CSS injected, and that the CSS code
+// has had the __MSG_@@bidi_dir__ message replaced ('bidi_dir' must
+// not be present in any CSS code).
+//
+// Communicates the result back through the page title.
+
+var gotReplaced = true;
+
+var rules = getMatchedCSSRules(document.getElementById('pId'));
+if (rules == null) {
+ document.title = 'no CSS rules injected';
+} else {
+ for (var i = 0; i < rules.length; ++i) {
+ if (rules.item(i).cssText.indexOf('bidi_dir') != -1) {
+ gotReplaced = false;
+ }
+ }
+}
+
+if (gotReplaced == true) {
+ document.title = 'passed';
+} else {
+ document.title = 'failed';
+}
+

Powered by Google App Engine
This is Rietveld 408576698