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

Side by Side Diff: chrome/test/data/extensions/api_test/css_l10n/test_extension_id.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Tests that the 'body' element has had CSS injected, and that the CSS code
2 // has had the __MSG_@@extension_id__ message replaced ('extension_id' must
3 // not be present in any CSS code).
4 //
5 // Communicates the result back through the page title.
6
7 var gotReplaced = true;
8
9 var rules = getMatchedCSSRules(document.getElementById('bodyId'));
10 if (rules == null) {
11 document.title = 'no CSS rules injected';
Mihai Parparita -not on Chrome 2011/08/16 17:42:41 This title will never be displayed, since you stil
adriansc 2011/08/16 22:13:51 Done.
12 } else {
13 for (var i = 0; i < rules.length; ++i) {
14 if (rules.item(i).cssText.indexOf('extension_id') != -1) {
15 gotReplaced = false;
16 }
17 }
18 }
19
20 if (gotReplaced == true) {
21 document.title = 'passed';
Nebojša Ćirić 2011/08/16 17:40:24 Why not send request to the background page from h
adriansc 2011/08/16 22:13:51 Done.
22 } else {
23 document.title = 'failed';
24 }
25
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698