diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-26 22:43:14 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-26 22:43:14 +0000 |
commit | de4381e62ab4e0b3e4fd6191e67c0ee664b8d96c (patch) | |
tree | ffa790a16ad1b81532b3de02de5d38d52df413f0 | |
parent | bc6afba13d9c30452425759ee23ef79c4aa31b12 (diff) | |
download | chromium_src-de4381e62ab4e0b3e4fd6191e67c0ee664b8d96c.zip chromium_src-de4381e62ab4e0b3e4fd6191e67c0ee664b8d96c.tar.gz chromium_src-de4381e62ab4e0b3e4fd6191e67c0ee664b8d96c.tar.bz2 |
Re-enable failing extension CSS injection browser_tests.
Change the code in ExtensionApiTest.ContentScriptCSSLocalization to no
longer use window.getMatchedCSSRules. After WebKit r135082,
getMatchedCSSRules no longer matches style rules added by insertCSS.
Re-enable ExecuteScriptApiTest.ExecuteScriptBasic and
ExecuteScriptApiTest.ExecuteScriptInFrame. They were hitting an ASSERT
in WebKit which got fixed in r135316.
BUG=162061
Review URL: https://chromiumcodereview.appspot.com/11308143
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169517 0039d316-1c4b-4281-b951-d872f2087c98
3 files changed, 7 insertions, 20 deletions
diff --git a/chrome/browser/extensions/content_script_apitest.cc b/chrome/browser/extensions/content_script_apitest.cc index 73f545c..abb32aa 100644 --- a/chrome/browser/extensions/content_script_apitest.cc +++ b/chrome/browser/extensions/content_script_apitest.cc @@ -126,10 +126,8 @@ IN_PROC_BROWSER_TEST_F( ASSERT_TRUE(styles_injected); } -// Disable it until the regression caused by the webkit patch r135082 is fixed. -// (See https://bugs.webkit.org/show_bug.cgi?id=102110 for details) IN_PROC_BROWSER_TEST_F(ExtensionApiTest, - DISABLED_ContentScriptCSSLocalization) { + ContentScriptCSSLocalization) { ASSERT_TRUE(StartTestServer()); ASSERT_TRUE(RunExtensionTest("content_scripts/css_l10n")) << message_; } diff --git a/chrome/browser/extensions/execute_script_apitest.cc b/chrome/browser/extensions/execute_script_apitest.cc index d68a27f..c441644 100644 --- a/chrome/browser/extensions/execute_script_apitest.cc +++ b/chrome/browser/extensions/execute_script_apitest.cc @@ -15,19 +15,15 @@ class ExecuteScriptApiTest : public ExtensionApiTest { } }; -// Disable it until the regression caused by the webkit patch r135082 is fixed. -// (See https://bugs.webkit.org/show_bug.cgi?id=102110 for details) // If failing, mark disabled and update http://crbug.com/92105. -IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, DISABLED_ExecuteScriptBasic) { +IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptBasic) { SetupDelayedHostResolver(); ASSERT_TRUE(StartTestServer()); ASSERT_TRUE(RunExtensionTest("executescript/basic")) << message_; } -// Disable it until the regression caused by the webkit patch r135082 is fixed. -// (See https://bugs.webkit.org/show_bug.cgi?id=102110 for details) // If failing, mark disabled and update http://crbug.com/92105. -IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, DISABLED_ExecuteScriptInFrame) { +IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptInFrame) { SetupDelayedHostResolver(); ASSERT_TRUE(StartTestServer()); ASSERT_TRUE(RunExtensionTest("executescript/in_frame")) << message_; diff --git a/chrome/test/data/extensions/api_test/content_scripts/css_l10n/test_paragraph_style.js b/chrome/test/data/extensions/api_test/content_scripts/css_l10n/test_paragraph_style.js index b4935ee..9bb88b5 100644 --- a/chrome/test/data/extensions/api_test/content_scripts/css_l10n/test_paragraph_style.js +++ b/chrome/test/data/extensions/api_test/content_scripts/css_l10n/test_paragraph_style.js @@ -6,18 +6,11 @@ // has had the __MSG_text_color__ message replaced ('text_color' must // not be present in any CSS code). -var rules = getMatchedCSSRules(document.getElementById('pId')); -if (rules != null) { - for (var i = 0; i < rules.length; ++i) { - if (rules.item(i).cssText.indexOf('text_color') != -1) { - chrome.extension.sendRequest({tag: 'paragraph_style', message: - 'Found unreplaced test_color in: ' + rules.item(i).cssText}); - break; - } - } +var p = document.getElementById('pId'); +var color = getComputedStyle(p).color; +if (getComputedStyle(p).color == "rgb(255, 0, 0)") { chrome.extension.sendRequest({tag: 'paragraph_style', message: 'passed'}); } else { chrome.extension.sendRequest({tag: 'paragraph_style', message: - 'No CSS rules found.'}); + 'Paragraph is not red: ' + color}); } - |