Chromium Code Reviews| Index: chrome/browser/extensions/extension_browsertests_misc.cc |
| diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc |
| index 6219c82658fa731d684788023dea8572210e9c7f..9e869a9b6d7ed9f895bf3f1e7916de7335c9fa88 100644 |
| --- a/chrome/browser/extensions/extension_browsertests_misc.cc |
| +++ b/chrome/browser/extensions/extension_browsertests_misc.cc |
| @@ -129,9 +129,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WebKitPrefsBackgroundPage) { |
| ExtensionHost* host = FindHostWithPath(manager, "/backgroundpage.html", 1); |
| WebPreferences prefs = |
| host->render_view_host()->GetDelegate()->GetWebkitPrefs(); |
| - ASSERT_FALSE(prefs.experimental_webgl_enabled); |
| - ASSERT_FALSE(prefs.accelerated_compositing_enabled); |
| - ASSERT_FALSE(prefs.accelerated_2d_canvas_enabled); |
| + ASSERT_TRUE(prefs.experimental_webgl_enabled); |
| + ASSERT_TRUE(prefs.accelerated_compositing_enabled); |
| + ASSERT_TRUE(prefs.accelerated_2d_canvas_enabled); |
| } |
| IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageActionCrash25562) { |
| @@ -697,6 +697,22 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, LastError) { |
| EXPECT_TRUE(result); |
| } |
| +// Tests to make sure we can use Canvas2D from a background page |
| +IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, Canvas2D) { |
|
Aaron Boodman
2012/03/09 01:00:06
Did you see the note at the bottom of the file (do
Josh Horwich
2012/03/09 01:21:56
Didn't see the note.
Do you mean app_background_p
Josh Horwich
2012/03/09 02:26:25
Done.
|
| + ASSERT_TRUE(LoadExtension( |
| + test_data_dir_.AppendASCII("canvas"))); |
| + |
| + // Get the ExtensionHost that is hosting our background page. |
| + ExtensionProcessManager* manager = |
| + browser()->profile()->GetExtensionProcessManager(); |
| + ExtensionHost* host = FindHostWithPath(manager, "/background.html", 1); |
| + |
| + bool result = false; |
| + ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( |
| + host->render_view_host(), L"", L"test()", &result)); |
| + EXPECT_TRUE(result); |
| +} |
| + |
| // Helper function for common code shared by the 3 WindowOpen tests below. |
| static void WindowOpenHelper(Browser* browser, const GURL& start_url, |
| const std::string& newtab_url, |