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

Side by Side Diff: chrome/test/data/extensions/api_test/css_l10n/background.html

Issue 7552028: Injected CSS localization fix (see bug no.) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Changed browser_tests for scalability and added insertCSS 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 <script>
2
3 var firstEnter = true;
4
5 chrome.test.getConfig(function(config) {
6 chrome.test.log('Creating tab...');
7
8 var URL = 'http://localhost:PORT/files/extensions/test_file_with_body.html';
9 var TEST_FILE_URL = URL.replace(/PORT/, config.testServer.port);
10
11 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
12 if (changeInfo.status != 'complete')
13 return;
14 if ((!firstEnter))
15 return;
16 firstEnter = false;
17
18 chrome.test.runTests([
19
20 function extensionIDMessageGetsReplacedInContentScriptCSS() {
Nebojša Ćirić 2011/08/16 15:04:54 Comment about 2 paths you have to cover would be n
adriansc 2011/08/16 17:07:04 Done.
21 var script_file = {};
22 script_file.file = 'test_extension_id.js';
23 chrome.tabs.executeScript(tabId, script_file, function() {
24 chrome.tabs.get(tabId, chrome.test.callbackPass(function(tab) {
25 chrome.test.assertEq('passed', tab.title);
26 }));
27 });
28 },
29
30 function textDirectionMessageGetsReplacedInInsertCSSCall() {
31 var css_file = {};
32 css_file.code = 'p {direction: __MSG_@@bidi_dir__;}';
33 chrome.tabs.insertCSS(tabId, css_file, function() {
34 var script_file = {};
35 script_file.file = 'test_paragraph_dir_style.js';
36 chrome.tabs.executeScript(tabId,script_file, function() {
37 chrome.tabs.get(tabId, chrome.test.callbackPass(function(tab) {
38 chrome.test.assertEq('passed', tab.title);
39 }));
40 });
41 });
42 }
43
44 ]);
45 });
46
47 chrome.tabs.create({ url: TEST_FILE_URL });
48 });
49
50 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698