| 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';
|
| +}
|
| +
|
|
|