Chromium Code Reviews| OLD | NEW |
|---|---|
| (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> | |
| OLD | NEW |